2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-01-20 10:41:00 +00:00
|
|
|
, cbor2
|
2022-10-06 18:32:54 +00:00
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, pycryptodome
|
2022-10-06 18:32:54 +00:00
|
|
|
, pythonOlder
|
|
|
|
, setuptools
|
2023-08-04 22:07:22 +00:00
|
|
|
, solc-select
|
2023-11-16 04:20:00 +00:00
|
|
|
, toml
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "crytic-compile";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.3.6";
|
2022-10-06 18:32:54 +00:00
|
|
|
format = "setuptools";
|
2020-11-06 00:33:48 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crytic";
|
|
|
|
repo = "crytic-compile";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-dQynnILHt6YO5qtvVVwcxRwtBJgokyfsQ5ubH15dkuA=";
|
2020-11-06 00:33:48 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
cbor2
|
|
|
|
pycryptodome
|
2022-10-06 18:32:54 +00:00
|
|
|
setuptools
|
2023-08-04 22:07:22 +00:00
|
|
|
solc-select
|
2023-11-16 04:20:00 +00:00
|
|
|
toml
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
# Test require network access
|
2020-11-06 00:33:48 +00:00
|
|
|
doCheck = false;
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# required for import check to work
|
|
|
|
# PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
|
|
|
|
env.HOME = "/tmp";
|
2022-10-06 18:32:54 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"crytic_compile"
|
|
|
|
];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Abstraction layer for smart contract build systems";
|
|
|
|
homepage = "https://github.com/crytic/crytic-compile";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/crytic/crytic-compile/releases/tag/${version}";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ arturcygan hellwolf ];
|
2020-11-06 00:33:48 +00:00
|
|
|
};
|
|
|
|
}
|