Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.9 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchFromGitHub 5, setuptools-scm 6, substituteAll 7, cmake 8, boost 9, gmp 10, pybind11 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "blspy"; 16 version = "1.0.16"; 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-XABdS6CCUJpZ9N1Vra078V0HoDU32u1l3yz96ZKHwFc="; 22 }; 23 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 hash = "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 hash = "sha256-IQ1yGZo3nKHTqScUoq3i3Njxqvk7uW8hQ3GT0/SxGaw="; 47 }; 48 }) 49 ]; 50 51 nativeBuildInputs = [ cmake setuptools-scm ]; 52 53 buildInputs = [ boost gmp.static pybind11 ]; 54 55 pythonImportsCheck = [ 56 "blspy" 57 ]; 58 59 # Note: upstream testsuite is just a single test.py script outside of any framework 60 doCheck = false; 61 62 # CMake needs to be run by setuptools rather than by its hook 63 dontConfigure = true; 64 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 }; 71}