diff options
| author | Cayetano Santos <csantosb@inventati.org> | 2024-10-11 21:31:54 +0200 |
|---|---|---|
| committer | Cayetano Santos <csantosb@inventati.org> | 2024-10-11 21:31:54 +0200 |
| commit | 475f113df4c2d9d2fd9aac2047c506b2e3c0f322 (patch) | |
| tree | 420d3c4cff5fbdc0fb5ed88e7a1424af3dc44ed1 | |
| parent | e5f3ea88b070c44467933e9281d1ce5c976cb273 (diff) | |
gnu: Add ghdl-clang.csantosb/master
* guix-science/packages/electronics.scm (ghdl-clang): New variable.
| -rw-r--r-- | guix-science/packages/electronics.scm | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/guix-science/packages/electronics.scm b/guix-science/packages/electronics.scm index 7f2e190..9f2c8ef 100644 --- a/guix-science/packages/electronics.scm +++ b/guix-science/packages/electronics.scm | |||
| @@ -123,3 +123,61 @@ | |||
| 123 | "This package gathers GNAT binaries from FSF GCC releases of the Alire | 123 | "This package gathers GNAT binaries from FSF GCC releases of the Alire |
| 124 | Project.") | 124 | Project.") |
| 125 | (license (list license:expat)))) ; MIT license | 125 | (license (list license:expat)))) ; MIT license |
| 126 | |||
| 127 | (define-public ghdl-clang | ||
| 128 | (let ((commit "eeab69c29b68eb3f7fd51e6337eedb924d7be829") | ||
| 129 | (revision "0")) | ||
| 130 | (package | ||
| 131 | (name "ghdl-clang") | ||
| 132 | (version (git-version "4.1.0" revision commit)) | ||
| 133 | (source | ||
| 134 | (origin | ||
| 135 | (method git-fetch) | ||
| 136 | (uri (git-reference | ||
| 137 | (url "https://github.com/ghdl/ghdl") | ||
| 138 | (commit commit))) | ||
| 139 | (file-name (git-file-name name version)) | ||
| 140 | (sha256 | ||
| 141 | (base32 "1p495ax8cxspb13kbnfy0ba1s5kid7f9hmscdv30lf8y22plawb3")))) | ||
| 142 | (build-system gnu-build-system) | ||
| 143 | (arguments | ||
| 144 | (list | ||
| 145 | ;; XXX: This would check DT_RUNPATH, but patchelf populate DT_RPATH, | ||
| 146 | ;; not DT_RUNPATH. | ||
| 147 | #:validate-runpath? #f | ||
| 148 | #:phases #~(modify-phases %standard-phases | ||
| 149 | (replace 'configure | ||
| 150 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 151 | (let ((libc (assoc-ref inputs "libc"))) | ||
| 152 | (mkdir "build") | ||
| 153 | (chdir "build") | ||
| 154 | (setenv "LIBRARY_PATH" | ||
| 155 | (string-append (string-append libc "/lib") | ||
| 156 | (getenv "LIBRARY_PATH"))) | ||
| 157 | (setenv "LD_LIBRARY_PATH" | ||
| 158 | (string-append (string-append libc "/lib") | ||
| 159 | (getenv "LIBRARY_PATH"))) | ||
| 160 | (invoke "../configure" | ||
| 161 | "--with-llvm-config" | ||
| 162 | "--enable-libghdl" | ||
| 163 | "--enable-synth" | ||
| 164 | "--disable-gplcompat" | ||
| 165 | (string-append "--prefix=" | ||
| 166 | #$output))))) | ||
| 167 | (delete 'check) | ||
| 168 | (replace 'build | ||
| 169 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 170 | (invoke "make" "ghdl_llvm" "-j 8") | ||
| 171 | (invoke "patchelf" "--set-interpreter" | ||
| 172 | (search-input-file inputs | ||
| 173 | #$(glibc-dynamic-linker)) | ||
| 174 | "ghdl_llvm") | ||
| 175 | (invoke "make" "-j 8")))))) | ||
| 176 | (propagated-inputs (list clang-toolchain)) | ||
| 177 | (inputs (list patchelf gnat)) | ||
| 178 | (home-page "https://github.com/ghdl/ghdl") | ||
| 179 | (synopsis "Compiler for VHDL code using clang backend") | ||
| 180 | (description | ||
| 181 | "GHDL analyses, elaborates and simulates VHDL sources. It may also be | ||
| 182 | used as an experimental synthesizer backend.") | ||
| 183 | (license license:lgpl2.0)))) | ||
