nix-direnv/tests/testenv/shell.nix
2023-11-29 07:34:23 +01:00

14 lines
331 B
Nix

{ pkgs ? import (builtins.getFlake (toString ./.)).inputs.nixpkgs { }
, someArg ? null
, shellHook ? ''
echo "Executing shellHook."
''
}:
pkgs.mkShellNoCC {
inherit shellHook;
nativeBuildInputs = [ pkgs.hello ];
SHOULD_BE_SET = someArg;
passthru = { subshell = pkgs.mkShellNoCC { THIS_IS_A_SUBSHELL = "OK"; }; };
}