2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
|
|
|
, eth-abi
|
|
|
|
, eth-account
|
|
|
|
, eth-hash
|
|
|
|
, eth-typing
|
|
|
|
, eth-utils
|
|
|
|
, eth-rlp
|
|
|
|
, hexbytes
|
|
|
|
, ipfshttpclient
|
|
|
|
, jsonschema
|
|
|
|
, lru-dict
|
|
|
|
, protobuf
|
|
|
|
, requests
|
|
|
|
, typing-extensions
|
|
|
|
, websockets
|
|
|
|
# , eth-tester
|
|
|
|
# , py-geth
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonRelaxDepsHook
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "web3";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "5.31.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ethereum";
|
|
|
|
repo = "web3.py";
|
|
|
|
rev = "v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
hash = "sha256-YsAbPI9Y6z+snKZ9NsA0YSpB38n+ra4+Ei6COYFe8v4=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
eth-abi
|
|
|
|
eth-account
|
|
|
|
eth-hash
|
|
|
|
eth-rlp
|
|
|
|
eth-typing
|
|
|
|
eth-utils
|
|
|
|
hexbytes
|
|
|
|
ipfshttpclient
|
|
|
|
jsonschema
|
|
|
|
lru-dict
|
|
|
|
protobuf
|
|
|
|
requests
|
|
|
|
websockets
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
2022-10-21 18:38:19 +00:00
|
|
|
typing-extensions
|
|
|
|
] ++ eth-hash.optional-dependencies.pycryptodome;
|
|
|
|
|
|
|
|
pythonRelaxDeps = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
# TODO: package eth-tester
|
|
|
|
#checkInputs = [
|
|
|
|
# eth-tester
|
|
|
|
# eth-tester.optional-dependencies.py-evm
|
|
|
|
# py-geth
|
|
|
|
# pytestCheckHook
|
|
|
|
#];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"web3"
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Web3 library for interactions";
|
|
|
|
homepage = "https://github.com/ethereum/web3";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ raitobezarius ];
|
|
|
|
};
|
|
|
|
}
|