diff --git a/pkgs/by-name/aw/awscli2/package.nix b/pkgs/by-name/aw/awscli2/package.nix index aa3a114c9d32..6eace0a32db7 100644 --- a/pkgs/by-name/aw/awscli2/package.nix +++ b/pkgs/by-name/aw/awscli2/package.nix @@ -10,6 +10,8 @@ nix-update-script, testers, awscli2, + addBinToPathHook, + writableTmpDirAsHomeHook, }: let @@ -121,9 +123,11 @@ py.pkgs.buildPythonApplication rec { ]; nativeCheckInputs = with py.pkgs; [ + addBinToPathHook jsonschema mock pytestCheckHook + writableTmpDirAsHomeHook ]; postInstall = @@ -136,11 +140,6 @@ py.pkgs.buildPythonApplication rec { rm $out/bin/aws.cmd ''; - preCheck = '' - export PATH=$PATH:$out/bin - export HOME=$(mktemp -d) - ''; - # Propagating dependencies leaks them through $PYTHONPATH which causes issues # when used in nix-shell. postFixup = ''