[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 01/02: guix: Refer to Fibers disregarding its label.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 01/02: guix: Refer to Fibers disregarding its label. |
Date: |
Sat, 30 Dec 2023 05:31:20 -0500 (EST) |
civodul pushed a commit to branch main
in repository shepherd.
commit d245de140a65b726ad43f40ddff6e8b392be2443
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Dec 30 11:19:32 2023 +0100
guix: Refer to Fibers disregarding its label.
Fixes a regression introduced in
865215acbaf0dce4aaad36ae526b22cdf7b1ba13, where
‘guix build -d guile2.2-shepherd’ would fail.
* guix.scm (shepherd)[arguments]: Add #:modules and #:imported-modules.
Rewrite ‘set-fibers-directory’ phase to avoid ‘this-package-input’,
which would return #f in ‘guile2.2-shepherd’.
---
.guix/modules/shepherd-package.scm | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/.guix/modules/shepherd-package.scm
b/.guix/modules/shepherd-package.scm
index e1f95ec..6f39511 100644
--- a/.guix/modules/shepherd-package.scm
+++ b/.guix/modules/shepherd-package.scm
@@ -74,22 +74,30 @@
(build-system gnu-build-system)
(arguments
(list #:configure-flags #~'("--localstatedir=/var")
+ #:modules '((guix build gnu-build-system)
+ ((guix build guile-build-system)
+ #:select (target-guile-effective-version))
+ (guix build utils))
+ #:imported-modules `((guix build guile-build-system)
+ ,@%gnu-build-system-modules)
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'set-fibers-directory
- (lambda* (#:key target #:allow-other-keys)
+ (lambda* (#:key inputs target #:allow-other-keys)
(when target
;; When cross-compiling, refer to the target
;; Fibers, not the native one.
- (substitute* '("herd.in" "shepherd.in")
- (("%FIBERS_SOURCE_DIRECTORY%")
- #$(file-append
- (this-package-input "guile-fibers")
- "/share/guile/site/3.0"))
- (("%FIBERS_OBJECT_DIRECTORY%")
- #$(file-append
- (this-package-input "guile-fibers")
- "/lib/guile/3.0/site-ccache"))))))
+ (let ((fibers
+ (search-input-file
+ inputs
+ (string-append "/share/guile/site/"
+ (target-guile-effective-version)
+ "/fibers.scm"))))
+ (substitute* '("herd.in" "shepherd.in")
+ (("%FIBERS_SOURCE_DIRECTORY%")
+ (dirname fibers))
+ (("%FIBERS_OBJECT_DIRECTORY%")
+ (dirname fibers)))))))
(add-after 'check 'check-without-signalfd
(lambda* (#:key target tests? #:allow-other-keys)
;; On Linux, test without 'signalfd' support.