nixpkgs/pkgs/development/python-modules/chiavdf/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

55 lines
1.1 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, setuptools-scm
, substituteAll
, cmake
, boost
, gmp
, pybind11
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "chiavdf";
version = "1.0.8";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-ilT7tCdX8ak3qmpXJ0LITf0ZGAdFSN4tm6GKw06A/m8=";
};
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 ];
nativeCheckInputs = [
pytestCheckHook
];
# CMake needs to be run by setuptools rather than by its hook
dontConfigure = true;
meta = with lib; {
broken = stdenv.isDarwin;
description = "Chia verifiable delay function utilities";
homepage = "https://www.chia.net/";
license = licenses.asl20;
maintainers = teams.chia.members;
};
}