[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/25: gnu: make-autoconf-wrapper: Remove input labels.
From: |
guix-commits |
Subject: |
05/25: gnu: make-autoconf-wrapper: Remove input labels. |
Date: |
Sat, 23 Jul 2022 13:44:48 -0400 (EDT) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit 9e4b3391c559ac4c6b5bedf08f8350b51948eaa2
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sun Jul 17 00:00:48 2022 +0200
gnu: make-autoconf-wrapper: Remove input labels.
* gnu/packages/autotools.scm (make-autoconf-wrapper)[inputs]: Remove labels.
[arguments]: Use G-expression and SEARCH-INPUT-FILE.
---
gnu/packages/autotools.scm | 99 ++++++++++++++++++++++------------------------
1 file changed, 47 insertions(+), 52 deletions(-)
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index fb1b4751ee..c702be43fa 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -205,70 +205,65 @@ know anything about Autoconf or M4.")
use our own Bash instead of /bin/sh in shebangs. For that reason, it should
only be used internally---users should not end up distributing `configure'
files with a system-specific shebang."
- (package (inherit autoconf)
+ (package
+ (inherit autoconf)
(name (string-append (package-name autoconf) "-wrapper"))
(build-system trivial-build-system)
- (inputs `(("guile"
- ;; XXX: Kludge to hide the circular dependency.
- ,(module-ref (resolve-interface '(gnu packages guile))
- 'guile-3.0/fixed))
- ("autoconf" ,autoconf)
- ("bash" ,bash-minimal)))
+ (inputs
+ (list
+ ;; XXX: Kludge to hide the circular dependency.
+ (module-ref (resolve-interface '(gnu packages guile))
+ 'guile-3.0/fixed)
+ autoconf
+ bash-minimal))
(arguments
- '(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin"))
- (autoconf (string-append
- (assoc-ref %build-inputs "autoconf")
- "/bin/autoconf"))
- (guile (string-append
- (assoc-ref %build-inputs "guile")
- "/bin/guile"))
- (sh (string-append
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((bin (string-append #$output "/bin"))
+ (autoconf (search-input-file %build-inputs "/bin/autoconf"))
+ (guile (search-input-file %build-inputs "/bin/guile"))
+ (sh (search-input-file %build-inputs "/bin/sh"))
(modules ((compose dirname dirname dirname)
(search-path %load-path
"guix/build/utils.scm"))))
- (mkdir-p bin)
+ (mkdir-p bin)
- ;; Symlink all the binaries but `autoconf'.
- (with-directory-excursion bin
- (for-each (lambda (file)
- (unless (string=? (basename file) "autoconf")
- (symlink file (basename file))))
- (find-files (dirname autoconf) ".*")))
+ ;; Symlink all the binaries but `autoconf'.
+ (with-directory-excursion bin
+ (for-each (lambda (file)
+ (unless (string=? (basename file) "autoconf")
+ (symlink file (basename file))))
+ (find-files (dirname autoconf) ".*")))
- ;; Add an `autoconf' binary that wraps the real one.
- (call-with-output-file (string-append bin "/autoconf")
- (lambda (port)
- ;; Shamefully, Guile can be used in shebangs only if a
- ;; single argument is passed (-ds); otherwise it gets
- ;; them all as a single argument and fails to parse them.
- (format port "#!~a
+ ;; Add an `autoconf' binary that wraps the real one.
+ (call-with-output-file (string-append bin "/autoconf")
+ (lambda (port)
+ ;; Shamefully, Guile can be used in shebangs only if a
+ ;; single argument is passed (-ds); otherwise it gets
+ ;; them all as a single argument and fails to parse them.
+ (format port "#!~a
export GUILE_LOAD_PATH=\"~a\"
export GUILE_LOAD_COMPILED_PATH=\"~a\"
exec ~a --no-auto-compile \"$0\" \"$@\"
!#~%"
- sh modules modules guile)
- (write
- `(begin
- (use-modules (guix build utils))
- (let ((result (apply system* ,autoconf
- (cdr (command-line)))))
- (when (and (file-exists? "configure")
- (not (file-exists? "/bin/sh")))
- ;; Patch regardless of RESULT, because `autoconf
- ;; -Werror' can both create a `configure' file and
- ;; return a non-zero exit code.
- (patch-shebang "configure"))
- (exit (status:exit-val result))))
- port)))
- (chmod (string-append bin "/autoconf") #o555)
- #t))))
+ sh modules modules guile)
+ (write
+ `(begin
+ (use-modules (guix build utils))
+ (let ((result (apply system* ,autoconf
+ (cdr (command-line)))))
+ (when (and (file-exists? "configure")
+ (not (file-exists? "/bin/sh")))
+ ;; Patch regardless of RESULT, because `autoconf
+ ;; -Werror' can both create a `configure' file and
+ ;; return a non-zero exit code.
+ (patch-shebang "configure"))
+ (exit (status:exit-val result))))
+ port)))
+ (chmod (string-append bin "/autoconf") #o555)))))
;; Do not show it in the UI since it's meant for internal use.
(properties '((hidden? . #t)))))
- branch core-updates updated (5d970dfa89 -> c4386d0603), guix-commits, 2022/07/23
- 01/25: gnu: SQLite: Update to 3.39.1., guix-commits, 2022/07/23
- 05/25: gnu: make-autoconf-wrapper: Remove input labels.,
guix-commits <=
- 06/25: gnu: libtool: Don't reference bash by label., guix-commits, 2022/07/23
- 08/25: gnu: GnuPG: Update to 2.2.36., guix-commits, 2022/07/23
- 09/25: gnu: GnuPG: Use G-expression., guix-commits, 2022/07/23
- 07/25: gnu: libpaper: Update to 1.2.2., guix-commits, 2022/07/23
- 20/25: gnu: gpgme: Update to 1.17.1., guix-commits, 2022/07/23
- 11/25: gnu: cyrus-sasl: Fix indentation., guix-commits, 2022/07/23
- 03/25: gnu: automake: Remove input labels., guix-commits, 2022/07/23
- 02/25: gnu: automake: Update to 1.16.5., guix-commits, 2022/07/23
- 04/25: gnu: autoconf: Remove input labels., guix-commits, 2022/07/23
- 17/25: gnu: source-highlight: Fix build with newer GCC., guix-commits, 2022/07/23