python3Packages.coincurve: fix build, modernize (#437071)
This commit is contained in:
@@ -38,6 +38,12 @@ let
|
||||
rev = "932366c9d4d8e487162b5c1b2a2d9693e24e0483";
|
||||
hash = "sha256-zOekPmP1zR/S+zxq/7OrEz24k8SInlsB+wJ8kPlmqe4=";
|
||||
};
|
||||
patches = [ ];
|
||||
preCheck = ''
|
||||
rm -rf src/coincurve
|
||||
# don't run benchmark tests
|
||||
rm tests/test_bench.py
|
||||
'';
|
||||
});
|
||||
bindir = linkFarm "bindir" (
|
||||
lib.mapAttrs (_: p: "${lib.getBin p}/bin") {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
|
||||
# build-system
|
||||
cmake,
|
||||
@@ -18,7 +19,6 @@
|
||||
|
||||
# checks
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -26,8 +26,6 @@ buildPythonPackage rec {
|
||||
version = "21.0.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ofek";
|
||||
repo = "coincurve";
|
||||
@@ -35,6 +33,14 @@ buildPythonPackage rec {
|
||||
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
|
||||
@@ -56,25 +62,17 @@ buildPythonPackage rec {
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user