aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorEfraim Flashner2022-03-23 11:10:35 +0200
committerEfraim Flashner2022-03-23 11:11:05 +0200
commitda0f8b883e1ecf1b7ac7a487a624a482bd70334f (patch)
treed819655f6876fb53542f134b1f4271564eff0db5 /gn/packages
parent8cc29c1e223ed31bfdc3d832e36b85f4f63fbf85 (diff)
downloadguix-bioinformatics-da0f8b883e1ecf1b7ac7a487a624a482bd70334f.tar.gz
gn: gem5: install configs, wrap binaries.
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/virtualization.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gn/packages/virtualization.scm b/gn/packages/virtualization.scm
index aa22349..7897162 100644
--- a/gn/packages/virtualization.scm
+++ b/gn/packages/virtualization.scm
@@ -148,7 +148,21 @@ systems. It is designed to host the RISC-V Linux port.")
(copy-file
(string-append "build/" (string-upcase arch) "/gem5py_m5")
(string-append bin "gem5py_m5-" arch))))
- (list "arm" "mips" "null" "power" "riscv" "sparc" "x86"))))))))
+ (list "arm" "mips" "null" "power" "riscv" "sparc" "x86")))))
+ (add-after 'install 'install-configs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dest (string-append out "/share/gem5/configs")))
+ (copy-recursively "configs" dest))))
+ (add-after 'install 'wrap-binaries
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each
+ (lambda (file)
+ (wrap-program file
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")))))
+ (find-files (string-append out "/bin")))))))))
(inputs
(list gperftools
libpng