From 2baff274c456e8bea704e0a2cb53dea2f7f945d9 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sat, 14 Sep 2024 18:55:46 +0000 Subject: [PATCH] update nixpkgs btcpayserver: 1.13.1 -> 1.13.5 clightning: 24.05 -> 24.08 lnd: 0.18.2-beta -> 0.18.3-beta nbxplorer: 2.5.2 -> 2.5.6 --- flake.lock | 12 +-- pkgs/pinned.nix | 10 +- pkgs/python-packages/default.nix | 5 +- pkgs/python-packages/pyln-proto/default.nix | 6 -- .../coincurve_20/default.nix | 87 +++++++++++++++++ .../scikit-build-core_0_10/default.nix | 97 +++++++++++++++++++ test/nixos-search/flake.lock | 18 ++-- 7 files changed, 208 insertions(+), 27 deletions(-) create mode 100644 pkgs/python-packages/specific-versions/coincurve_20/default.nix create mode 100644 pkgs/python-packages/specific-versions/scikit-build-core_0_10/default.nix diff --git a/flake.lock b/flake.lock index 93e27cd..c6923ac 100644 --- a/flake.lock +++ b/flake.lock @@ -43,11 +43,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1724316499, - "narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=", + "lastModified": 1726062281, + "narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841", + "rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8", "type": "github" }, "original": { @@ -59,11 +59,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1724395761, - "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", + "lastModified": 1726206720, + "narHash": "sha256-tI7141IHDABMNgz4iXDo8agCp0SeTLbaIZ2DRndwcmk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", + "rev": "673d99f1406cb09b8eb6feab4743ebdf70046557", "type": "github" }, "original": { diff --git a/pkgs/pinned.nix b/pkgs/pinned.nix index aad30b4..9d99616 100644 --- a/pkgs/pinned.nix +++ b/pkgs/pinned.nix @@ -4,22 +4,22 @@ pkgs: pkgsUnstable: inherit (pkgs) bitcoin bitcoind - btcpayserver charge-lnd - clightning electrs elementsd extra-container hwi lightning-loop lightning-pool - lndconnect - nbxplorer; + lndconnect; inherit (pkgsUnstable) + btcpayserver clboss + clightning fulcrum - lnd; + lnd + nbxplorer; inherit pkgs pkgsUnstable; } diff --git a/pkgs/python-packages/default.nix b/pkgs/python-packages/default.nix index 356e8e2..af056d5 100644 --- a/pkgs/python-packages/default.nix +++ b/pkgs/python-packages/default.nix @@ -6,7 +6,6 @@ rec { in { txzmq = callPackage ./txzmq {}; - pyln-client = clightningPkg ./pyln-client; pyln-proto = clightningPkg ./pyln-proto; pyln-bolt7 = clightningPkg ./pyln-bolt7; @@ -25,6 +24,10 @@ rec { # autobahn 20.12.3, required by joinmarketclient autobahn = callPackage ./specific-versions/autobahn.nix {}; + # coincurve 20, required by pyln-proto. + coincurve = callPackage ./specific-versions/coincurve_20 {}; + # scikit-build-core 0_10, required by coincurve. + scikit-build-core = callPackage ./specific-versions/scikit-build-core_0_10 {}; }; nbPython3Packages = (python3.override { diff --git a/pkgs/python-packages/pyln-proto/default.nix b/pkgs/python-packages/pyln-proto/default.nix index 32bc248..cde5e44 100644 --- a/pkgs/python-packages/pyln-proto/default.nix +++ b/pkgs/python-packages/pyln-proto/default.nix @@ -29,10 +29,4 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; postUnpack = "sourceRoot=$sourceRoot/contrib/pyln-proto"; - - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail 'coincurve = "^18"' 'coincurve = "^19"' \ - --replace-fail 'cryptography = "^41"' 'cryptography = "^42"' \ - ''; } diff --git a/pkgs/python-packages/specific-versions/coincurve_20/default.nix b/pkgs/python-packages/specific-versions/coincurve_20/default.nix new file mode 100644 index 0000000..afa9d41 --- /dev/null +++ b/pkgs/python-packages/specific-versions/coincurve_20/default.nix @@ -0,0 +1,87 @@ +# Copied from nixpkgs revision 673d99f1406cb09b8eb6feab4743ebdf70046557 +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + cmake, + hatchling, + ninja, + pkg-config, + setuptools, + scikit-build-core, + + # dependencies + asn1crypto, + cffi, + secp256k1, + + # checks + pytestCheckHook, + pythonOlder, +}: + +buildPythonPackage rec { + pname = "coincurve"; + version = "20.0.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ofek"; + repo = "coincurve"; + rev = "refs/tags/v${version}"; + hash = "sha256-NKx/iLuzFEu1UBuwa14x55Ab3laVAKEtX6dtoWi0dOg="; + }; + + postPatch = '' + # don't try to load .dll files + cp -r --no-preserve=mode ${secp256k1.src} libsecp256k1 + patchShebangs secp256k1/autogen.sh + ''; + + build-system = [ + hatchling + cffi + cmake + ninja + pkg-config + setuptools + scikit-build-core + ]; + + dontUseCmakeConfigure = true; + + env.COINCURVE_IGNORE_SYSTEM_LIB = "OFF"; + + buildInputs = [ secp256k1 ]; + + dependencies = [ + asn1crypto + 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; { + description = "Cross-platform bindings for libsecp256k1"; + homepage = "https://github.com/ofek/coincurve"; + license = with licenses; [ + asl20 + mit + ]; + maintainers = [ ]; + }; +} diff --git a/pkgs/python-packages/specific-versions/scikit-build-core_0_10/default.nix b/pkgs/python-packages/specific-versions/scikit-build-core_0_10/default.nix new file mode 100644 index 0000000..587e4c6 --- /dev/null +++ b/pkgs/python-packages/specific-versions/scikit-build-core_0_10/default.nix @@ -0,0 +1,97 @@ +# Copied from nixpkgs revision 673d99f1406cb09b8eb6feab4743ebdf70046557 +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + + # build-system + hatch-vcs, + hatchling, + cmake, + ninja, + + # dependencies + packaging, + pathspec, + exceptiongroup, + + # tests + build, + cattrs, + numpy, + pybind11, + pytest-subprocess, + pytestCheckHook, + setuptools, + tomli, + virtualenv, + wheel, +}: + +buildPythonPackage rec { + pname = "scikit-build-core"; + version = "0.10.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "scikit-build"; + repo = "scikit-build-core"; + rev = "refs/tags/v${version}"; + hash = "sha256-hpwXEWPofgMT4ua2tZI1mtGbaBkT2XPBd6QL8xTi1A0="; + }; + + postPatch = lib.optionalString (pythonOlder "3.11") '' + substituteInPlace pyproject.toml \ + --replace-fail '"error",' '"error", "ignore::UserWarning",' + ''; + + build-system = [ + hatch-vcs + hatchling + ]; + + dependencies = + [ + packaging + pathspec + ] + ++ lib.optionals (pythonOlder "3.11") [ + exceptiongroup + tomli + ]; + + nativeCheckInputs = [ + build + cattrs + cmake + ninja + numpy + pybind11 + pytest-subprocess + pytestCheckHook + setuptools + virtualenv + wheel + ]; + + # cmake is only used for tests + dontUseCmakeConfigure = true; + + pytestFlagsArray = [ "-m 'not isolated and not network'" ]; + + disabledTestPaths = [ + # store permissions issue in Nix: + "tests/test_editable.py" + ]; + + pythonImportsCheck = [ "scikit_build_core" ]; + + meta = with lib; { + description = "Next generation Python CMake adaptor and Python API for plugins"; + homepage = "https://github.com/scikit-build/scikit-build-core"; + changelog = "https://github.com/scikit-build/scikit-build-core/releases/tag/v${version}"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/test/nixos-search/flake.lock b/test/nixos-search/flake.lock index 7d7cf64..0e02af7 100644 --- a/test/nixos-search/flake.lock +++ b/test/nixos-search/flake.lock @@ -21,11 +21,11 @@ "nixos-infra": { "flake": false, "locked": { - "lastModified": 1722643042, - "narHash": "sha256-bW2O/ZKSs2k2pf7r6IHMi7RKHL0JVhiKV9WfyrMO8CQ=", + "lastModified": 1725609162, + "narHash": "sha256-5DqMqrei9SIkmiibU2yYaeZ/uzMFguUjAa3hxIp6l3s=", "owner": "NixOS", "repo": "infra", - "rev": "66da5cfddb8c67b5e2f0b5bba62899f1f82eec42", + "rev": "a7802cab46dae02a8e7e942cfbca41d46220da74", "type": "github" }, "original": { @@ -43,11 +43,11 @@ "npmlock2nix": "npmlock2nix" }, "locked": { - "lastModified": 1723413203, - "narHash": "sha256-IbtEvGqCHY2UdP6EqD4Bc7jCrpqva1DVRUgggTTowYg=", + "lastModified": 1725982115, + "narHash": "sha256-bTwyWn0do8RCzZZOSdXhBDBE/TECEfKFglTM6mYHSo4=", "owner": "nixos", "repo": "nixos-search", - "rev": "0e318111ee9d44fc40552d5aa95a6fd4026401c5", + "rev": "d56ef06c2e9f2b28916592979c96e917ebe5db14", "type": "github" }, "original": { @@ -58,11 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723175592, - "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "type": "github" }, "original": {