nix-direnv/tests/testenv/shell.nix
2023-01-16 14:06:09 +01:00

14 lines
327 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"; }; };
}