python313Packages.publicsuffixlist: 1.0.2.20250122 -> 1.0.2.20250124 (#376319)
[NixPkgs.git] / pkgs / development / python-modules / coincurve / default.nix
blob01d8b292cbef555c6641d275f0f1777873c814b9
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   cmake,
8   hatchling,
9   ninja,
10   pkg-config,
11   setuptools,
12   scikit-build-core,
14   # dependencies
15   asn1crypto,
16   cffi,
17   secp256k1,
19   # checks
20   pytestCheckHook,
21   pythonOlder,
24 buildPythonPackage rec {
25   pname = "coincurve";
26   version = "20.0.0";
27   pyproject = true;
29   disabled = pythonOlder "3.7";
31   src = fetchFromGitHub {
32     owner = "ofek";
33     repo = "coincurve";
34     tag = "v${version}";
35     hash = "sha256-NKx/iLuzFEu1UBuwa14x55Ab3laVAKEtX6dtoWi0dOg=";
36   };
38   build-system = [
39     hatchling
40     cffi
41     cmake
42     ninja
43     pkg-config
44     setuptools
45     scikit-build-core
46   ];
48   dontUseCmakeConfigure = true;
50   env.COINCURVE_IGNORE_SYSTEM_LIB = "OFF";
52   buildInputs = [ secp256k1 ];
54   dependencies = [
55     asn1crypto
56     cffi
57   ];
59   preCheck = ''
60     # https://github.com/ofek/coincurve/blob/master/tox.ini#L20-L22=
61     rm -rf coincurve
63     # don't run benchmark tests
64     rm tests/test_bench.py
65   '';
67   nativeCheckInputs = [ pytestCheckHook ];
69   pythonImportsCheck = [ "coincurve" ];
71   meta = with lib; {
72     description = "Cross-platform bindings for libsecp256k1";
73     homepage = "https://github.com/ofek/coincurve";
74     license = with licenses; [
75       asl20
76       mit
77     ];
78     maintainers = [ ];
79   };