mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: nextpnr: Remove let bindings.
* gnu/packages/electronics.scm (nextpnr): Use git tags, omit commit and revision bindings. Change-Id: I505c8676890f23b1df5a57a63c8f574eda0681de Signed-off-by: Gabriel Wicki <gabriel@erlikon.ch>
This commit is contained in:
parent
ea92fb0c49
commit
09e7d188dd
1 changed files with 104 additions and 107 deletions
|
@ -722,113 +722,110 @@ which allows one to install the M8 firmware on any Teensy.")
|
||||||
license:zlib))))
|
license:zlib))))
|
||||||
|
|
||||||
(define-public nextpnr
|
(define-public nextpnr
|
||||||
;; Necessary for compatibility with latest apycula.
|
(package
|
||||||
(let ((commit "9715a1d56580d0652b4a90d58eb4096ba537e3ce")
|
(name "nextpnr")
|
||||||
(revision "0"))
|
(version "0.9")
|
||||||
(package
|
(source
|
||||||
(name "nextpnr")
|
(origin
|
||||||
(version "0.9")
|
(method git-fetch)
|
||||||
(source
|
(uri (git-reference
|
||||||
(origin
|
(url "https://github.com/YosysHQ/nextpnr/")
|
||||||
(method git-fetch)
|
(commit (string-append "nextpnr-" version))
|
||||||
(uri (git-reference
|
;; XXX: Fetch some bundled libraries such as QtPropertyBrowser,
|
||||||
(url "https://github.com/YosysHQ/nextpnr/")
|
;; json11 and python-console, which have custom modifications or
|
||||||
(commit commit)
|
;; no longer have their original upstream.
|
||||||
;; XXX: Fetch some bundled libraries such as QtPropertyBrowser,
|
(recursive? #t)))
|
||||||
;; json11 and python-console, which have custom modifications or
|
(file-name (git-file-name name version))
|
||||||
;; no longer have their original upstream.
|
(modules '((guix build utils)
|
||||||
(recursive? #t)))
|
(ice-9 ftw)
|
||||||
(file-name (git-file-name name version))
|
(srfi srfi-26)))
|
||||||
(modules '((guix build utils)
|
(snippet
|
||||||
(ice-9 ftw)
|
'(begin
|
||||||
(srfi srfi-26)))
|
;; XXX: 'delete-all-but' is copied from the turbovnc package.
|
||||||
(snippet
|
(define (delete-all-but directory . preserve)
|
||||||
'(begin
|
(with-directory-excursion directory
|
||||||
;; XXX: 'delete-all-but' is copied from the turbovnc package.
|
(let* ((pred (negate (cut member <>
|
||||||
(define (delete-all-but directory . preserve)
|
(cons* "." ".." preserve))))
|
||||||
(with-directory-excursion directory
|
(items (scandir "." pred)))
|
||||||
(let* ((pred (negate (cut member <>
|
(for-each (cut delete-file-recursively <>) items))))
|
||||||
(cons* "." ".." preserve))))
|
(delete-all-but "3rdparty"
|
||||||
(items (scandir "." pred)))
|
;; The following sources have all been patched, so
|
||||||
(for-each (cut delete-file-recursively <>) items))))
|
;; cannot easily be unbundled.
|
||||||
(delete-all-but "3rdparty"
|
"QtPropertyBrowser"
|
||||||
;; The following sources have all been patched, so
|
"json11"
|
||||||
;; cannot easily be unbundled.
|
"python-console"
|
||||||
"QtPropertyBrowser"
|
"oourafft")))
|
||||||
"json11"
|
(patches (search-patches "nextpnr-gtest.patch"
|
||||||
"python-console"
|
"nextpnr-imgui.patch"))
|
||||||
"oourafft")))
|
(sha256
|
||||||
(patches (search-patches "nextpnr-gtest.patch"
|
(base32 "1wrlk0f4y29znd1zgl531lw4s0rfm5w8kx4hlwwdaj7b9vv3v65f"))))
|
||||||
"nextpnr-imgui.patch"))
|
(build-system qt-build-system)
|
||||||
(sha256
|
(arguments
|
||||||
(base32 "1wrlk0f4y29znd1zgl531lw4s0rfm5w8kx4hlwwdaj7b9vv3v65f"))))
|
(list
|
||||||
(build-system qt-build-system)
|
#:cmake cmake ;CMake 3.25 or higher is required.
|
||||||
(arguments
|
#:configure-flags
|
||||||
(list
|
;; TODO: enable more architectures?
|
||||||
#:cmake cmake ;CMake 3.25 or higher is required.
|
#~(list "-DARCH=generic;ice40;ecp5;himbaechel"
|
||||||
#:configure-flags
|
"-DBUILD_GUI=ON"
|
||||||
;; TODO: enable more architectures?
|
"-DUSE_OPENMP=ON"
|
||||||
#~(list "-DARCH=generic;ice40;ecp5;himbaechel"
|
"-DBUILD_TESTS=ON"
|
||||||
"-DBUILD_GUI=ON"
|
"-DHIMBAECHEL_UARCH=ng-ultra;gowin"
|
||||||
"-DUSE_OPENMP=ON"
|
"-DHIMBAECHEL_NGULTRA_DEVICES=ng-ultra"
|
||||||
"-DBUILD_TESTS=ON"
|
"-DHIMBAECHEL_SPLIT=ON"
|
||||||
"-DHIMBAECHEL_UARCH=ng-ultra;gowin"
|
"-DHIMBAECHEL_PRJBEYOND_DB=/tmp/prjbeyond-db"
|
||||||
"-DHIMBAECHEL_NGULTRA_DEVICES=ng-ultra"
|
(string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version)
|
||||||
"-DHIMBAECHEL_SPLIT=ON"
|
(string-append "-DICESTORM_INSTALL_PREFIX="
|
||||||
"-DHIMBAECHEL_PRJBEYOND_DB=/tmp/prjbeyond-db"
|
#$(this-package-input "icestorm"))
|
||||||
(string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version)
|
(string-append "-DTRELLIS_INSTALL_PREFIX="
|
||||||
(string-append "-DICESTORM_INSTALL_PREFIX="
|
#$(this-package-input "prjtrellis"))
|
||||||
#$(this-package-input "icestorm"))
|
"-DUSE_IPO=OFF")
|
||||||
(string-append "-DTRELLIS_INSTALL_PREFIX="
|
#:phases
|
||||||
#$(this-package-input "prjtrellis"))
|
#~(modify-phases %standard-phases
|
||||||
"-DUSE_IPO=OFF")
|
;; Required by himbaechel architecture, ng-ultra support.
|
||||||
#:phases
|
(add-after 'unpack 'get-prjbeyond-db
|
||||||
#~(modify-phases %standard-phases
|
(lambda _
|
||||||
;; Required by himbaechel architecture, ng-ultra support.
|
(copy-recursively
|
||||||
(add-after 'unpack 'get-prjbeyond-db
|
#$(origin
|
||||||
(lambda _
|
(method git-fetch)
|
||||||
(copy-recursively
|
(uri (git-reference
|
||||||
#$(origin
|
(url "https://github.com/yosyshq-GmbH/prjbeyond-db/")
|
||||||
(method git-fetch)
|
;; We take latest commit, as indicated in nextpnr’s
|
||||||
(uri (git-reference
|
;; README.md file
|
||||||
(url "https://github.com/yosyshq-GmbH/prjbeyond-db/")
|
(commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
|
||||||
;; We take latest commit, as indicated in nextpnr’s
|
(sha256
|
||||||
;; README.md file
|
(base32
|
||||||
(commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
|
"17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
|
||||||
(sha256
|
"/tmp/prjbeyond-db")))
|
||||||
(base32
|
(add-after 'unpack 'unbundle-sanitizers-cmake
|
||||||
"17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
|
(lambda _
|
||||||
"/tmp/prjbeyond-db")))
|
(substitute* "CMakeLists.txt"
|
||||||
(add-after 'unpack 'unbundle-sanitizers-cmake
|
;; Use the system sanitizers-cmake module. This is made
|
||||||
(lambda _
|
;; necessary 'sanitizers-cmake' installing a FindPackage
|
||||||
(substitute* "CMakeLists.txt"
|
;; module but no CMake config file.
|
||||||
;; Use the system sanitizers-cmake module. This is made
|
(("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake")
|
||||||
;; necessary 'sanitizers-cmake' installing a FindPackage
|
(string-append
|
||||||
;; module but no CMake config file.
|
#$(this-package-native-input "sanitizers-cmake")
|
||||||
(("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake")
|
"/share/sanitizers-cmake/cmake"))))))))
|
||||||
(string-append
|
(native-inputs
|
||||||
#$(this-package-native-input "sanitizers-cmake")
|
(list googletest
|
||||||
"/share/sanitizers-cmake/cmake"))))))))
|
sanitizers-cmake))
|
||||||
(native-inputs
|
(inputs
|
||||||
(list googletest
|
(list apycula
|
||||||
sanitizers-cmake))
|
boost
|
||||||
(inputs
|
corrosion
|
||||||
(list apycula
|
eigen
|
||||||
boost
|
icestorm
|
||||||
corrosion
|
prjtrellis
|
||||||
eigen
|
pybind11
|
||||||
icestorm
|
python
|
||||||
prjtrellis
|
qtbase-5
|
||||||
pybind11
|
qtwayland-5
|
||||||
python
|
qtimgui
|
||||||
qtbase-5
|
yosys))
|
||||||
qtwayland-5
|
(synopsis "Place-and-Route tool for FPGAs")
|
||||||
qtimgui
|
(description "Nextpnr is a portable FPGA place and route tool.")
|
||||||
yosys))
|
(home-page "https://github.com/YosysHQ/nextpnr/")
|
||||||
(synopsis "Place-and-Route tool for FPGAs")
|
(license license:isc)))
|
||||||
(description "Nextpnr is a portable FPGA place and route tool.")
|
|
||||||
(home-page "https://github.com/YosysHQ/nextpnr/")
|
|
||||||
(license license:isc))))
|
|
||||||
|
|
||||||
(define-public nextpnr-ice40
|
(define-public nextpnr-ice40
|
||||||
(deprecated-package "nextpnr-ice40" nextpnr))
|
(deprecated-package "nextpnr-ice40" nextpnr))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue