mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-01 07:16:39 +01:00
gnu: git-minimal: Avoid depending on (guix search-paths).
This is a follow up commit to 48e528a26f
, following discussions in
<https://issues.guix.gnu.org/65924#96>.
* gnu/packages/version-control.scm (git-minimal)
[arguments] <imported-modules>: Remove.
<modules>: Remove (guix search-paths); add (ice-9 format).
<phases>: Rewrite PATH-variable-definition in the patch-commands
phase to avoid the use of (guix search-paths).
Suggested-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I01a3c4be780f11434200c6f47739dc52a75ea51a
This commit is contained in:
parent
4ed3e46715
commit
29d5767343
1 changed files with 7 additions and 17 deletions
|
@ -89,7 +89,6 @@ (define-module (gnu packages version-control)
|
|||
#:use-module (guix build-system python)
|
||||
#:use-module (guix build-system qt)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (gnu packages apr)
|
||||
#:use-module (gnu packages autotools)
|
||||
#:use-module (gnu packages documentation)
|
||||
|
@ -259,14 +258,11 @@ (define-public git-minimal
|
|||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:imported-modules `(,@%gnu-build-system-modules
|
||||
,@(source-module-closure '((guix search-paths))))
|
||||
#:modules `((ice-9 match)
|
||||
(ice-9 textual-ports)
|
||||
(srfi srfi-1)
|
||||
#:modules `((srfi srfi-1)
|
||||
(srfi srfi-26)
|
||||
(ice-9 format)
|
||||
(ice-9 textual-ports)
|
||||
((guix build gnu-build-system) #:prefix gnu:)
|
||||
(guix search-paths)
|
||||
,@%gnu-build-system-modules)
|
||||
;; Make sure the full bash does not end up in the final closure.
|
||||
#:disallowed-references (list bash perl)
|
||||
|
@ -342,16 +338,10 @@ (define (prepend-string-to-file text file)
|
|||
(display content port)))))
|
||||
|
||||
(define PATH-variable-definition
|
||||
(let ((value
|
||||
(match (evaluate-search-paths
|
||||
(list $PATH)
|
||||
(list #$(this-package-input "coreutils-minimal")
|
||||
#$(this-package-input "sed")))
|
||||
(((spec . value))
|
||||
value))))
|
||||
(string-append
|
||||
(search-path-definition $PATH value
|
||||
#:kind 'prefix) "\n\n")))
|
||||
(format #f "PATH=~{~a~^:~}${PATH:+:}$PATH~%~%"
|
||||
(map (compose dirname (cut search-input-file inputs <>))
|
||||
'("bin/basename"
|
||||
"bin/sed"))))
|
||||
|
||||
;; Ensure that coreutils (for basename) and sed are on PATH
|
||||
;; for any script that sources the 'git-sh-setup.sh' file.
|
||||
|
|
Loading…
Reference in a new issue