diff options
author | Louis Bettens <louis@bettens.info> | 2021-05-09 16:30:13 +0200 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-05-19 14:10:03 -0700 |
commit | ffdf830cdde81cde4b4c2b72bd344dc2e57a7680 (patch) | |
tree | 87edd4e7f668f254e2ce824fed2e2bdb26f0cf88 /pkgs/development/python-modules/blspy/default.nix | |
parent | d4fdd9a19cf149ea4009bb344f4100930ad39ff1 (diff) | |
download | nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.tar nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.tar.gz nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.tar.bz2 nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.tar.lz nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.tar.xz nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.tar.zst nixpkgs-ffdf830cdde81cde4b4c2b72bd344dc2e57a7680.zip |
pythonPackages.blspy: init at 1.0.2
Diffstat (limited to 'pkgs/development/python-modules/blspy/default.nix')
-rw-r--r-- | pkgs/development/python-modules/blspy/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/blspy/default.nix b/pkgs/development/python-modules/blspy/default.nix new file mode 100644 index 00000000000..e75e474bdab --- /dev/null +++ b/pkgs/development/python-modules/blspy/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchFromGitHub +, setuptools-scm +, substituteAll +, cmake +, boost +, gmp +, pybind11 +, pythonOlder +}: + +buildPythonPackage rec { + pname = "blspy"; + version = "1.0.2"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-N1mk83uZrzSty2DyXfKiVp85z/jmztiUSRXKfNBRJV4="; + }; + + patches = [ + # prevent CMake from trying to get libraries on the Internet + (substituteAll { + src = ./dont_fetch_dependencies.patch; + pybind11_src = pybind11.src; + relic_src = fetchFromGitHub { + owner = "relic-toolkit"; + repo = "relic"; + rev = "1885ae3b681c423c72b65ce1fe70910142cf941c"; # pinned by blspy + hash = "sha256-tsSZTcssl8t7Nqdex4BesgQ+ACPgTdtHnJFvS9josN0="; + }; + }) + ]; + + nativeBuildInputs = [ cmake setuptools-scm ]; + + buildInputs = [ boost gmp.static pybind11 ]; + + pythonImportsCheck = [ + "blspy" + ]; + + # Note: upstream testsuite is just a single test.py script outside of any framework + doCheck = false; + + # CMake needs to be run by setuptools rather than by its hook + dontConfigure = true; + + meta = with lib; { + description = "BLS signatures with aggregation"; + homepage = "https://github.com/Chia-Network/bls-signatures/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} |