mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 13:14:15 +03:00
Merge fort-nix/nix-bitcoin#702: JoinMarket update and improvements
1cbe955897
joinmarket: 0.9.10 -> 0.9.11 (Otto Sabart)946a0b8441
python-bitcointx: 1.1.4 -> 1.1.5 (Otto Sabart) Pull request description: ACKs for top commit: erikarvstedt: ACK1cbe955897
Tree-SHA512: ce5a584f11798b8c4e130a33f519a276d9235383d876efcd7371121d3c33105c54320f7e17c2012e7950a203654612cff6bc8093db9872d3753bec90e8b532b6
This commit is contained in:
commit
aab479fc9d
@ -1,19 +1,16 @@
|
||||
{ stdenv, lib, fetchFromGitHub, python3, nbPython3PackagesJoinmarket }:
|
||||
|
||||
let
|
||||
version = "0.9.10";
|
||||
version = "0.9.11";
|
||||
src = fetchFromGitHub {
|
||||
owner = "joinmarket-org";
|
||||
repo = "joinmarket-clientserver";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-uNweI7VKC16CFn8MNOAvadcSnTjK/Fznfy4qctM5PR8=";
|
||||
hash = "sha256-sYHhhp9BZz8udJuVAfwdt474OQPiye2ae5DOn5v5yEQ=";
|
||||
};
|
||||
|
||||
runtimePackages = with nbPython3PackagesJoinmarket; [
|
||||
joinmarketbase
|
||||
joinmarketclient
|
||||
joinmarketbitcoin
|
||||
joinmarketdaemon
|
||||
joinmarket
|
||||
matplotlib # for ob-watcher
|
||||
];
|
||||
|
||||
@ -35,7 +32,6 @@ stdenv.mkDerivation {
|
||||
|
||||
cp scripts/joinmarketd.py "$out/bin/joinmarketd"
|
||||
cpBin add-utxo.py
|
||||
cpBin convert_old_wallet.py
|
||||
cpBin receive-payjoin.py
|
||||
cpBin sendpayment.py
|
||||
cpBin sendtomany.py
|
||||
@ -62,7 +58,7 @@ stdenv.mkDerivation {
|
||||
description = "Bitcoin CoinJoin implementation";
|
||||
homepage = "https://github.com/JoinMarket-Org/joinmarket-clientserver";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
maintainers = with maintainers; [ seberm nixbitcoin ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ buildPythonPackageWithDepsCheck rec {
|
||||
meta = with lib; {
|
||||
description = "A fast bencode implementation in Cython";
|
||||
homepage = "https://github.com/whtsky/bencoder.pyx";
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
maintainers = with maintainers; [ seberm nixbitcoin ];
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ buildPythonPackageWithDepsCheck rec {
|
||||
meta = with lib; {
|
||||
description = "Enhance Python with colored logging";
|
||||
homepage = "https://github.com/freelan-developers/chromalog";
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
maintainers = with maintainers; [ seberm nixbitcoin ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ 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 {};
|
||||
@ -20,10 +19,7 @@ rec {
|
||||
runes = callPackage ./runes {};
|
||||
sha256 = callPackage ./sha256 {};
|
||||
|
||||
joinmarketbase = joinmarketPkg ./jmbase;
|
||||
joinmarketclient = joinmarketPkg ./jmclient;
|
||||
joinmarketbitcoin = joinmarketPkg ./jmbitcoin;
|
||||
joinmarketdaemon = joinmarketPkg ./jmdaemon;
|
||||
joinmarket = callPackage ./joinmarket { inherit (nbPkgs.joinmarket) version src; };
|
||||
|
||||
## Specific versions of packages that already exist in nixpkgs
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
{ version, src, lib, buildPythonPackageWithDepsCheck, fetchurl, future, twisted, service-identity, chromalog, txtorcon, pyaes }:
|
||||
|
||||
buildPythonPackageWithDepsCheck rec {
|
||||
pname = "joinmarketbase";
|
||||
inherit version src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/jmbase";
|
||||
|
||||
propagatedBuildInputs = [ future twisted service-identity chromalog txtorcon pyaes ];
|
||||
|
||||
patchPhase = ''
|
||||
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
|
||||
'';
|
||||
|
||||
# Has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"jmbase"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
{ version, src, lib, buildPythonPackageWithDepsCheck, fetchurl, python-bitcointx, joinmarketbase, pytestCheckHook }:
|
||||
|
||||
buildPythonPackageWithDepsCheck rec {
|
||||
pname = "joinmarketbitcoin";
|
||||
inherit version src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/jmbitcoin";
|
||||
|
||||
propagatedBuildInputs = [ python-bitcointx ];
|
||||
|
||||
checkInputs = [ joinmarketbase ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "'python-bitcointx==1.1.3'" "'python-bitcointx==1.1.4'"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
{
|
||||
pipBuildHook
|
||||
, version
|
||||
, src
|
||||
, lib
|
||||
, buildPythonPackageWithDepsCheck
|
||||
, argon2_cffi
|
||||
, autobahn
|
||||
, bencoderpyx
|
||||
, configparser
|
||||
, fetchurl
|
||||
, future
|
||||
, joinmarketbase
|
||||
, joinmarketbitcoin
|
||||
, joinmarketdaemon
|
||||
, klein
|
||||
, mnemonic
|
||||
, pyjwt
|
||||
, werkzeug
|
||||
}:
|
||||
|
||||
buildPythonPackageWithDepsCheck 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.8'"
|
||||
'';
|
||||
|
||||
# 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;
|
||||
};
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
{ version, src, lib, buildPythonPackageWithDepsCheck, fetchurl, txtorcon, cryptography, pyopenssl, libnacl, joinmarketbase }:
|
||||
|
||||
buildPythonPackageWithDepsCheck rec {
|
||||
pname = "joinmarketdaemon";
|
||||
inherit version src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/jmdaemon";
|
||||
|
||||
propagatedBuildInputs = [ txtorcon cryptography pyopenssl libnacl joinmarketbase ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.py \
|
||||
--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";
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
103
pkgs/python-packages/joinmarket/default.nix
Normal file
103
pkgs/python-packages/joinmarket/default.nix
Normal file
@ -0,0 +1,103 @@
|
||||
{ version
|
||||
, src
|
||||
, lib
|
||||
, buildPythonPackageWithDepsCheck
|
||||
, pythonOlder
|
||||
, pythonAtLeast
|
||||
, pytestCheckHook
|
||||
, setuptools
|
||||
, fetchurl
|
||||
, chromalog
|
||||
, cryptography
|
||||
, service-identity
|
||||
, twisted
|
||||
, txtorcon
|
||||
, python-bitcointx
|
||||
, argon2_cffi
|
||||
, autobahn
|
||||
, bencoderpyx
|
||||
, klein
|
||||
, mnemonic
|
||||
, pyjwt
|
||||
, werkzeug
|
||||
, libnacl
|
||||
, pyopenssl
|
||||
}:
|
||||
|
||||
buildPythonPackageWithDepsCheck rec {
|
||||
pname = "joinmarket";
|
||||
inherit version src;
|
||||
format = "pyproject";
|
||||
|
||||
# Since v0.9.11, Python older than v3.8 is not supported. Python v3.12 is
|
||||
# still not supported.
|
||||
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.12");
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'txtorcon==23.11.0' 'txtorcon==23.5.0' \
|
||||
--replace-fail 'twisted==23.10.0' 'twisted==23.8.0' \
|
||||
--replace-fail 'service-identity==21.1.0' 'service-identity==23.1.0' \
|
||||
--replace-fail 'cryptography==41.0.6' 'cryptography==41.0.3'
|
||||
|
||||
# Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'.
|
||||
sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"test/jmbase/"
|
||||
"test/jmbitcoin/"
|
||||
"test/jmdaemon/test_enc_wrapper.py"
|
||||
|
||||
# Other tests require preconfigured bitcoind and miniircd
|
||||
# https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/TESTING.md
|
||||
# "test/jmclient/"
|
||||
# "test/jmdaemon/"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"jmbase"
|
||||
"jmbitcoin"
|
||||
"jmclient"
|
||||
"jmdaemon"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";
|
||||
maintainers = with maintainers; [ seberm nixbitcoin ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildPythonPackageWithDepsCheck rec {
|
||||
pname = "python-bitcointx";
|
||||
version = "1.1.4";
|
||||
version = "1.1.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Simplexum";
|
||||
repo = "python-bitcointx";
|
||||
rev = "python-bitcointx-v${version}";
|
||||
hash = "sha256-y8/cyLQr3GbpYqCg8LKTfyL0OX7eIo5AxjdFTWTqHmk=";
|
||||
hash = "sha256-KXndYEsJ8JRTiGojrKXmAEeGDlHrNGs5MtYs9XYiqMo=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
@ -18,10 +18,14 @@ buildPythonPackageWithDepsCheck rec {
|
||||
done
|
||||
'';
|
||||
|
||||
pythonImportCheck = [
|
||||
"bitcointx"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interface to Bitcoin transaction data structures";
|
||||
homepage = "https://github.com/Simplexum/python-bitcointx";
|
||||
maintainers = with maintainers; [ nixbitcoin ];
|
||||
maintainers = with maintainers; [ seberm nixbitcoin ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
. "${BASH_SOURCE[0]%/*}/../../../helper/run-in-nix-env" "git gnupg" "$@"
|
||||
. "${BASH_SOURCE[0]%/*}/../../../helper/run-in-nix-env" "git gnupg jq" "$@"
|
||||
|
||||
TMPDIR=$(mktemp -d -p /tmp)
|
||||
trap 'rm -rf $TMPDIR' EXIT
|
||||
cd "$TMPDIR"
|
||||
latest=$(curl -s "https://api.github.com/repos/Simplexum/python-bitcointx/tags" | jq -r '.[0].name')
|
||||
echo "Latest release is $latest"
|
||||
|
||||
echo "Fetching latest release"
|
||||
git clone https://github.com/simplexum/python-bitcointx 2> /dev/null
|
||||
cd python-bitcointx
|
||||
latest=python-bitcointx-v1.1.4
|
||||
echo "Latest release is ${latest}"
|
||||
tmpdir=$(mktemp -d /tmp/python-bitcointx-verify-gpg.XXX)
|
||||
trap 'rm -rf $tmpdir' EXIT
|
||||
repo=$tmpdir/repo
|
||||
git clone --depth 1 --branch "$latest" -c advice.detachedHead=false https://github.com/Simplexum/python-bitcointx "$repo"
|
||||
|
||||
# GPG verification
|
||||
export GNUPGHOME=$TMPDIR
|
||||
export GNUPGHOME=$tmpdir
|
||||
echo "Fetching Dimitry Pethukov's Key"
|
||||
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys B17A35BBA187395784E2A6B32301D26BDC15160D 2> /dev/null
|
||||
echo "Verifying latest release"
|
||||
git verify-commit "$latest"
|
||||
|
||||
git checkout -q "tags/$latest"
|
||||
rm -rf .git
|
||||
echo
|
||||
echo "Verifying commit"
|
||||
git -C "$repo" checkout -q "tags/$latest"
|
||||
git -C "$repo" verify-commit HEAD
|
||||
rm -rf "$repo"/.git
|
||||
hash=$(nix hash path "$repo")
|
||||
|
||||
echo
|
||||
echo "tag: $latest"
|
||||
nix hash path .
|
||||
echo "hash: $hash"
|
||||
|
Loading…
Reference in New Issue
Block a user