ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / blspy / default.nix
blobd4122dddc8bc1076b7a2da67b908a8a1d0f3d464
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , fetchFromGitHub
5 , setuptools-scm
6 , substituteAll
7 , cmake
8 , boost
9 , gmp
10 , pybind11
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "blspy";
16   version = "1.0.13";
17   disabled = pythonOlder "3.7";
19   src = fetchPypi {
20     inherit pname version;
21     hash = "sha256-feuHVtBgjzGBjY1eSKh47feTT8prdkSwvs993lJSSiI=";
22   };
24   patches = [
25     # prevent CMake from trying to get libraries on the Internet
26     (substituteAll {
27       src = ./dont_fetch_dependencies.patch;
28       pybind11_src = pybind11.src;
29       relic_src = fetchFromGitHub {
30         owner = "Chia-Network";
31         repo = "relic";
32         rev = "215c69966cb78b255995f0ee9c86bbbb41c3c42b"; # pinned by blspy
33         hash = "sha256-wivK18Cp7BMZJvrYxJgSHInRZgFgsgSzd0YIy5IWoYA=";
34       };
35       sodium_src = fetchFromGitHub {
36         owner = "AmineKhaldi";
37         repo = "libsodium-cmake";
38         rev = "f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65"; # pinned by blspy
39         sha256 = "sha256-lGz7o6DQVAuEc7yTp8bYS2kwjzHwGaNjugDi1ruRJOA=";
40         fetchSubmodules = true;
41       };
42       catch2_src = fetchFromGitHub {
43         owner = "catchorg";
44         repo = "Catch2";
45         rev = "v3.0.0-preview5"; # pinned by blspy
46         sha256 = "sha256-IQ1yGZo3nKHTqScUoq3i3Njxqvk7uW8hQ3GT0/SxGaw=";
47       };
48     })
49   ];
51   nativeBuildInputs = [ cmake setuptools-scm ];
53   buildInputs = [ boost gmp.static pybind11 ];
55   pythonImportsCheck = [
56     "blspy"
57   ];
59   # Note: upstream testsuite is just a single test.py script outside of any framework
60   doCheck = false;
62   # CMake needs to be run by setuptools rather than by its hook
63   dontConfigure = true;
65   meta = with lib; {
66     description = "BLS signatures with aggregation";
67     homepage = "https://github.com/Chia-Network/bls-signatures/";
68     license = licenses.asl20;
69     maintainers = teams.chia.members;
70   };