nix-bitcoin/pkgs/python-packages/jmclient/default.nix
Erik Arvstedt dc1033f1c8
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.
2023-12-14 14:53:10 +01:00

67 lines
1.3 KiB
Nix

{
pipBuildHook
, version
, src
, lib
, buildPythonPackage
, argon2_cffi
, autobahn
, bencoderpyx
, configparser
, fetchurl
, future
, joinmarketbase
, joinmarketbitcoin
, joinmarketdaemon
, klein
, mnemonic
, pyjwt
, werkzeug
}:
buildPythonPackage rec {
pname = "joinmarketclient";
inherit version src;
postUnpack = "sourceRoot=$sourceRoot/jmclient";
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 "'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";
maintainers = with maintainers; [ nixbitcoin ];
license = licenses.gpl3;
};
}