14 buildPythonPackage rec {
17 disabled = pythonOlder "3.7";
20 inherit pname version;
21 hash = "sha256-XABdS6CCUJpZ9N1Vra078V0HoDU32u1l3yz96ZKHwFc=";
25 # prevent CMake from trying to get libraries on the Internet
27 src = ./dont_fetch_dependencies.patch;
28 pybind11_src = pybind11.src;
29 relic_src = fetchFromGitHub {
30 owner = "Chia-Network";
32 rev = "215c69966cb78b255995f0ee9c86bbbb41c3c42b"; # pinned by blspy
33 hash = "sha256-wivK18Cp7BMZJvrYxJgSHInRZgFgsgSzd0YIy5IWoYA=";
35 sodium_src = fetchFromGitHub {
36 owner = "AmineKhaldi";
37 repo = "libsodium-cmake";
38 rev = "f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65"; # pinned by blspy
39 hash = "sha256-lGz7o6DQVAuEc7yTp8bYS2kwjzHwGaNjugDi1ruRJOA=";
40 fetchSubmodules = true;
42 catch2_src = fetchFromGitHub {
45 rev = "v3.0.0-preview5"; # pinned by blspy
46 hash = "sha256-IQ1yGZo3nKHTqScUoq3i3Njxqvk7uW8hQ3GT0/SxGaw=";
51 # ImportError: cannot import name 'setuptools' from 'setuptools'
52 # this is resolved in the next release, v2
54 substituteInPlace setup.py \
55 --replace "from setuptools import Extension, setup, setuptools" "from setuptools import Extension, setup"
58 nativeBuildInputs = [ cmake setuptools-scm ];
60 buildInputs = [ boost gmp.static pybind11 ];
62 pythonImportsCheck = [
66 # Note: upstream testsuite is just a single test.py script outside of any framework
69 # CMake needs to be run by setuptools rather than by its hook
73 description = "BLS signatures with aggregation";
74 homepage = "https://github.com/Chia-Network/bls-signatures/";
75 license = licenses.asl20;
76 maintainers = teams.chia.members;