Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slither-analyzer by upgrading its python dependencies | slither-analyzer: 0.10.1 -> 0.10.2 #298687

Merged
merged 7 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions pkgs/development/python-modules/eth-keyfile/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, eth-keys
, eth-utils
, pycryptodome
Expand All @@ -10,22 +11,19 @@

buildPythonPackage rec {
pname = "eth-keyfile";
version = "0.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
version = "0.8.0";
pyproject = true;
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "ethereum";
repo = "eth-keyfile";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-JD4bRoD9L0JXcd+bTZrq/BkWw5QGzOi1RvoyLJC77kk=";
hash = "sha256-797yhHuU9/lm96YKxl3SZ5IQAwDxDSYkLkiBdAHh0Uk=";
};

postPatch = ''
substituteInPlace setup.py \
--replace "'setuptools-markdown'" ""
'';
build-system = [ setuptools];

propagatedBuildInputs = [
eth-keys
Expand Down
11 changes: 7 additions & 4 deletions pkgs/development/python-modules/eth-keys/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, asn1tools
, coincurve
, eth-hash
Expand All @@ -16,17 +17,19 @@

buildPythonPackage rec {
pname = "eth-keys";
version = "0.4.0";
format = "setuptools";
disabled = pythonOlder "3.6";
version = "0.5.0";
pyproject = true;
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "ethereum";
repo = "eth-keys";
rev = "v${version}";
hash = "sha256-jG/jJPM4t3z6UQIdc8L6y0DxZiGx5pVuGL8XwbIt60o=";
hash = "sha256-vyyaLCG2uIHXX0t93DmFq8/u0rZL+nsBsH2gfgjziyo=";
};

build-system = [ setuptools];

propagatedBuildInputs = [
eth-typing
eth-utils
Expand Down
11 changes: 7 additions & 4 deletions pkgs/development/python-modules/eth-rlp/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, eth-hash
, eth-utils
, hexbytes
Expand All @@ -11,17 +12,19 @@

buildPythonPackage rec {
pname = "eth-rlp";
version = "0.3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
version = "2.1.0";
pyproject = true;
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "ethereum";
repo = "eth-rlp";
rev = "v${version}";
hash = "sha256-wfmRjHFu6H3J6hNin8ZA2454xXrLgcUdeR8iGXFomRE=";
hash = "sha256-FTqIutndf+epmO5XNEUoRAUEmn299aTLIZNe5SMcxAQ=";
};

build-system = [ setuptools];

propagatedBuildInputs = [
hexbytes
eth-utils
Expand Down
12 changes: 7 additions & 5 deletions pkgs/development/python-modules/hexbytes/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, eth-utils
, hypothesis
, pytestCheckHook
Expand All @@ -9,18 +10,19 @@

buildPythonPackage rec {
pname = "hexbytes";
version = "0.3.1";
format = "setuptools";

disabled = pythonOlder "3.7";
version = "1.2.0";
pyproject = true;
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "ethereum";
repo = "hexbytes";
rev = "refs/tags/v${version}";
hash = "sha256-19oY/VPP6qkxHCkIgpC28fOOYKEYcNbVVGoHJmMmOl8=";
hash = "sha256-8st1nQiGApt+aNl8/cftYk0ZzA+MxbLyGi53UWUlAjM=";
};

build-system = [ setuptools];

nativeCheckInputs = [
eth-utils
hypothesis
Expand Down
12 changes: 5 additions & 7 deletions pkgs/development/python-modules/rlp/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, setuptools
, buildPythonPackage
, eth-utils
, hypothesis
Expand All @@ -8,20 +9,17 @@

buildPythonPackage rec {
pname = "rlp";
version = "3.0.0";
format = "setuptools";
version = "4.0.0";
pyproject = true;

src = fetchFromGitHub {
owner = "ethereum";
repo = "pyrlp";
rev = "v${version}";
hash = "sha256-GRCq4FU38e08fREg5fweig5Y60jLT2k3Yj1Jk8OA6XY=";
hash = "sha256-cRp+ZOPYs9kcqMKGaiYMOFBY+aPCyFqu+1/5wloLwqU=";
};

postPatch = ''
substituteInPlace setup.py \
--replace "'setuptools-markdown'" ""
'';
build-system = [ setuptools];

propagatedBuildInputs = [
eth-utils
Expand Down
27 changes: 16 additions & 11 deletions pkgs/development/python-modules/slither-analyzer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
, packaging
, prettytable
, pythonOlder
, setuptools
, setuptools-scm
, solc
, web3
, withSolc ? false
Expand All @@ -17,7 +17,7 @@

buildPythonPackage rec {
pname = "slither-analyzer";
version = "0.10.1";
version = "0.10.2";
pyproject = true;

disabled = pythonOlder "3.8";
Expand All @@ -26,12 +26,12 @@ buildPythonPackage rec {
owner = "crytic";
repo = "slither";
rev = "refs/tags/${version}";
hash = "sha256-MjO2ZYFat+byH0DEt2v/wPXaYL2lmlESgQCZXD4Jpt0=";
hash = "sha256-KmbmljtmMtrJxgSMJjQ8fdk6RpEXcAVBuo24EsyMV8k=";
};

nativeBuildInputs = [
makeWrapper
setuptools
setuptools-scm
];

propagatedBuildInputs = [
Expand Down Expand Up @@ -68,14 +68,19 @@ buildPythonPackage rec {
"slither.vyper_parsing"
];

# No Python tests
doCheck = false;
# Test if the binary works during the build phase.
checkPhase = ''
runHook preCheck

passthru.tests = {
version = testers.testVersion {
package = slither-analyzer;
command = "HOME=$TMPDIR slither --version";
};
HOME="$TEMP" $out/bin/slither --version
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved

runHook postCheck
'';

passthru.tests.version = testers.testVersion {
package = slither-analyzer;
command = "HOME=$TMPDIR slither --version";
version = "${version}";
};

meta = with lib; {
Expand Down