aboutsummaryrefslogtreecommitdiff
path: root/guix.scm
diff options
context:
space:
mode:
authorArun Isaac2021-11-29 19:01:36 +0530
committerArun Isaac2021-11-29 19:44:18 +0530
commit7182d280779a14c2f7a991f6f229e4c0d123435f (patch)
tree20dd285b71cc49ff72244b6050b4b93e98f4f6c5 /guix.scm
parentc823ee4367378738c2dae5e9426430ab4bcdfd79 (diff)
downloadccwl-7182d280779a14c2f7a991f6f229e4c0d123435f.tar.gz
ccwl-7182d280779a14c2f7a991f6f229e4c0d123435f.tar.lz
ccwl-7182d280779a14c2f7a991f6f229e4c0d123435f.zip
guix.scm: Add a wrap phase.
* guix.scm (ccwl)[arguments]: Import target-guile-effective-version from (guix build guile-build-system). Add a wrap phase.
Diffstat (limited to 'guix.scm')
-rw-r--r--guix.scm20
1 files changed, 19 insertions, 1 deletions
diff --git a/guix.scm b/guix.scm
index 96dc605..9ebe36f 100644
--- a/guix.scm
+++ b/guix.scm
@@ -53,7 +53,25 @@
#:select? (git-predicate %source-dir)))
(build-system gnu-build-system)
(arguments
- '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
+ `(#:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
+ #:modules (((guix build guile-build-system)
+ #:select (target-guile-effective-version))
+ ,@%gnu-build-system-modules)
+ #:imported-modules ((guix build guile-build-system)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (effective-version (target-guile-effective-version)))
+ (wrap-program (string-append out "/bin/ccwl")
+ `("GUILE_LOAD_PATH" prefix
+ (,(string-append out "/share/guile/site/" effective-version)
+ ,(getenv "GUILE_LOAD_PATH")))
+ `("GUILE_LOAD_COMPILED_PATH" prefix
+ (,(string-append out "/lib/guile/" effective-version "/site-ccache")
+ ,(getenv "GUILE_LOAD_COMPILED_PATH"))))))))))
(inputs
`(("guile" ,guile-3.0)
("guile-libyaml" ,guile-libyaml)))