From da0f8b883e1ecf1b7ac7a487a624a482bd70334f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 23 Mar 2022 11:10:35 +0200 Subject: gn: gem5: install configs, wrap binaries. --- gn/packages/virtualization.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gn/packages/virtualization.scm') 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 -- cgit v1.2.3