about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2023-11-13 20:59:15 +0100
committerfricklerhandwerk <valentin@fricklerhandwerk.de>2023-11-13 20:59:33 +0100
commit0530d6bd0498e6f554cc9070a163ac9aec5819c8 (patch)
tree6f837c4557d651efcf9b74a9d030996c14f705bb /pkgs/build-support
parent2bbf67d3c76927b5c3148f32c0e93c14e5dbc2d9 (diff)
downloadnixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.tar
nixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.tar.gz
nixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.tar.bz2
nixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.tar.lz
nixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.tar.xz
nixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.tar.zst
nixlib-0530d6bd0498e6f554cc9070a163ac9aec5819c8.zip
doc: add explanatory code comment
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/mkshell/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/mkshell/default.nix b/pkgs/build-support/mkshell/default.nix
index 3517e949f67a..5369301ea105 100644
--- a/pkgs/build-support/mkshell/default.nix
+++ b/pkgs/build-support/mkshell/default.nix
@@ -16,6 +16,10 @@
 let
   mergeInputs = name:
     (attrs.${name} or [ ]) ++
+    # 1. get all `{build,nativeBuild,...}Inputs` from the elements of `inputsFrom`
+    # 2. since that is a list of lists, `flatten` that into a regular list
+    # 3. filter out of the result everything that's in `inputsFrom` itself
+    # this leaves actual dependencies of the derivations in `inputsFrom`, but never the derivations themselves
     (lib.subtractLists inputsFrom (lib.flatten (lib.catAttrs name inputsFrom)));
 
   rest = builtins.removeAttrs attrs [