packages: Refer to the native tools when handling sources and downloads.
* guix/packages.scm (patch-and-repack)[build]: Change most #$ to #+. * guix/cvs-download.scm (cvs-fetch)[build]: Likewise. * guix/download.scm (url-fetch)[builder]: Likewise. * guix/git-download.scm (git-fetch)[build]: Likewise. * guix/svn-download.scm (svn-fetch)[build]: Likewise.
This commit is contained in:
parent
691cb22b1b
commit
1590e8a1dd
@ -66,7 +66,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
|
|||||||
'#$(cvs-reference-module ref)
|
'#$(cvs-reference-module ref)
|
||||||
'#$(cvs-reference-revision ref)
|
'#$(cvs-reference-revision ref)
|
||||||
#$output
|
#$output
|
||||||
#:cvs-command (string-append #$cvs "/bin/cvs"))))
|
#:cvs-command (string-append #+cvs "/bin/cvs"))))
|
||||||
|
|
||||||
(mlet %store-monad ((guile (package->derivation guile system)))
|
(mlet %store-monad ((guile (package->derivation guile system)))
|
||||||
(gexp->derivation (or name "cvs-checkout") build
|
(gexp->derivation (or name "cvs-checkout") build
|
||||||
|
@ -241,12 +241,12 @@ in the store."
|
|||||||
|
|
||||||
(define builder
|
(define builder
|
||||||
#~(begin
|
#~(begin
|
||||||
#$(if need-gnutls?
|
#+(if need-gnutls?
|
||||||
|
|
||||||
;; Add GnuTLS to the inputs and to the load path.
|
;; Add GnuTLS to the inputs and to the load path.
|
||||||
#~(eval-when (load expand eval)
|
#~(eval-when (load expand eval)
|
||||||
(set! %load-path
|
(set! %load-path
|
||||||
(cons (string-append #$(gnutls-package)
|
(cons (string-append #+(gnutls-package)
|
||||||
"/share/guile/site/"
|
"/share/guile/site/"
|
||||||
(effective-version))
|
(effective-version))
|
||||||
%load-path)))
|
%load-path)))
|
||||||
|
@ -76,7 +76,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
|
|||||||
;; The 'git submodule' commands expects Coreutils, sed,
|
;; The 'git submodule' commands expects Coreutils, sed,
|
||||||
;; grep, etc. to be in $PATH.
|
;; grep, etc. to be in $PATH.
|
||||||
(set-path-environment-variable "PATH" '("bin")
|
(set-path-environment-variable "PATH" '("bin")
|
||||||
(match '#$inputs
|
(match '#+inputs
|
||||||
(((names dirs) ...)
|
(((names dirs) ...)
|
||||||
dirs)))
|
dirs)))
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
|
|||||||
'#$(git-reference-commit ref)
|
'#$(git-reference-commit ref)
|
||||||
#$output
|
#$output
|
||||||
#:recursive? '#$(git-reference-recursive? ref)
|
#:recursive? '#$(git-reference-recursive? ref)
|
||||||
#:git-command (string-append #$git "/bin/git"))))
|
#:git-command (string-append #+git "/bin/git"))))
|
||||||
|
|
||||||
(mlet %store-monad ((guile (package->derivation guile system)))
|
(mlet %store-monad ((guile (package->derivation guile system)))
|
||||||
(gexp->derivation (or name "git-checkout") build
|
(gexp->derivation (or name "git-checkout") build
|
||||||
|
@ -436,8 +436,8 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
|
|||||||
|
|
||||||
;; Use '--force' so that patches that do not apply perfectly are
|
;; Use '--force' so that patches that do not apply perfectly are
|
||||||
;; rejected.
|
;; rejected.
|
||||||
(zero? (system* (string-append #$patch "/bin/patch")
|
(zero? (system* (string-append #+patch "/bin/patch")
|
||||||
"--force" #$@flags "--input" patch)))
|
"--force" #+@flags "--input" patch)))
|
||||||
|
|
||||||
(define (first-file directory)
|
(define (first-file directory)
|
||||||
;; Return the name of the first file in DIRECTORY.
|
;; Return the name of the first file in DIRECTORY.
|
||||||
@ -448,49 +448,49 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
|
|||||||
;; Encoding/decoding errors shouldn't be silent.
|
;; Encoding/decoding errors shouldn't be silent.
|
||||||
(fluid-set! %default-port-conversion-strategy 'error)
|
(fluid-set! %default-port-conversion-strategy 'error)
|
||||||
|
|
||||||
(when #$locales
|
(when #+locales
|
||||||
;; First of all, install a UTF-8 locale so that UTF-8 file names
|
;; First of all, install a UTF-8 locale so that UTF-8 file names
|
||||||
;; are correctly interpreted. During bootstrap, LOCALES is #f.
|
;; are correctly interpreted. During bootstrap, LOCALES is #f.
|
||||||
(setenv "LOCPATH" (string-append #$locales "/lib/locale"))
|
(setenv "LOCPATH" (string-append #+locales "/lib/locale"))
|
||||||
(setlocale LC_ALL "en_US.UTF-8"))
|
(setlocale LC_ALL "en_US.UTF-8"))
|
||||||
|
|
||||||
(setenv "PATH" (string-append #$xz "/bin" ":"
|
(setenv "PATH" (string-append #+xz "/bin" ":"
|
||||||
#$decomp "/bin"))
|
#+decomp "/bin"))
|
||||||
|
|
||||||
;; SOURCE may be either a directory or a tarball.
|
;; SOURCE may be either a directory or a tarball.
|
||||||
(and (if (file-is-directory? #$source)
|
(and (if (file-is-directory? #+source)
|
||||||
(let* ((store (or (getenv "NIX_STORE") "/gnu/store"))
|
(let* ((store (or (getenv "NIX_STORE") "/gnu/store"))
|
||||||
(len (+ 1 (string-length store)))
|
(len (+ 1 (string-length store)))
|
||||||
(base (string-drop #$source len))
|
(base (string-drop #+source len))
|
||||||
(dash (string-index base #\-))
|
(dash (string-index base #\-))
|
||||||
(directory (string-drop base (+ 1 dash))))
|
(directory (string-drop base (+ 1 dash))))
|
||||||
(mkdir directory)
|
(mkdir directory)
|
||||||
(copy-recursively #$source directory)
|
(copy-recursively #+source directory)
|
||||||
#t)
|
#t)
|
||||||
#$(if (string=? decompression-type "unzip")
|
#+(if (string=? decompression-type "unzip")
|
||||||
#~(zero? (system* "unzip" #$source))
|
#~(zero? (system* "unzip" #+source))
|
||||||
#~(zero? (system* (string-append #$tar "/bin/tar")
|
#~(zero? (system* (string-append #+tar "/bin/tar")
|
||||||
"xvf" #$source))))
|
"xvf" #+source))))
|
||||||
(let ((directory (first-file ".")))
|
(let ((directory (first-file ".")))
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"source is under '~a'~%" directory)
|
"source is under '~a'~%" directory)
|
||||||
(chdir directory)
|
(chdir directory)
|
||||||
|
|
||||||
(and (every apply-patch '#$patches)
|
(and (every apply-patch '#+patches)
|
||||||
#$@(if snippet
|
#+@(if snippet
|
||||||
#~((let ((module (make-fresh-user-module)))
|
#~((let ((module (make-fresh-user-module)))
|
||||||
(module-use-interfaces! module
|
(module-use-interfaces! module
|
||||||
(map resolve-interface
|
(map resolve-interface
|
||||||
'#$modules))
|
'#+modules))
|
||||||
((@ (system base compile) compile)
|
((@ (system base compile) compile)
|
||||||
'#$snippet
|
'#+snippet
|
||||||
#:to 'value
|
#:to 'value
|
||||||
#:opts %auto-compilation-options
|
#:opts %auto-compilation-options
|
||||||
#:env module)))
|
#:env module)))
|
||||||
#~())
|
#~())
|
||||||
|
|
||||||
(begin (chdir "..") #t)
|
(begin (chdir "..") #t)
|
||||||
(zero? (system* (string-append #$tar "/bin/tar")
|
(zero? (system* (string-append #+tar "/bin/tar")
|
||||||
"cvfa" #$output directory)))))))
|
"cvfa" #$output directory)))))))
|
||||||
|
|
||||||
(let ((name (tarxz-name original-file-name))
|
(let ((name (tarxz-name original-file-name))
|
||||||
|
@ -62,7 +62,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
|
|||||||
(svn-fetch '#$(svn-reference-url ref)
|
(svn-fetch '#$(svn-reference-url ref)
|
||||||
'#$(svn-reference-revision ref)
|
'#$(svn-reference-revision ref)
|
||||||
#$output
|
#$output
|
||||||
#:svn-command (string-append #$svn "/bin/svn"))))
|
#:svn-command (string-append #+svn "/bin/svn"))))
|
||||||
|
|
||||||
(mlet %store-monad ((guile (package->derivation guile system)))
|
(mlet %store-monad ((guile (package->derivation guile system)))
|
||||||
(gexp->derivation (or name "svn-checkout") build
|
(gexp->derivation (or name "svn-checkout") build
|
||||||
|
Loading…
Reference in New Issue
Block a user