Skip to content

Commit 16f82f0

Browse files
committed
Fix python build failures for the -env.
Querying the .drvPath causes nix to try and build arp-util, python3.11-setuptools, setuptools-build-hook, scons, serf, llvm, clang, libredirect, subversion, and openssh.
1 parent d9fc929 commit 16f82f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flake.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,15 @@
187187
} "touch $out";
188188
} // (pkgs.lib.mapAttrs' (name: drv:
189189
pkgs.lib.nameValuePair "${name}-env" (
190+
# We need to use unsafeDiscardOutputDependency here, as it will otherwise
191+
# pull in a bunch of dependenceis we don't care about at all from the .drvPath
192+
# query.
190193
let env = pkgs.runCommand "${name}-env.sh" {
191194
requiredSystemFeatures = [ "recursive-nix" ];
192195
nativeBuildInputs = [ pkgs.nix ];
193196
} ''
194197
nix --offline --extra-experimental-features "nix-command flakes" \
195-
print-dev-env ${drv.drvPath} >> $out
198+
print-dev-env ${builtins.unsafeDiscardOutputDependency drv.drvPath} >> $out
196199
'';
197200
# this needs to be linux. It would be great if we could have this
198201
# eval platform agnostic, but flakes don't permit this. A the

0 commit comments

Comments
 (0)