- Add `doCheck = false` and `pythonImportsCheck` where appropriate.
This is good practice in general, but specifically works around a
`buildPythonPackage` bug where the test phase fails due to a
requirements check that is unrelated to testing.
- Enable tests for `jmbitcoin`.
- Patch some requirements. I've checked the release notes of the
required deps for backwards compatibility.
btcpayserver: 1.11.2 -> 1.11.4
clightning: 23.05.2 -> 23.08.1
hwi: 2.2.1 -> 2.3.1
Remove custom coincurve, since nixos-23.05 includes the latest version
of coincurve (18) that's required by pyln-proto.
Co-authored-by: Erik Arvstedt <erik.arvstedt@gmail.com>
Patching `pyln-proto` to use cryptography 38 lets
us avoid adding many older Python pkg versions.
The backwards incompatible changes from cryptography 36 to 38
only include the removal of deprecated fns that pyln-proto
doesn't use.
See string "BACKWARDS INCOMPATIBLE" in
https://cryptography.io/en/latest/changelog/
- Move the creation of the joinmarket Python pkgs from
`joinmarket/default.nix` to `pkgs/python-packages/default.nix`.
- Move definitions of old pkg versions from the main Python pkgs
to the joinmarket Python pkgs.
These old versions are only required by joinmarket.
Instead of setting up the script PATH via nix-shell, use
`nix shell` with inputs from the nix-bitcoin flake.
Advantages:
- Uses the nixpkgs version from the nix-bitcoin flake instead of
`<nixpkgs>` from the user env (NIX_PATH), so the script runtime
env is reproducible.
- The pkg derivations for the runtime env are cached, which greatly
increases script startup speed.
This commit was generated by running the following script inside the
repo root dir:
def transform(path, src)
if src =~ /#! *nix-shell +-i +bash +-p +(.*)/
pkgs = $1
if src =~ /^.*?(set -e.*?pipefail)\n/
set_statement = $1
src.sub!($&, '')
end
src.sub!(/\A.*?#! *nix-shell.*?\n/m, '')
parents = ([ '..' ] * (path.split('/').count - 1)).join('/')
[
'#!/usr/bin/env bash',
*set_statement,
%(. "${BASH_SOURCE[0]%/*}/#{parents}/helper/run-in-nix-env" "#{pkgs}" "$@"),
nil,
src
].join("\n")
end
end
Dir['**/*.sh'].each do |f|
src = File.read(f)
if new_src = transform(f, src)
puts "Changed file #{f}"
File.write(f, new_src)
end
end
This is a nonfunctional refactoring commit.
It's needed because pkg `pyln-proto`, which is introduced in the next commit,
requires a different, incompatible version of `cryptography`, which
must be placed in a different python package set.