aboutsummaryrefslogtreecommitdiff
path: root/tests/shell.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-05-18 15:07:30 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2021-06-22 19:15:57 +0200
commit3504c811a55ecd58e0712cf24829c67c192f5e80 (patch)
tree97d291caa783961a4c55e3d39c1fac0097de0f20 /tests/shell.nix
parentf1e281c4fe1263a0c848bc8aaf57a0e61a99fa93 (diff)
Add testcase for `nix develop` with `__structuredAttrs`
Diffstat (limited to 'tests/shell.nix')
-rw-r--r--tests/shell.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/shell.nix b/tests/shell.nix
index 24ebcc04c..53a32059b 100644
--- a/tests/shell.nix
+++ b/tests/shell.nix
@@ -8,6 +8,14 @@ let pkgs = rec {
for pkg in $buildInputs; do
export PATH=$PATH:$pkg/bin
done
+
+ # mimic behavior of stdenv for `$out` etc. for structured attrs.
+ if [ -n "''${ATTRS_SH_FILE}" ]; then
+ for o in "''${!outputs[@]}"; do
+ eval "''${o}=''${outputs[$o]}"
+ export "''${o}"
+ done
+ fi
'';
stdenv = mkDerivation {