diff --git a/pkgs/development/python-modules/scancode-toolkit/default.nix b/pkgs/development/python-modules/scancode-toolkit/default.nix index bd89b5a31047..089c4af137e1 100644 --- a/pkgs/development/python-modules/scancode-toolkit/default.nix +++ b/pkgs/development/python-modules/scancode-toolkit/default.nix @@ -55,6 +55,7 @@ typecode, typecode-libmagic, urlpy, + writableTmpDirAsHomeHook, xmltodict, zipp, }: @@ -130,12 +131,13 @@ buildPythonPackage rec { ] ++ lib.optionals (pythonOlder "3.9") [ zipp ]; + nativeBuildInputs = [ + writableTmpDirAsHomeHook + ]; + nativeCheckInputs = [ pytestCheckHook ]; - # Importing scancode needs a writeable home, and preCheck happens in between - # pythonImportsCheckPhase and pytestCheckPhase. postInstall = '' - export HOME=$(mktemp -d) ''; pythonImportsCheck = [ "scancode" ];