python-packages/joinmarket: update
- 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.
This commit is contained in:
parent
de51f20ccb
commit
dc1033f1c8
7 changed files with 71 additions and 72 deletions
|
|
@ -6,7 +6,7 @@ let
|
||||||
owner = "joinmarket-org";
|
owner = "joinmarket-org";
|
||||||
repo = "joinmarket-clientserver";
|
repo = "joinmarket-clientserver";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-uNweI7VKC16CFn8MNOAvadcSnTjK/Fznfy4qctM5PR8=";
|
hash = "sha256-uNweI7VKC16CFn8MNOAvadcSnTjK/Fznfy4qctM5PR8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
runtimePackages = with nbPython3PackagesJoinmarket; [
|
runtimePackages = with nbPython3PackagesJoinmarket; [
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ rec {
|
||||||
pyPkgsOverrides = self: super: let
|
pyPkgsOverrides = self: super: let
|
||||||
inherit (self) callPackage;
|
inherit (self) callPackage;
|
||||||
clightningPkg = pkg: callPackage pkg { inherit (nbPkgs.pinned) clightning; };
|
clightningPkg = pkg: callPackage pkg { inherit (nbPkgs.pinned) clightning; };
|
||||||
|
joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
txzmq = callPackage ./txzmq {};
|
txzmq = callPackage ./txzmq {};
|
||||||
|
|
@ -35,14 +36,7 @@ rec {
|
||||||
};
|
};
|
||||||
runes = callPackage ./runes {};
|
runes = callPackage ./runes {};
|
||||||
sha256 = callPackage ./sha256 {};
|
sha256 = callPackage ./sha256 {};
|
||||||
};
|
|
||||||
|
|
||||||
# Joinmarket requires a custom package set because it uses older versions of Python pkgs
|
|
||||||
pyPkgsOverridesJoinmarket = self: super: let
|
|
||||||
inherit (self) callPackage;
|
|
||||||
joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; };
|
|
||||||
in
|
|
||||||
(pyPkgsOverrides self super) // {
|
|
||||||
joinmarketbase = joinmarketPkg ./jmbase;
|
joinmarketbase = joinmarketPkg ./jmbase;
|
||||||
joinmarketclient = joinmarketPkg ./jmclient;
|
joinmarketclient = joinmarketPkg ./jmclient;
|
||||||
joinmarketbitcoin = joinmarketPkg ./jmbitcoin;
|
joinmarketbitcoin = joinmarketPkg ./jmbitcoin;
|
||||||
|
|
@ -52,16 +46,11 @@ rec {
|
||||||
|
|
||||||
# autobahn 20.12.3, required by joinmarketclient
|
# autobahn 20.12.3, required by joinmarketclient
|
||||||
autobahn = callPackage ./specific-versions/autobahn.nix {};
|
autobahn = callPackage ./specific-versions/autobahn.nix {};
|
||||||
|
|
||||||
# txtorcon 22.0.0, required by joinmarketdaemon
|
|
||||||
txtorcon = callPackage ./specific-versions/txtorcon.nix {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nbPython3Packages = (python3.override {
|
nbPython3Packages = (python3.override {
|
||||||
packageOverrides = pyPkgsOverrides;
|
packageOverrides = pyPkgsOverrides;
|
||||||
}).pkgs;
|
}).pkgs;
|
||||||
|
|
||||||
nbPython3PackagesJoinmarket = (python3.override {
|
nbPython3PackagesJoinmarket = nbPython3Packages;
|
||||||
packageOverrides = pyPkgsOverridesJoinmarket;
|
|
||||||
}).pkgs;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,19 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
postUnpack = "sourceRoot=$sourceRoot/jmbase";
|
postUnpack = "sourceRoot=$sourceRoot/jmbase";
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ future twisted service-identity chromalog txtorcon pyaes ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i 's|twisted==22.4.0|twisted==22.10.0|' setup.py
|
sed -i 's|twisted==22.4.0|twisted==23.8.0|' setup.py
|
||||||
sed -i 's|service-identity==21.1.0|service-identity==23.1.0|' setup.py
|
sed -i 's|service-identity==21.1.0|service-identity==23.1.0|' setup.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ future twisted service-identity chromalog txtorcon pyaes ];
|
# Has no tests
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"jmbase"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
checkInputs = [ joinmarketbase ];
|
checkInputs = [ joinmarketbase ];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||||
maintainers = with maintainers; [ nixbitcoin ];
|
maintainers = with maintainers; [ nixbitcoin ];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
{ version, src, lib, buildPythonPackage, fetchurl, future, configparser, joinmarketbase, joinmarketdaemon, mnemonic, argon2_cffi, bencoderpyx, joinmarketbitcoin, klein, pyjwt, autobahn, werkzeug }:
|
{
|
||||||
|
pipBuildHook
|
||||||
|
, version
|
||||||
|
, src
|
||||||
|
, lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, argon2_cffi
|
||||||
|
, autobahn
|
||||||
|
, bencoderpyx
|
||||||
|
, configparser
|
||||||
|
, fetchurl
|
||||||
|
, future
|
||||||
|
, joinmarketbase
|
||||||
|
, joinmarketbitcoin
|
||||||
|
, joinmarketdaemon
|
||||||
|
, klein
|
||||||
|
, mnemonic
|
||||||
|
, pyjwt
|
||||||
|
, werkzeug
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "joinmarketclient";
|
pname = "joinmarketclient";
|
||||||
|
|
@ -6,17 +25,39 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
postUnpack = "sourceRoot=$sourceRoot/jmclient";
|
postUnpack = "sourceRoot=$sourceRoot/jmclient";
|
||||||
|
|
||||||
checkInputs = [ joinmarketbitcoin joinmarketdaemon ];
|
propagatedBuildInputs = [
|
||||||
|
argon2_cffi
|
||||||
propagatedBuildInputs = [ future configparser joinmarketbase mnemonic argon2_cffi bencoderpyx klein pyjwt autobahn werkzeug ];
|
autobahn
|
||||||
|
bencoderpyx
|
||||||
|
configparser
|
||||||
|
future
|
||||||
|
joinmarketbase
|
||||||
|
joinmarketbitcoin
|
||||||
|
joinmarketdaemon
|
||||||
|
klein
|
||||||
|
mnemonic
|
||||||
|
pyjwt
|
||||||
|
werkzeug
|
||||||
|
];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "'klein==20.6.0'" "'klein>=20.6.0'"
|
--replace "'klein==20.6.0'" "'klein>=20.6.0'"
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "'pyjwt==2.4.0'" "'pyjwt==2.6.0'"
|
--replace "'argon2_cffi==21.3.0'" "'argon2_cffi==23.1.0'"
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "'pyjwt==2.4.0'" "'pyjwt==2.8.0'"
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "'werkzeug==2.2.3'" "'werkzeug==2.3.7'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# The unit tests can't be run in a Nix build environment
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"jmclient"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Client library for Bitcoin coinjoins";
|
description = "Client library for Bitcoin coinjoins";
|
||||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,21 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
propagatedBuildInputs = [ txtorcon cryptography pyopenssl libnacl joinmarketbase ];
|
propagatedBuildInputs = [ txtorcon cryptography pyopenssl libnacl joinmarketbase ];
|
||||||
|
|
||||||
# libnacl 1.8.0 is not on github
|
|
||||||
# cryptography 41.0.3 already in ../specific-versions
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "'libnacl==1.8.0'" "'libnacl==1.7.2'"
|
--replace "'txtorcon==22.0.0'" "'txtorcon==23.5.0'"
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "'libnacl==1.8.0'" "'libnacl==2.1.0'"
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "'cryptography==41.0.2" "'cryptography==41.0.3"
|
--replace "'cryptography==41.0.2" "'cryptography==41.0.3"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# The unit tests can't be run in a Nix build environment
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"jmdaemon"
|
||||||
|
];
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Client library for Bitcoin coinjoins";
|
description = "Client library for Bitcoin coinjoins";
|
||||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
{ lib
|
|
||||||
, stdenv
|
|
||||||
, python
|
|
||||||
, buildPythonPackage
|
|
||||||
, pythonOlder
|
|
||||||
, fetchPypi
|
|
||||||
, cryptography
|
|
||||||
, incremental
|
|
||||||
, twisted
|
|
||||||
, automat
|
|
||||||
, zope_interface
|
|
||||||
, idna
|
|
||||||
, pyopenssl
|
|
||||||
, service-identity
|
|
||||||
, pytestCheckHook
|
|
||||||
, mock
|
|
||||||
, lsof
|
|
||||||
, GeoIP
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "txtorcon";
|
|
||||||
version = "22.0.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-iaG2XjKks2nWfmwWY4f7xGjMXQUidEjSOaXn6XGKoFM=";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
cryptography
|
|
||||||
incremental
|
|
||||||
twisted
|
|
||||||
automat
|
|
||||||
zope_interface
|
|
||||||
] ++ twisted.optional-dependencies.tls;
|
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook mock lsof GeoIP ];
|
|
||||||
|
|
||||||
doCheck = !(stdenv.isDarwin && stdenv.isAarch64);
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
|
|
||||||
homepage = "https://github.com/meejah/txtorcon";
|
|
||||||
maintainers = with lib.maintainers; [ jluttine exarkun ];
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue