+46
doc/build-helpers/dev-shell-tools.chapter.md
+46
doc/build-helpers/dev-shell-tools.chapter.md
···+## `devShellTools.unstructuredDerivationInputEnv` {#sec-devShellTools-unstructuredDerivationInputEnv}+Convert a set of derivation attributes (as would be passed to [`derivation`]) to a set of environment variables that can be used in a shell script.+Note that `args` is not included, because Nix does not added it to the builder process environment.+Takes the relevant parts of a derivation and returns a set of environment variables, that would be present in the derivation.
+1
nixos/tests/all-tests.nix
+1
nixos/tests/all-tests.nix
···docker-tools-cross = handleTestOn ["x86_64-linux" "aarch64-linux"] ./docker-tools-cross.nix {};
+95
nixos/tests/docker-tools-nix-shell.nix
+95
nixos/tests/docker-tools-nix-shell.nix
···+"docker run --rm nix-shell-basic bash -c 'buildDerivation && $out/bin/hello' | grep '^Hello, world!$'"
+1
-67
nixos/tests/docker-tools.nix
+1
-67
nixos/tests/docker-tools.nix
······docker.succeed("docker run --rm image-with-certs:latest test -r /etc/pki/tls/certs/ca-bundle.crt")-"docker run --rm nix-shell-basic bash -c 'buildDerivation && $out/bin/hello' | grep '^Hello, world!$'"···
+50
-1
pkgs/build-support/dev-shell-tools/default.nix
+50
-1
pkgs/build-support/dev-shell-tools/default.nix
······+# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L992-L1004+lib.genAttrs outputList (output: builtins.unsafeDiscardStringContext outputMap.${output}.outPath);
+122
-2
pkgs/build-support/dev-shell-tools/tests/default.nix
+122
-2
pkgs/build-support/dev-shell-tools/tests/default.nix
······+''${args:+fail "args should not be set by Nix. We don't expect it to and unstructuredDerivationInputEnv removes it."}+# This would break the derivation. Instead, we have a check in the derivation to make sure Nix doesn't set it.
+16
-29
pkgs/build-support/docker/default.nix
+16
-29
pkgs/build-support/docker/default.nix
···-, # The path to the bash binary to use as the shell. See `NIX_BUILD_SHELL` in `man nix-shell`-, # Run this command in the environment of the derivation, in an interactive shell. See `--command` in `man nix-shell`-, # Same as `command`, but runs the command in a non-interactive shell instead. See `--run` in `man nix-shell`"streamNixShellImage: Does not work with the derivation ${drv.name} because it uses __structuredAttrs";···-# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L992-L1004-lib.genAttrs drv.outputs (output: builtins.unsafeDiscardStringContext drv.${output}.outPath);···