[PATCH] gnu: guix-build-coordinator: Neaten up the package definitions.

  • Done
  • quality assurance status badge
Details
One participant
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 2 years ago
(address . guix-patches@gnu.org)
da43fd5b7fb963102f916674a629f2170eab9738.1683877486.git.mail@cbaines.net
Remove duplication and redundant append calls.

* gnu/packages/package-management.scm (guix-build-coordinator)[inputs]: Always
add sqitch.
[propagated-inputs]: Always add guile-fibers-next.
(guix-build-coordinator-agent-only)[arguments]: Remove unnecessary duplication
of phases.
[propagated-inputs]: Remove unnecessary append.
---
gnu/packages/package-management.scm | 109 +++++++---------------------
1 file changed, 26 insertions(+), 83 deletions(-)

Toggle diff (142 lines)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 7be497c534..494ae7445d 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1474,27 +1474,21 @@ (define-public guix-build-coordinator
guile-lib
(first (assoc-ref (package-native-inputs guix) "guile"))))
(inputs
- (append
- (list (first (assoc-ref (package-native-inputs guix) "guile"))
- sqlite
- bash-minimal)
- (if (hurd-target?)
- '()
- (list sqitch))))
+ (list (first (assoc-ref (package-native-inputs guix) "guile"))
+ sqlite
+ bash-minimal
+ sqitch))
(propagated-inputs
- (append
- (list guile-prometheus
- guile-gcrypt
- guile-json-4
- guile-lib
- guile-lzlib
- guile-zlib
- guile-sqlite3
- guix
- guile-gnutls)
- (if (hurd-target?)
- '()
- (list guile-fibers-next))))
+ (list guile-prometheus
+ guile-gcrypt
+ guile-json-4
+ guile-lib
+ guile-lzlib
+ guile-zlib
+ guile-sqlite3
+ guix
+ guile-gnutls
+ guile-fibers-next))
(home-page "https://git.cbaines.net/guix/build-coordinator/")
(synopsis "Tool to help build derivations")
(description
@@ -1508,62 +1502,12 @@ (define-public guix-build-coordinator/agent-only
(inherit guix-build-coordinator)
(name "guix-build-coordinator-agent-only")
(arguments
- `(#:modules (((guix build guile-build-system)
+ (list
+ #: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-before 'build 'set-GUILE_AUTO_COMPILE
- (lambda _
- ;; To avoid warnings relating to 'guild'.
- (setenv "GUILE_AUTO_COMPILE" "0")
- #t))
- (add-after 'install 'wrap-executable
- (lambda* (#:key inputs outputs target #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (guile (assoc-ref inputs "guile"))
- (version (target-guile-effective-version))
- (scm (string-append out "/share/guile/site/" version))
- (go (string-append out "/lib/guile/" version "/site-ccache")))
- (for-each
- (lambda (file)
- (simple-format (current-error-port) "wrapping: ~A\n" file)
- (let ((guile-inputs (list
- "guile-json"
- "guile-gcrypt"
- "guix"
- "guile-prometheus"
- "guile-lib"
- "guile-lzlib"
- "guile-zlib"
- "guile-sqlite3"
- "guile-gnutls")))
- (wrap-program file
- `("PATH" ":" prefix (,bin))
- `("GUILE_LOAD_PATH" ":" prefix
- (,scm ,(string-join
- (map (lambda (input)
- (simple-format
- #f "~A/share/guile/site/~A"
- (assoc-ref inputs input)
- version))
- guile-inputs)
- ":")))
- `("GUILE_LOAD_COMPILED_PATH" ":" prefix
- (,go ,(string-join
- (map (lambda (input)
- (simple-format
- #f "~A/lib/guile/~A/site-ccache"
- (assoc-ref inputs input)
- version))
- guile-inputs)
- ":"))))))
- (find-files bin)))
- #t))
- (delete 'strip)))) ; As the .go files aren't compatible
+ #:imported-modules `((guix build guile-build-system)
+ ,@%gnu-build-system-modules)))
(native-inputs
(list pkg-config
autoconf
@@ -1581,15 +1525,14 @@ (define-public guix-build-coordinator/agent-only
(list (first (assoc-ref (package-native-inputs guix) "guile"))
bash-minimal))
(propagated-inputs
- (append
- (list guile-prometheus
- guile-gcrypt
- guile-json-4
- guile-lib
- guile-lzlib
- guile-zlib
- guix
- guile-gnutls)))
+ (list guile-prometheus
+ guile-gcrypt
+ guile-json-4
+ guile-lib
+ guile-lzlib
+ guile-zlib
+ guix
+ guile-gnutls))
(description
"The Guix Build Coordinator helps with performing lots of builds across
potentially many machines, and with doing something with the results and

base-commit: 23a575f97cab5b86a72391dd4ab3b937cd70d8a9
prerequisite-patch-id: e5211bfb82950d0b0a127e22dc4eb63dc5792633
--
2.39.1
Christopher Baines wrote 2 years ago
(address . 63458-done@debbugs.gnu.org)
87a5y6f02k.fsf@cbaines.net
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (12 lines)
> Remove duplication and redundant append calls.
>
> * gnu/packages/package-management.scm (guix-build-coordinator)[inputs]: Always
> add sqitch.
> [propagated-inputs]: Always add guile-fibers-next.
> (guix-build-coordinator-agent-only)[arguments]: Remove unnecessary duplication
> of phases.
> [propagated-inputs]: Remove unnecessary append.
> ---
> gnu/packages/package-management.scm | 109 +++++++---------------------
> 1 file changed, 26 insertions(+), 83 deletions(-)

Pushed to master as 38cfe61780f03b8cc029e1346a11bae2c0231625.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmRh8uNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfKHxAAs01plEV9xtTfYd+xkREq7yW06+OiBeIi
ZJ4ykMTejQRUyMeCZsKe/dFE4t9UDMUq4roD0dmc253Eq9YfeHF4G9gmeF/0j1Bt
0vzcjCXdtj93Jd89wDbtQBbx4R2KiOGxhL+EbTUruOY+9CbAYNbTHK6BrgkP4f4b
/OveTUKrKS4zOV/sxvgLglrppWWzChQOZbujaTEhi8IjZ5Wg8XBCM8V3jAIMosRK
/CsVp8JbdtTbmmb2skcnLz/dbQ9UKW4kw9fXFWwnEb9beuVXRJ4qOdwUqy19JRRx
SNEQeuzYQVg9KC7BR567/28MtB6+CTHDNYC6Lg7S8pJgVVw3Yuw7mPnOthhd5n75
3AbWtmotk7RfQx+Vs+KJDz7T3/n4FUIrZnGcDawn9WhHWkAJVts6IjI2B7vnlLkt
ptHsuPhc0ps1tky6nwtIVC0JDTG39982c4rLbGbQeLIA3MPIlnOOuKLAbmdzVz5A
2+KRg5dUfW9qmJbi4RaTZLBB6CXp48A/i8b7FK9BONCBfeB8UhjJ/4EJSQg6Tnx7
FkHBK4ag7W/QBbdXIKruKHjeWahyX1nPu9zW9DAjPGrD4Ophkhl4CpJUL+2wo6dp
BCoL7K2bNhlRfPu/tz274RBsAO4zrR0+hU2YQq1E3YBGgXNyGsjtAbPATK4oUUZx
R9hpsbtJQNA=
=2K78
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 63458@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63458
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help