summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorSören Tempel <soeren@soeren-tempel.net>2025-09-07 12:47:34 +0200
committerAndreas Enge <andreas@enge.fr>2025-09-24 14:30:05 +0200
commit632ea2db9869459aac88767b2c6aebb70b8c43e2 (patch)
treee70a8a95d274b0b5cfacd97326d4fe6f73eb3375 /gnu/packages
parente26bb1ecc0fbc58cf09e15775350228802ec1ec6 (diff)
gnu: wllvm: Refer to binutils and file by path.
Without these dependencies, wllvm cannot compile any code. * gnu/packages/llvm.scm (wllvm)[inputs]: Add binutils and file. [arguments]: Add 'fix-paths phase. Change-Id: I5727e55b889f8cebb1a8b20c5f1fce545b252e77 Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/llvm.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index fe64db6a354..c721be5226e 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -68,6 +68,7 @@
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
#:use-module (gnu packages check) ;python-lit
#:use-module (gnu packages compression)
+ #:use-module (gnu packages file)
#:use-module (gnu packages libedit)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
@@ -1842,6 +1843,25 @@ LLVM."))))
(sha256
(base32 "0cf31hixzq5bzkxv91rvadlhrpxzy934134scv4frj85bxbpl19y"))))
(build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pystr (lambda (s) (string-append "'" s "'"))))
+ (substitute* "wllvm/compilers.py"
+ (("'objcopy'")
+ (pystr (search-input-file inputs "/bin/objcopy"))))
+ (substitute* "wllvm/extraction.py"
+ (("'objdump'")
+ (pystr (search-input-file inputs "/bin/objdump")))
+ (("'ar'")
+ (pystr (search-input-file inputs "/bin/ar"))))
+ (substitute* "wllvm/filetype.py"
+ (("'file'")
+ (pystr (search-input-file inputs "/bin/file"))))))))))
+ (inputs (list binutils file))
(native-inputs (list python-setuptools python-wheel))
(home-page "https://github.com/SRI-CSL/whole-program-llvm")
(synopsis "Whole Program LLVM")