2022-12-18 10:47:52 -08:00
|
|
|
{ stdenv, lib, fetchurl, python3, nbPython3PackagesJoinmarket }:
|
2019-08-05 00:50:55 -07:00
|
|
|
|
|
|
|
let
|
2022-12-15 09:42:48 -08:00
|
|
|
version = "0.9.8";
|
2022-09-02 04:11:26 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz";
|
2022-12-15 09:42:48 -08:00
|
|
|
sha256 = "1ab4smpyx966iiiip3g11bcslya37qhac1kgkbmsmlsdkpilw9di";
|
2019-08-05 00:50:55 -07:00
|
|
|
};
|
|
|
|
|
2022-12-18 10:47:52 -08:00
|
|
|
runtimePackages = with nbPython3PackagesJoinmarket; [
|
2019-08-05 00:50:55 -07:00
|
|
|
joinmarketbase
|
|
|
|
joinmarketclient
|
|
|
|
joinmarketbitcoin
|
|
|
|
joinmarketdaemon
|
2021-01-17 04:24:57 -08:00
|
|
|
matplotlib # for ob-watcher
|
2019-08-05 00:50:55 -07:00
|
|
|
];
|
|
|
|
|
2020-11-12 09:07:38 -08:00
|
|
|
pythonEnv = python3.withPackages (_: runtimePackages);
|
2019-08-05 00:50:55 -07:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "joinmarket";
|
2020-10-18 08:41:45 -07:00
|
|
|
inherit version src;
|
2019-08-05 00:50:55 -07:00
|
|
|
|
|
|
|
buildInputs = [ pythonEnv ];
|
|
|
|
|
2021-01-01 04:57:35 -08:00
|
|
|
installPhase = ''
|
2022-08-25 12:00:00 -07:00
|
|
|
mkdir -p "$out/bin"
|
2019-08-05 00:50:55 -07:00
|
|
|
|
|
|
|
# add-utxo.py -> bin/jm-add-utxo
|
|
|
|
cpBin() {
|
2022-08-25 12:00:00 -07:00
|
|
|
cp "scripts/$1" "$out/bin/jm-''${1%.py}"
|
2019-08-05 00:50:55 -07:00
|
|
|
}
|
2021-01-01 04:57:35 -08:00
|
|
|
|
2022-08-25 12:00:00 -07:00
|
|
|
cp scripts/joinmarketd.py "$out/bin/joinmarketd"
|
2019-08-05 00:50:55 -07:00
|
|
|
cpBin add-utxo.py
|
|
|
|
cpBin convert_old_wallet.py
|
|
|
|
cpBin receive-payjoin.py
|
|
|
|
cpBin sendpayment.py
|
|
|
|
cpBin sendtomany.py
|
|
|
|
cpBin tumbler.py
|
|
|
|
cpBin wallet-tool.py
|
|
|
|
cpBin yg-privacyenhanced.py
|
2020-10-18 08:41:45 -07:00
|
|
|
cpBin genwallet.py
|
2019-08-05 00:50:55 -07:00
|
|
|
|
2022-08-25 12:00:00 -07:00
|
|
|
chmod +x -R "$out/bin"
|
|
|
|
patchShebangs "$out/bin"
|
2021-01-17 04:24:57 -08:00
|
|
|
|
2021-08-12 06:29:19 -07:00
|
|
|
## ob-watcher
|
|
|
|
obw=$out/libexec/joinmarket-ob-watcher
|
2022-08-25 12:00:00 -07:00
|
|
|
install -D scripts/obwatch/ob-watcher.py "$obw/ob-watcher"
|
|
|
|
patchShebangs "$obw/ob-watcher"
|
|
|
|
ln -s "$obw/ob-watcher" "$out/bin/jm-ob-watcher"
|
2021-08-12 06:29:19 -07:00
|
|
|
|
2021-03-09 08:48:25 -08:00
|
|
|
# These files must be placed in the same dir as ob-watcher
|
2022-08-25 12:00:00 -07:00
|
|
|
cp -r scripts/obwatch/{orderbook.html,sybil_attack_calculations.py,vendor} "$obw"
|
2019-08-05 00:50:55 -07:00
|
|
|
'';
|
2021-12-14 10:51:23 -08:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Bitcoin CoinJoin implementation";
|
|
|
|
homepage = "https://github.com/JoinMarket-Org/joinmarket-clientserver";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ nixbitcoin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2019-08-05 00:50:55 -07:00
|
|
|
}
|