diff --git a/guix/utils.scm b/guix/utils.scm index 5ec8f3736dbd870c103181ed50dd432957eaa995..453b3843ddff9e8774a25dd953d5f1bc61d5f8bd 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -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."