mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
Have `%nixpkgs-directory' default to #f when $NIXPKGS is the empty string.
* guix/utils.scm (%nixpkgs-directory): Set to #f when the `NIXPKGS' environment variable is set but empty. Reported by Andreas Enge <andreas@enge.fr>.
This commit is contained in:
parent
836676450d
commit
a09ec3a5af
1 changed files with 9 additions and 1 deletions
|
@ -156,7 +156,15 @@ (define sha256
|
|||
(define %nixpkgs-directory
|
||||
(make-parameter
|
||||
;; Capture the build-time value of $NIXPKGS.
|
||||
(or %nixpkgs (getenv "NIXPKGS"))))
|
||||
(or %nixpkgs
|
||||
(and=> (getenv "NIXPKGS")
|
||||
(lambda (val)
|
||||
;; Bail out when passed an empty string, otherwise
|
||||
;; `nix-instantiate' will sit there and attempt to read
|
||||
;; from its standard input.
|
||||
(if (string=? val "")
|
||||
#f
|
||||
val))))))
|
||||
|
||||
(define* (nixpkgs-derivation attribute #:optional (system (%current-system)))
|
||||
"Return the derivation path of ATTRIBUTE in Nixpkgs."
|
||||
|
|
Loading…
Reference in a new issue