From 553df0b2fe3270d1e0ba4ae987bfe8387649cbfd Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Mon, 24 Nov 2025 18:37:10 +0000 Subject: [PATCH] (zilch nixpkgs): fix non-out derivations Change-Id: I542e0cb1f6a33261b9c4f1b620636c8c6a6a6964 --- core/src/nixpkgs.sld | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)