3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/blspy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.8 KiB
Nix
Raw Normal View History

2021-05-09 15:30:13 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, setuptools-scm
, substituteAll
, cmake
, boost
, gmp
, pybind11
, pythonOlder
}:
buildPythonPackage rec {
pname = "blspy";
2022-02-11 15:06:58 +00:00
version = "1.0.9";
2021-05-09 15:30:13 +01:00
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
2022-02-11 15:06:58 +00:00
hash = "sha256-6keimQqwh37G9xc1Xyxlr+0n9Qgv87Np2D7Gzj6ik5Y=";
2021-05-09 15:30:13 +01:00
};
patches = [
# prevent CMake from trying to get libraries on the Internet
(substituteAll {
src = ./dont_fetch_dependencies.patch;
pybind11_src = pybind11.src;
relic_src = fetchFromGitHub {
2022-04-21 17:18:49 +01:00
owner = "Chia-Network";
2021-05-09 15:30:13 +01:00
repo = "relic";
2022-04-21 17:18:49 +01:00
rev = "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7"; # pinned by blspy
hash = "sha256-IfTD8DvTEXeLUoKe4Ejafb+PEJW5DV/VXRYuutwGQHU=";
2021-05-09 15:30:13 +01:00
};
2021-09-10 14:07:34 +01:00
sodium_src = fetchFromGitHub {
owner = "AmineKhaldi";
repo = "libsodium-cmake";
rev = "f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65"; # pinned by blspy
sha256 = "sha256-lGz7o6DQVAuEc7yTp8bYS2kwjzHwGaNjugDi1ruRJOA=";
fetchSubmodules = true;
};
2021-12-15 01:11:21 +00:00
catch2_src = fetchFromGitHub {
owner = "catchorg";
repo = "Catch2";
rev = "v2.13.7"; # pinned by blspy
sha256 = "NhZ8Hh7dka7KggEKKZyEbIZahuuTYeCT7cYYSUvkPzI=";
};
2021-11-02 10:31:42 +00:00
})
2021-05-09 15:30:13 +01:00
];
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;
};
}