mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: nextpnr: Add icestorm and prjtrellis checks.
* gnu/packages/electronics.scm (nextpnr)[arguments]: Add run-icestorm-examples and run-prjtrellis-examples phases. [native-inputs]: Add icestorm and prjtrellis. Change-Id: Icd94efb4deb53430412422e03acc19d036470f88 Signed-off-by: Gabriel Wicki <gabriel@erlikon.ch>
This commit is contained in:
parent
98a9cf0ec9
commit
9e299926c6
1 changed files with 39 additions and 3 deletions
|
@ -921,6 +921,10 @@ which allows one to install the M8 firmware on any Teensy.")
|
||||||
(string-append "-DTRELLIS_INSTALL_PREFIX="
|
(string-append "-DTRELLIS_INSTALL_PREFIX="
|
||||||
#$(this-package-input "prjtrellis"))
|
#$(this-package-input "prjtrellis"))
|
||||||
"-DUSE_IPO=OFF")
|
"-DUSE_IPO=OFF")
|
||||||
|
#:modules '((guix build qt-build-system)
|
||||||
|
(guix build utils)
|
||||||
|
(ice-9 ftw)
|
||||||
|
(srfi srfi-26))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
;; Required by himbaechel architecture, ng-ultra support.
|
;; Required by himbaechel architecture, ng-ultra support.
|
||||||
|
@ -947,10 +951,42 @@ which allows one to install the M8 firmware on any Teensy.")
|
||||||
(("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake")
|
(("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake")
|
||||||
(string-append
|
(string-append
|
||||||
#$(this-package-native-input "sanitizers-cmake")
|
#$(this-package-native-input "sanitizers-cmake")
|
||||||
"/share/sanitizers-cmake/cmake"))))))))
|
"/share/sanitizers-cmake/cmake")))))
|
||||||
|
(add-after 'install 'run-icestorm-examples
|
||||||
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(setenv "PATH"
|
||||||
|
(string-append #$output "/bin:" (getenv "PATH")))
|
||||||
|
;; Tests need write access.
|
||||||
|
(copy-recursively
|
||||||
|
(string-append
|
||||||
|
#$(this-package-native-input "icestorm") "/examples")
|
||||||
|
"/tmp/icestorm/examples")
|
||||||
|
(with-directory-excursion "/tmp/icestorm/examples"
|
||||||
|
(for-each
|
||||||
|
(cut invoke "make" "-C" <>)
|
||||||
|
(scandir "." (negate (cut member <> '("." "..")))))))))
|
||||||
|
(add-after 'run-icestorm-examples 'run-prjtrellis-examples
|
||||||
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(setenv "PATH"
|
||||||
|
(string-append #$output "/bin:" (getenv "PATH")))
|
||||||
|
;; Tests need write access.
|
||||||
|
(copy-recursively
|
||||||
|
(string-append
|
||||||
|
#$(this-package-native-input "prjtrellis") "/examples")
|
||||||
|
"/tmp/prjtrellis/examples")
|
||||||
|
(with-directory-excursion "/tmp/prjtrellis/examples"
|
||||||
|
(for-each
|
||||||
|
(cut invoke "make" "-C" <>)
|
||||||
|
;; Other tests require unavailable tools.
|
||||||
|
(list "ecp5_evn" "tinyfpga_rev1"
|
||||||
|
"tinyfpga_rev2" "versa5g")))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list googletest
|
`(("icestorm" ,(package-source icestorm))
|
||||||
sanitizers-cmake))
|
("googletest" ,googletest)
|
||||||
|
("prjtrellis" ,(package-source prjtrellis))
|
||||||
|
("sanitizers-cmake" ,sanitizers-cmake)))
|
||||||
(inputs
|
(inputs
|
||||||
(list apycula
|
(list apycula
|
||||||
boost
|
boost
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue