diff --git a/core/src/nixpkgs.sld b/core/src/nixpkgs.sld index e4c3089..4088575 100644 --- a/core/src/nixpkgs.sld +++ b/core/src/nixpkgs.sld @@ -4,7 +4,7 @@ (scheme base) (scheme lazy) (scheme read) (zilch magic) (zilch nix drv) (zilch nix hash) (zilch nix path) (zilch zexpr) - (srfi 18) (srfi 128) (srfi 146) + (srfi 18) (srfi 128) (srfi 146) (srfi 152) (chicken format) (chicken process) json) (export nix-prefetch-url nixpkgs nixpkgs-eval @@ -33,6 +33,10 @@ (define thread (thread-start! (make-thread (lambda () (run-stderr-thread (string-append path) stderr)) "read-from-nixpkgs-raw stderr passthrough"))) (close-port stdin) (define drvpath (read-line stdout)) + ; If we get a /nix/store/[...].drv![output name]: remove the suffix. + (let ((loc (string-contains drvpath "!"))) + (when loc + (set! drvpath (string-copy drvpath 0 loc)))) (define-values (_ _ _) (process-wait pid #t)) (close-port stdout) drvpath)