-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
132 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
{ version | ||
, src | ||
, format | ||
, lib | ||
|
||
# TODO: Is it necessary to use this deps check? | ||
#, buildPythonPackageWithDepsCheck | ||
, buildPythonPackage | ||
, pythonOlder | ||
, pythonAtLeast | ||
, pythonRelaxDepsHook | ||
, pytestCheckHook | ||
, setuptools | ||
, fetchurl | ||
, chromalog | ||
, cryptography | ||
, service-identity | ||
, twisted | ||
, txtorcon | ||
, python-bitcointx | ||
, argon2_cffi | ||
, autobahn | ||
, bencoderpyx | ||
, klein | ||
, mnemonic | ||
, pyjwt | ||
, werkzeug | ||
, libnacl | ||
, pyopenssl | ||
}: | ||
|
||
#buildPythonPackageWithDepsCheck rec { | ||
buildPythonPackage rec { | ||
pname = "joinmarket"; | ||
inherit version src format; | ||
|
||
# From v0.9.11, the Python older than v3.8 is not supported. Python v3.12 is | ||
# still not supported. | ||
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.13"); | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
pythonRelaxDepsHook | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
# base jm packages | ||
chromalog | ||
cryptography | ||
service-identity | ||
twisted | ||
txtorcon | ||
|
||
# jmbitcoin | ||
python-bitcointx | ||
|
||
# jmclient | ||
argon2_cffi | ||
autobahn | ||
bencoderpyx | ||
klein | ||
mnemonic | ||
pyjwt | ||
werkzeug | ||
|
||
# jmdaemon | ||
libnacl | ||
pyopenssl | ||
|
||
]; | ||
|
||
# FIXME: Try to use twisted and service-identity from nixpkgs-23.11 (there are lower stable versions)? | ||
# E.g. alternative approach | ||
#postPatch = '' | ||
# substituteInPlace pyproject.toml \ | ||
# --replace-warn 'twisted==23.10.0' 'twisted==24.3.0' \ | ||
# --replace-warn 'service-identity==21.1.0' 'service-identity==24.1.0' \ | ||
# --replace-warn 'cryptography==41.0.6' 'cryptography==42.0.5' | ||
#''; | ||
pythonRelaxDeps = [ | ||
"twisted" | ||
"service-identity" | ||
"cryptography" | ||
]; | ||
|
||
# Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'. | ||
postPatch = '' | ||
sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml | ||
''; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
]; | ||
|
||
# The unit tests can't be run in a Nix build environment | ||
doCheck = false; | ||
|
||
# TODO: Only enable tests for jmbitcoin | ||
#doCheck = true; | ||
#disabledTestPaths = [ | ||
# "test/" | ||
#]; | ||
#pytestFlagsArray = [ | ||
# "-k 'jmbitcoin'" | ||
#]; | ||
|
||
pythonImportsCheck = [ | ||
"jmbase" | ||
"jmclient" | ||
"jmbitcoin" | ||
"jmdaemon" | ||
]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver"; | ||
maintainers = with maintainers; [ seberm ]; | ||
license = licenses.gpl3; | ||
}; | ||
} |