Skip to content

Commit

Permalink
Merge #735: update nixpkgs
Browse files Browse the repository at this point in the history
2baff27 update nixpkgs (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 2baff27

Tree-SHA512: 511b9e8f11db497a8de50a4af019d44d592eeb0bcc5582380fb4162e2c7c1a617bc59b302e5869d887c8c13f491be62f44f89a13e62ec0aff9c273e5a433cedb
  • Loading branch information
jonasnick committed Sep 16, 2024
2 parents 901f125 + 2baff27 commit 548f17d
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 27 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkgs/pinned.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 4 additions & 1 deletion pkgs/python-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ rec {
in
{
txzmq = callPackage ./txzmq {};

pyln-client = clightningPkg ./pyln-client;
pyln-proto = clightningPkg ./pyln-proto;
pyln-bolt7 = clightningPkg ./pyln-bolt7;
Expand All @@ -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 {
Expand Down
6 changes: 0 additions & 6 deletions pkgs/python-packages/pyln-proto/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"' \
'';
}
87 changes: 87 additions & 0 deletions pkgs/python-packages/specific-versions/coincurve_20/default.nix
Original file line number Diff line number Diff line change
@@ -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 = [ ];
};
}
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
18 changes: 9 additions & 9 deletions test/nixos-search/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 548f17d

Please sign in to comment.