nixpkgs-suyu/pkgs/development/python-modules/eth-account/default.nix
Martin Weinelt 0215034f25 python3.pkgs: Migrate fetchers to use hash
when they already rely on SRI hashes.
2023-03-03 23:59:29 +01:00

54 lines
1,008 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, bitarray
, eth-abi
, eth-keyfile
, eth-keys
, eth-rlp
, eth-utils
, hexbytes
, pythonOlder
, rlp
}:
buildPythonPackage rec {
pname = "eth-account";
version = "0.6.1";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ethereum";
repo = "eth-account";
rev = "v${version}";
hash = "sha256-cjQvTKC4lDbKnAvbmnTGHQiJZsZFhXc/+UH5rUdlGxs=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "bitarray>=1.2.1,<1.3.0" "bitarray>=2.4.0,<3"
'';
propagatedBuildInputs = [
bitarray
eth-abi
eth-keyfile
eth-keys
eth-rlp
eth-utils
hexbytes
rlp
];
# require buildinga npm project
doCheck = false;
pythonImportsCheck = [ "eth_account" ];
meta = with lib; {
description = "Account abstraction library for web3.py";
homepage = "https://github.com/ethereum/eth-account";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}