diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/chiavdf/default.nix | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/chiavdf/default.nix')
| -rw-r--r-- | pkgs/development/python-modules/chiavdf/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/chiavdf/default.nix b/pkgs/development/python-modules/chiavdf/default.nix new file mode 100644 index 000000000000..deb7d21adc76 --- /dev/null +++ b/pkgs/development/python-modules/chiavdf/default.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, setuptools-scm +, substituteAll +, cmake +, boost +, gmp +, pybind11 +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "chiavdf"; + version = "1.0.1"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-z0od/VrH580+9641lKNI7jbVMlJZKCWnoT+GljnFxmU="; + }; + + 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; + }; +} |
