python3Packages.slither-analyzer: cleanup, fix on darwin (#486564)

This commit is contained in:
Yt
2026-02-03 15:14:35 +00:00
committed by GitHub
@@ -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 = ''