From 190b1f6fbec02525a2520c2313d20b5cb27f8077 Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Tue, 26 Aug 2025 04:05:12 -0600 Subject: [PATCH 1/2] python3Packages.coincurve: fix build, modernize --- .../python-modules/coincurve/default.nix | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/coincurve/default.nix b/pkgs/development/python-modules/coincurve/default.nix index d70b8a020255..7fcc967932ac 100644 --- a/pkgs/development/python-modules/coincurve/default.nix +++ b/pkgs/development/python-modules/coincurve/default.nix @@ -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 ]; }; } From f688ab8422c78678a55a14a336273abf265a31b1 Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Tue, 26 Aug 2025 04:41:15 -0600 Subject: [PATCH 2/2] basicswap: fix build --- pkgs/by-name/ba/basicswap/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ba/basicswap/package.nix b/pkgs/by-name/ba/basicswap/package.nix index cf66255cd150..b075824140ad 100644 --- a/pkgs/by-name/ba/basicswap/package.nix +++ b/pkgs/by-name/ba/basicswap/package.nix @@ -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") {