From: Arun Isaac <arunisaac@systemreboot.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Arun Isaac <arunisaac@systemreboot.net>, 46885@debbugs.gnu.org
Subject: [bug#46885] [PATCH v2 1/2] gnu: artanis: Remove hard-coded guile effective version.
Date: Wed, 25 Aug 2021 02:03:07 +0530 [thread overview]
Message-ID: <20210824203308.8402-2-arunisaac@systemreboot.net> (raw)
In-Reply-To: <87k0q5xyau.fsf@gnu.org>
* gnu/packages/guile-xyz.scm (artanis)[arguments]: Import
target-guile-effective-version from (guix build guile-build-system). Use
target-guile-effective-version to determine the guile effective version.
---
gnu/packages/guile-xyz.scm | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index db31ada7b9..5f457d8ae4 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -17,7 +17,7 @@
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
@@ -182,11 +182,20 @@
("pkgconfig" ,pkg-config)
("util-linux" ,util-linux))) ;for the `script' command
(arguments
- '(#:make-flags
+ `(#: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)
+ #:make-flags
;; TODO: The documentation must be built with the `docs' target.
(let* ((out (assoc-ref %outputs "out"))
- (scm (string-append out "/share/guile/site/2.2"))
- (go (string-append out "/lib/guile/2.2/site-ccache")))
+ ;; We pass guile explicitly here since this executes before the
+ ;; set-paths phase and therefore guile is not yet in PATH.
+ (effective-version (target-guile-effective-version
+ (assoc-ref %build-inputs "guile")))
+ (scm (string-append out "/share/guile/site/" effective-version))
+ (go (string-append out "/lib/guile/" effective-version "/site-ccache")))
;; Don't use (%site-dir) for site paths.
(list (string-append "MOD_PATH=" scm)
(string-append "MOD_COMPILED_PATH=" go)))
@@ -199,7 +208,9 @@
(("\\(%site-dir\\)")
(string-append "\""
(assoc-ref outputs "out")
- "/share/guile/site/2.2\"")))))
+ "/share/guile/site/"
+ (target-guile-effective-version)
+ "\"")))))
(add-after 'unpack 'patch-reference-to-libnss
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "artanis/security/nss.scm"
@@ -221,9 +232,11 @@
(add-after 'install 'wrap-art
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
+ (effective-version (target-guile-effective-version))
(bin (string-append out "/bin"))
- (scm (string-append out "/share/guile/site/2.2"))
- (go (string-append out "/lib/guile/2.2/site-ccache")))
+ (scm (string-append out "/share/guile/site/" effective-version))
+ (go (string-append out "/lib/guile/" effective-version
+ "/site-ccache")))
(wrap-program (string-append bin "/art")
`("GUILE_LOAD_PATH" ":" prefix
(,scm ,(getenv "GUILE_LOAD_PATH")))
--
2.32.0
next prev parent reply other threads:[~2021-08-24 20:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 1:15 [bug#46885] [PATCH] gnu: artanis: Update to 0.5 Léo Le Bouter via Guix-patches via
2021-03-17 21:31 ` Ludovic Courtès
2021-08-24 20:33 ` [bug#46885] [PATCH v2 0/2] Update artanis " Arun Isaac
2021-08-30 10:08 ` Ludovic Courtès
2021-09-01 12:01 ` bug#46885: " Arun Isaac
2021-08-24 20:33 ` Arun Isaac [this message]
2021-08-24 20:33 ` [bug#46885] [PATCH v2 2/2] gnu: artanis: Update " Arun Isaac
2021-09-01 12:38 ` [bug#46885] Thanks! jgart via Guix-patches via
2021-09-02 5:52 ` Arun Isaac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210824203308.8402-2-arunisaac@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=46885@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.