python3Packages.coincurve: fix build, modernize

Changed files
+12 -14
pkgs
development
python-modules
coincurve
+12 -14
pkgs/development/python-modules/coincurve/default.nix
···
lib,
buildPythonPackage,
fetchFromGitHub,
+
fetchpatch,
# build-system
cmake,
···
# checks
pytestCheckHook,
-
pythonOlder,
}:
buildPythonPackage rec {
pname = "coincurve";
version = "21.0.0";
pyproject = true;
-
-
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ofek";
···
hash = "sha256-+8/CsV2BTKZ5O2LIh5/kOKMfFrkt2Jsjuj37oiOgO6Y=";
};
+
patches = [
+
# Build requires cffi LICENSE files
+
(fetchpatch {
+
url = "https://github.com/ofek/coincurve/commit/19597b0869803acfc669d916e43c669e9ffcced7.patch";
+
hash = "sha256-BkUxXjcwk3btcvSVaVZqVTJ+8E8CYtT5cTXLx9lxJ/g=";
+
})
+
];
+
build-system = [
hatchling
cffi
···
cffi
];
-
preCheck = ''
-
# https://github.com/ofek/coincurve/blob/master/tox.ini#L20-L22=
-
rm -rf coincurve
-
-
# don't run benchmark tests
-
rm tests/test_bench.py
-
'';
-
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "coincurve" ];
-
meta = with lib; {
+
meta = {
description = "Cross-platform bindings for libsecp256k1";
homepage = "https://github.com/ofek/coincurve";
-
license = with licenses; [
+
license = with lib.licenses; [
asl20
mit
];
-
maintainers = [ ];
+
maintainers = with lib.maintainers; [ ryand56 ];
};
}