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
|
@ -6,7 +6,7 @@ let
|
|||
owner = "joinmarket-org";
|
||||
repo = "joinmarket-clientserver";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-uNweI7VKC16CFn8MNOAvadcSnTjK/Fznfy4qctM5PR8=";
|
||||
hash = "sha256-uNweI7VKC16CFn8MNOAvadcSnTjK/Fznfy4qctM5PR8=";
|
||||
};
|
||||
|
||||
runtimePackages = with nbPython3PackagesJoinmarket; [
|
||||
|
|
|
@ -14,6 +14,7 @@ rec {
|
|||
pyPkgsOverrides = self: super: let
|
||||
inherit (self) callPackage;
|
||||
clightningPkg = pkg: callPackage pkg { inherit (nbPkgs.pinned) clightning; };
|
||||
joinmarketPkg = pkg: callPackage pkg { inherit (nbPkgs.joinmarket) version src; };
|
||||
in
|
||||
{
|
||||
txzmq = callPackage ./txzmq {};
|
||||
|
@ -35,14 +36,7 @@ rec {
|
|||
};
|
||||
runes = callPackage ./runes {};
|
||||
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;
|
||||
joinmarketclient = joinmarketPkg ./jmclient;
|
||||
joinmarketbitcoin = joinmarketPkg ./jmbitcoin;
|
||||
|
@ -52,16 +46,11 @@ rec {
|
|||
|
||||
# autobahn 20.12.3, required by joinmarketclient
|
||||
autobahn = callPackage ./specific-versions/autobahn.nix {};
|
||||
|
||||
# txtorcon 22.0.0, required by joinmarketdaemon
|
||||
txtorcon = callPackage ./specific-versions/txtorcon.nix {};
|
||||
};
|
||||
|
||||
nbPython3Packages = (python3.override {
|
||||
packageOverrides = pyPkgsOverrides;
|
||||
}).pkgs;
|
||||
|
||||
nbPython3PackagesJoinmarket = (python3.override {
|
||||
packageOverrides = pyPkgsOverridesJoinmarket;
|
||||
}).pkgs;
|
||||
nbPython3PackagesJoinmarket = nbPython3Packages;
|
||||
}
|
||||
|
|
|
@ -6,12 +6,19 @@ buildPythonPackage rec {
|
|||
|
||||
postUnpack = "sourceRoot=$sourceRoot/jmbase";
|
||||
|
||||
propagatedBuildInputs = [ future twisted service-identity chromalog txtorcon pyaes ];
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ future twisted service-identity chromalog txtorcon pyaes ];
|
||||
# Has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"jmbase"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||
|
|
|
@ -10,6 +10,10 @@ buildPythonPackage rec {
|
|||
|
||||
checkInputs = [ joinmarketbase ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||
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 {
|
||||
pname = "joinmarketclient";
|
||||
|
@ -6,17 +25,39 @@ buildPythonPackage rec {
|
|||
|
||||
postUnpack = "sourceRoot=$sourceRoot/jmclient";
|
||||
|
||||
checkInputs = [ joinmarketbitcoin joinmarketdaemon ];
|
||||
|
||||
propagatedBuildInputs = [ future configparser joinmarketbase mnemonic argon2_cffi bencoderpyx klein pyjwt autobahn werkzeug ];
|
||||
propagatedBuildInputs = [
|
||||
argon2_cffi
|
||||
autobahn
|
||||
bencoderpyx
|
||||
configparser
|
||||
future
|
||||
joinmarketbase
|
||||
joinmarketbitcoin
|
||||
joinmarketdaemon
|
||||
klein
|
||||
mnemonic
|
||||
pyjwt
|
||||
werkzeug
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "'klein==20.6.0'" "'klein>=20.6.0'"
|
||||
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; {
|
||||
description = "Client library for Bitcoin coinjoins";
|
||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||
|
|
|
@ -8,15 +8,21 @@ buildPythonPackage rec {
|
|||
|
||||
propagatedBuildInputs = [ txtorcon cryptography pyopenssl libnacl joinmarketbase ];
|
||||
|
||||
# libnacl 1.8.0 is not on github
|
||||
# cryptography 41.0.3 already in ../specific-versions
|
||||
patchPhase = ''
|
||||
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 \
|
||||
--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; {
|
||||
description = "Client library for Bitcoin coinjoins";
|
||||
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…
Reference in New Issue
Block a user