[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: build-system/guile: Add target-guile-scm+go procedure.
From: |
guix-commits |
Subject: |
04/09: build-system/guile: Add target-guile-scm+go procedure. |
Date: |
Wed, 15 Nov 2023 12:33:42 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 3493832260fdb7298c2f661e1c9fbe366e578693
Author: Tomas Volf <wolf@wolfsden.cz>
AuthorDate: Sun Oct 29 13:56:13 2023 +0100
build-system/guile: Add target-guile-scm+go procedure.
The paths to .scm and .go files can be constructed given a guile version
and a
base directory. However it is few lines of code that needs to be
copy&pasted.
This new procedure returns both of them reducing the maintenance cost.
* guix/build/guile-build-system.scm (target-guile-scm+go): New procedure.
Change-Id: I58615f2cfe0ec1e58d3fbb47b738ed5dce1bb252
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
guix/build/guile-build-system.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/guix/build/guile-build-system.scm
b/guix/build/guile-build-system.scm
index 32a431d347..e7e7f2d0be 100644
--- a/guix/build/guile-build-system.scm
+++ b/guix/build/guile-build-system.scm
@@ -28,6 +28,7 @@
#:use-module (ice-9 format)
#:use-module (guix build utils)
#:export (target-guile-effective-version
+ target-guile-scm+go
%standard-phases
guile-build))
@@ -44,7 +45,17 @@ Return #false if it cannot be determined."
(string? line)
line)))
-(define (file-sans-extension file) ;TODO: factorize
+(define* (target-guile-scm+go output #:optional guile)
+ "Return paths under `output' for scm and go files for effective version of
+GUILE or whichever `guile' is in $PATH. Raises an error if they cannot be
+determined."
+ (let* ((version (or (target-guile-effective-version guile)
+ (error "Cannot determine the effective target guile
version.")))
+ (scm (string-append output "/share/guile/site/" version))
+ (go (string-append output "/lib/guile/" version "/site-ccache")))
+ (values scm go)))
+
+(define (file-sans-extension file) ;TODO: factorize
"Return the substring of FILE without its extension, if any."
(let ((dot (string-rindex file #\.)))
(if dot
- branch master updated (7e6580670b -> d987b75618), guix-commits, 2023/11/15
- 02/09: gnu: musescore: Update to 4.1.1., guix-commits, 2023/11/15
- 06/09: gnu: tor: Update to 0.4.8.9 [security fixes]., guix-commits, 2023/11/15
- 01/09: gnu: psm2: Update Git tag name., guix-commits, 2023/11/15
- 07/09: gnu: python-types-pytz: Update to 2023.3.1.1., guix-commits, 2023/11/15
- 03/09: locate: Accept ‘--clear’ without additional arguments., guix-commits, 2023/11/15
- 04/09: build-system/guile: Add target-guile-scm+go procedure.,
guix-commits <=
- 05/09: gnu: whoogle-search: Update to 0.8.3., guix-commits, 2023/11/15
- 08/09: gnu: Add python-tdda., guix-commits, 2023/11/15
- 09/09: gnu: Add monsterid., guix-commits, 2023/11/15