1{ lib
2, buildPythonPackage
3, cbor2
4, fetchFromGitHub
5, pycryptodome
6, pythonOlder
7, setuptools
8, solc-select
9}:
10
11buildPythonPackage rec {
12 pname = "crytic-compile";
13 version = "0.3.4";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "crytic";
20 repo = "crytic-compile";
21 rev = "refs/tags/${version}";
22 hash = "sha256-CeoACtgvMweDbIvYguK2Ca+iTBFONWcE2b0qUkBbQSU=";
23 };
24
25 propagatedBuildInputs = [
26 cbor2
27 pycryptodome
28 setuptools
29 solc-select
30 ];
31
32 # Test require network access
33 doCheck = false;
34
35 # required for import check to work
36 # PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
37 env.HOME = "/tmp";
38 pythonImportsCheck = [
39 "crytic_compile"
40 ];
41
42 meta = with lib; {
43 description = "Abstraction layer for smart contract build systems";
44 homepage = "https://github.com/crytic/crytic-compile";
45 changelog = "https://github.com/crytic/crytic-compile/releases/tag/${version}";
46 license = licenses.agpl3Plus;
47 maintainers = with maintainers; [ arturcygan hellwolf ];
48 };
49}