nixpkgs-suyu/pkgs/development/python-modules/chiavdf/default.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-09 10:08:39 +02:00
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, setuptools-scm
, substituteAll
, cmake
, boost
, gmp
, pybind11
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "chiavdf";
2021-08-27 11:42:03 +02:00
version = "1.0.3";
2021-05-09 10:08:39 +02:00
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
2021-08-27 11:42:03 +02:00
hash = "sha256-XbmK7ZJnUy3Zg9XWt0t/Qb2k5qIlu4vIbxdDFYFjFPI=";
2021-05-09 10:08:39 +02:00
};
patches = [
# prevent CMake from trying to get libraries on the Internet
(substituteAll {
src = ./dont_fetch_dependencies.patch;
pybind11_src = pybind11.src;
})
];
# x86 instructions are needed for this component
BUILD_VDF_CLIENT = lib.optionalString (!stdenv.isx86_64) "N";
nativeBuildInputs = [ cmake setuptools-scm ];
buildInputs = [ boost gmp pybind11 ];
checkInputs = [
pytestCheckHook
];
# CMake needs to be run by setuptools rather than by its hook
dontConfigure = true;
meta = with lib; {
description = "Chia verifiable delay function utilities";
homepage = "https://www.chia.net/";
license = licenses.asl20;
maintainers = teams.chia.members;
};
}