mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 11:44:07 +00:00
aa35823657
- Python ipfshttpclient is an optional dependency of this package, and python ipfshttpclient package is currently broken on darwin. - use passthru.optional-dependencies. - Update description and homepage. - Leave typing-extensions to upstream package conditonal logic. Co-authored-by: OTABI Tomoya <tomoya.otabi@gmail.com>
72 lines
1.3 KiB
Nix
72 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, aiohttp
|
|
, eth-abi
|
|
, eth-account
|
|
, eth-hash
|
|
, eth-typing
|
|
, eth-utils
|
|
, hexbytes
|
|
, ipfshttpclient
|
|
, jsonschema
|
|
, lru-dict
|
|
, protobuf
|
|
, requests
|
|
, websockets
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "web3";
|
|
version = "6.5.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ethereum";
|
|
repo = "web3.py";
|
|
rev = "v${version}";
|
|
hash = "sha256-RNWCZQjcse415SSNkHhMWckDcBJGFZnjisckF7gbYY8=";
|
|
};
|
|
|
|
# Note: to reflect the extra_requires in main/setup.py.
|
|
passthru.optional-dependencies = {
|
|
ipfs = [ ipfshttpclient ];
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
eth-abi
|
|
eth-account
|
|
eth-hash ] ++ eth-hash.optional-dependencies.pycryptodome ++ [
|
|
eth-typing
|
|
eth-utils
|
|
hexbytes
|
|
jsonschema
|
|
lru-dict
|
|
protobuf
|
|
requests
|
|
websockets
|
|
];
|
|
|
|
# TODO: package eth-tester required for tests
|
|
doCheck = false;
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py --replace "types-protobuf==3.19.13" "types-protobuf"
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"web3"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A python interface for interacting with the Ethereum blockchain and ecosystem";
|
|
homepage = "https://web3py.readthedocs.io/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ hellwolf ];
|
|
};
|
|
}
|