Commit 8cffeac1 authored by jopejoe1's avatar jopejoe1
Browse files

python3Packages.scancode-toolkit: make use of writableTmpDirAsHomeHook

parent c5f7acaa
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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" ];