diff --git a/pkgs/development/python-modules/slither-analyzer/default.nix b/pkgs/development/python-modules/slither-analyzer/default.nix index 045574b56631..2f53803f885c 100644 --- a/pkgs/development/python-modules/slither-analyzer/default.nix +++ b/pkgs/development/python-modules/slither-analyzer/default.nix @@ -1,16 +1,27 @@ { lib, buildPythonPackage, - crytic-compile, fetchFromGitHub, + + # build-system hatchling, + + # nativeBuildInputs makeWrapper, + + # dependencies + crytic-compile, packaging, prettytable, - solc, - testers, - versionCheckHook, web3, + + # tests + versionCheckHook, + writableTmpDirAsHomeHook, + + # postFixup + solc, + withSolc ? false, }: @@ -37,18 +48,17 @@ buildPythonPackage (finalAttrs: { web3 ]; - nativeInstallCheckInputs = [ versionCheckHook ]; + nativeCheckInputs = [ + versionCheckHook + writableTmpDirAsHomeHook + ]; + versionCheckKeepEnvironment = [ "HOME" ]; postFixup = lib.optionalString withSolc '' wrapProgram $out/bin/slither \ --prefix PATH : "${lib.makeBinPath [ solc ]}" ''; - # required for pythonImportsCheck - postInstall = '' - export HOME="$TEMP" - ''; - pythonImportsCheck = [ "slither" "slither.all_exceptions" @@ -66,8 +76,6 @@ buildPythonPackage (finalAttrs: { "slither.vyper_parsing" ]; - doInstallCheck = true; - meta = { description = "Static Analyzer for Solidity"; longDescription = ''