nix-bitcoin/pkgs/joinmarket/default.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, python3, nbPython3Packages, pkgs }:
let
2021-08-12 03:52:17 -07:00
version = "0.9.1";
src = fetchurl {
url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz";
2021-08-12 03:52:17 -07:00
sha256 = "0a8jlzi3ll1dw60fwnqs5awmcfxdjynh6i1gfmcc29qhwjpx5djl";
};
runtimePackages = with nbPython3Packages; [
joinmarketbase
joinmarketclient
joinmarketbitcoin
joinmarketdaemon
2021-01-17 04:24:57 -08:00
matplotlib # for ob-watcher
];
pythonEnv = python3.withPackages (_: runtimePackages);
in
stdenv.mkDerivation {
pname = "joinmarket";
2020-10-18 08:41:45 -07:00
inherit version src;
buildInputs = [ pythonEnv ];
installPhase = ''
mkdir -p $out/bin
# add-utxo.py -> bin/jm-add-utxo
cpBin() {
cp scripts/$1 $out/bin/jm-''${1%.py}
}
cp scripts/joinmarketd.py $out/bin/joinmarketd
2021-01-17 04:24:57 -08:00
cp scripts/obwatch/ob-watcher.py $out/bin/ob-watcher
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
chmod +x -R $out/bin
patchShebangs $out/bin
2021-01-17 04:24:57 -08:00
# These files must be placed in the same dir as ob-watcher
2021-08-12 03:52:17 -07:00
cp scripts/obwatch/{orderbook.html,sybil_attack_calculations.py} $out/bin/
cp -r scripts/obwatch/vendor $out/bin/vendor
'';
}