Skip to content

Commit d9baa2e

Browse files
committed
Merge #607: joinmarket: 0.9.8 -> 0.9.9
fcd81d4 joinmarket: 0.9.8 -> 0.9.9 (nixbitcoin) Pull request description: ACKs for top commit: erikarvstedt: ACK fcd81d4 Tree-SHA512: cb6c1b750361592a7508ee94fa811824e72e3dc5d97ff3a2b73c6141e9500b7300faa0457da2ae3ccd2c443ad8dfac360be32804374a4252161fadbae06ac896
2 parents 946b428 + fcd81d4 commit d9baa2e

File tree

9 files changed

+88
-111
lines changed

9 files changed

+88
-111
lines changed

modules/joinmarket.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ let
158158
onion_serving_host = ${cfg.messagingAddress}
159159
onion_serving_port = ${toString cfg.messagingPort}
160160
hidden_service_dir =
161-
directory_nodes = 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222,jmdirjmioywe2s5jad7ts6kgcqg66rj6wujj6q77n6wbdrgocqwexzid.onion:5222,bqlpq6ak24mwvuixixitift4yu42nxchlilrcqwk2ugn45tdclg42qid.onion:5222
161+
directory_nodes = g3hv4uynnmynqqq2mchf3fcm3yd46kfzmcdogejuckgwknwyq5ya6iad.onion:5222,3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222,bqlpq6ak24mwvuixixitift4yu42nxchlilrcqwk2ugn45tdclg42qid.onion:5222
162162
163163
# irc.darkscience.net
164164
[MESSAGING:server1]

pkgs/joinmarket/default.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
{ stdenv, lib, fetchurl, python3, nbPython3PackagesJoinmarket }:
1+
{ stdenv, lib, fetchFromGitHub, python3, nbPython3PackagesJoinmarket }:
22

33
let
4-
version = "0.9.8";
5-
src = fetchurl {
6-
url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz";
7-
sha256 = "1ab4smpyx966iiiip3g11bcslya37qhac1kgkbmsmlsdkpilw9di";
4+
version = "0.9.9";
5+
src = fetchFromGitHub {
6+
owner = "joinmarket-org";
7+
repo = "joinmarket-clientserver";
8+
rev = "v${version}";
9+
sha256 = "sha256-dkeSgAhjNl8o/ATKYAlQxxCrur5fLdXuMDXSnWaxYP8=";
810
};
911

1012
runtimePackages = with nbPython3PackagesJoinmarket; [

pkgs/joinmarket/get-sha256.sh

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
#!/usr/bin/env bash
2-
set -euo pipefail
3-
. "${BASH_SOURCE[0]%/*}/../../helper/run-in-nix-env" "git gnupg" "$@"
4-
5-
TMPDIR="$(mktemp -d -p /tmp)"
6-
trap 'rm -rf $TMPDIR' EXIT
7-
cd "$TMPDIR"
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i bash -p git gnupg jq
83

9-
echo "Fetching latest release"
10-
git clone https://github.com/joinmarket-org/joinmarket-clientserver 2> /dev/null
11-
cd joinmarket-clientserver
12-
latest=$(git describe --tags "$(git rev-list --tags --max-count=1)")
13-
echo "Latest release is $latest"
4+
set -euo pipefail
5+
newVersion=$(curl -s "https://api.github.com/repos/joinmarket-org/joinmarket-clientserver/releases" | jq -r '.[0].tag_name')
146

15-
# GPG verification
16-
export GNUPGHOME=$TMPDIR
7+
# Fetch release and GPG-verify the content hash
8+
tmpdir=$(mktemp -d /tmp/joinmarket-verify-gpg.XXX)
9+
repo=$tmpdir/repo
10+
git clone --depth 1 --branch "${newVersion}" -c advice.detachedHead=false https://github.com/joinmarket-org/joinmarket-clientserver "$repo"
11+
export GNUPGHOME=$tmpdir
1712
echo "Fetching Adam Gibson's key"
1813
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 2B6FC204D9BF332D062B461A141001A1AF77F20B 2> /dev/null
19-
echo "Verifying latest release"
20-
git verify-tag "$latest"
14+
echo
15+
echo "Verifying commit"
16+
git -C "$repo" verify-commit HEAD
17+
rm -rf "$repo"/.git
18+
newHash=$(nix hash path "$repo")
19+
rm -rf "$tmpdir"
20+
echo
2121

22-
echo "tag: $latest"
23-
# The prefix option is necessary because GitHub prefixes the archive contents in this format
24-
echo "sha256: $(nix-hash --type sha256 --flat --base32 \
25-
<(git archive --format tar.gz --prefix=joinmarket-clientserver-"${latest//v}"/ "$latest"))"
22+
echo "tag: $newVersion"
23+
echo "hash: $newHash"

pkgs/python-packages/bencoderpyx/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
buildPythonPackage rec {
44
pname = "bencoder.pyx";
5-
version = "2.0.1";
5+
version = "3.0.1";
66

77
src = fetchurl {
8-
url = "https://github.com/whtsky/bencoder.pyx/archive/v${version}.tar.gz";
9-
sha256 = "f3ff92ac706a7e4692bed5e6cbe205963327f3076f55e408eb948659923eac72";
8+
url = "https://github.com/whtsky/bencoder.pyx/archive/9a47768f3ceba9df9e6fbaa7c445f59960889009.tar.gz";
9+
sha256 = "1yh565xjbbhn49xjfms80ac8psjbzn66n8dcx0x8mn7zzjv06clz";
1010
};
1111

1212
nativeBuildInputs = [ cython ];

pkgs/python-packages/default.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rec {
2222
};
2323
runes = callPackage ./runes {};
2424
sha256 = callPackage ./sha256 {};
25-
urldecode = callPackage ./urldecode {};
2625
};
2726

2827
# Joinmarket requires a custom package set because it uses older versions of Python pkgs
@@ -47,12 +46,10 @@ rec {
4746
# autobahn 20.12.3, required by joinmarketclient
4847
autobahn = callPackage ./specific-versions/autobahn.nix {};
4948

50-
# pyopenssl 20.0.1, required by joinmarketdaemon
51-
pyopenssl = callPackage ./specific-versions/pyopenssl.nix {
52-
openssl = super.pkgs.openssl_1_1;
53-
};
49+
# pyopenssl 21.0.0, required by joinmarketdaemon
50+
pyopenssl = callPackage ./specific-versions/pyopenssl.nix {};
5451

55-
# twisted 22.4.0, compatible with pyopenssl 20.0.1
52+
# twisted 22.4.0, required by joinmarketbase
5653
twisted = callPackage ./specific-versions/twisted.nix {};
5754
};
5855

pkgs/python-packages/jmbitcoin/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{ version, src, lib, buildPythonPackage, fetchurl, urldecode, pyaes, python-bitcointx, joinmarketbase }:
1+
{ version, src, lib, buildPythonPackage, fetchurl, pyaes, python-bitcointx, joinmarketbase }:
22

33
buildPythonPackage rec {
44
pname = "joinmarketbitcoin";
55
inherit version src;
66

77
postUnpack = "sourceRoot=$sourceRoot/jmbitcoin";
88

9-
propagatedBuildInputs = [ urldecode pyaes python-bitcointx ];
9+
propagatedBuildInputs = [ pyaes python-bitcointx ];
1010

1111
checkInputs = [ joinmarketbase ];
1212

pkgs/python-packages/jmdaemon/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ buildPythonPackage rec {
88

99
propagatedBuildInputs = [ txtorcon cryptography pyopenssl libnacl joinmarketbase ];
1010

11+
# libnacl 1.8.0 is not on github
12+
patchPhase = ''
13+
substituteInPlace setup.py \
14+
--replace "'libnacl==1.8.0'" "'libnacl==1.7.2'"
15+
'';
16+
1117
meta = with lib; {
1218
description = "Client library for Bitcoin coinjoins";
1319
homepage = "https://github.com/Joinmarket-Org/joinmarket-clientserver";

pkgs/python-packages/specific-versions/pyopenssl.nix

Lines changed: 48 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,50 @@
66
, cryptography
77
, pyasn1
88
, idna
9-
, pytest
9+
, pytestCheckHook
1010
, pretend
1111
, flaky
1212
, glibcLocales
1313
, six
1414
}:
1515

16-
let
17-
# https://github.com/pyca/pyopenssl/issues/791
18-
# These tests, we disable in the case that libressl is passed in as openssl.
19-
failingLibresslTests = [
16+
buildPythonPackage rec {
17+
pname = "pyopenssl";
18+
version = "21.0.0";
19+
20+
src = fetchPypi {
21+
pname = "pyOpenSSL";
22+
inherit version;
23+
sha256 = "5e2d8c5e46d0d865ae933bef5230090bdaf5506281e9eec60fa250ee80600cb3";
24+
};
25+
26+
outputs = [ "out" "dev" ];
27+
28+
# Seems to fail unpredictably on Darwin. See https://hydra.nixos.org/build/49877419/nixlog/1
29+
# for one example, but I've also seen ContextTests.test_set_verify_callback_exception fail.
30+
doCheck = !stdenv.isDarwin;
31+
32+
nativeBuildInputs = [ openssl ];
33+
propagatedBuildInputs = [ cryptography pyasn1 idna six ];
34+
35+
checkInputs = [ pytestCheckHook pretend flaky glibcLocales ];
36+
37+
preCheck = ''
38+
export LANG="en_US.UTF-8"
39+
'';
40+
41+
disabledTests = [
42+
# https://github.com/pyca/pyopenssl/issues/692
43+
# These tests, we disable always.
44+
"test_set_default_verify_paths"
45+
"test_fallback_default_verify_paths"
46+
# https://github.com/pyca/pyopenssl/issues/768
47+
"test_wantWriteError"
48+
# https://github.com/pyca/pyopenssl/issues/1043
49+
"test_alpn_call_failure"
50+
] ++ lib.optionals (lib.hasPrefix "libressl" openssl.meta.name) [
51+
# https://github.com/pyca/pyopenssl/issues/791
52+
# These tests, we disable in the case that libressl is passed in as openssl.
2053
"test_op_no_compression"
2154
"test_npn_advertise_error"
2255
"test_npn_select_error"
@@ -29,64 +62,21 @@ let
2962
"test_verify_with_revoked"
3063
"test_set_notAfter"
3164
"test_set_notBefore"
32-
];
33-
34-
# these tests are extremely tightly wed to the exact output of the openssl cli tool,
35-
# including exact punctuation.
36-
failingOpenSSL_1_1Tests = [
65+
] ++ lib.optionals (lib.versionAtLeast (lib.getVersion openssl.name) "1.1") [
66+
# these tests are extremely tightly wed to the exact output of the openssl cli tool, including exact punctuation.
3767
"test_dump_certificate"
3868
"test_dump_privatekey_text"
3969
"test_dump_certificate_request"
4070
"test_export_text"
41-
];
42-
43-
disabledTests = [
44-
# https://github.com/pyca/pyopenssl/issues/692
45-
# These tests, we disable always.
46-
"test_set_default_verify_paths"
47-
"test_fallback_default_verify_paths"
48-
# https://github.com/pyca/pyopenssl/issues/768
49-
"test_wantWriteError"
50-
] ++ (
51-
lib.optionals (lib.hasPrefix "libressl" openssl.meta.name) failingLibresslTests
52-
) ++ (
53-
lib.optionals (lib.versionAtLeast (lib.getVersion openssl.name) "1.1") failingOpenSSL_1_1Tests
54-
) ++ (
71+
] ++ lib.optionals stdenv.is32bit [
5572
# https://github.com/pyca/pyopenssl/issues/974
56-
lib.optionals stdenv.is32bit [ "test_verify_with_time" ]
57-
);
58-
59-
# Compose the final string expression, including the "-k" and the single quotes.
60-
testExpression = lib.optionalString (disabledTests != [])
61-
"-k 'not ${lib.concatStringsSep " and not " disabledTests}'";
62-
63-
in
64-
65-
buildPythonPackage rec {
66-
pname = "pyopenssl";
67-
version = "20.0.1";
73+
"test_verify_with_time"
74+
];
6875

69-
src = fetchPypi {
70-
pname = "pyOpenSSL";
71-
inherit version;
72-
sha256 = "4c231c759543ba02560fcd2480c48dcec4dae34c9da7d3747c508227e0624b51";
76+
meta = with lib; {
77+
description = "Python wrapper around the OpenSSL library";
78+
homepage = "https://github.com/pyca/pyopenssl";
79+
license = licenses.asl20;
80+
maintainers = with maintainers; [ SuperSandro2000 ];
7381
};
74-
75-
outputs = [ "out" "dev" ];
76-
77-
checkPhase = ''
78-
runHook preCheck
79-
export LANG="en_US.UTF-8"
80-
py.test tests ${testExpression}
81-
runHook postCheck
82-
'';
83-
84-
# Seems to fail unpredictably on Darwin. See https://hydra.nixos.org/build/49877419/nixlog/1
85-
# for one example, but I've also seen ContextTests.test_set_verify_callback_exception fail.
86-
doCheck = !stdenv.isDarwin;
87-
88-
nativeBuildInputs = [ openssl ];
89-
propagatedBuildInputs = [ cryptography pyasn1 idna six ];
90-
91-
checkInputs = [ pytest pretend flaky glibcLocales ];
9282
}

pkgs/python-packages/urldecode/default.nix

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)