2024-01-02 11:29:13 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nix-update-script, makeWrapper, monero-cli }:
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
let
|
|
|
|
pname = "atomic-swap";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.4.3";
|
2023-07-15 17:15:38 +00:00
|
|
|
in
|
|
|
|
buildGoModule {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AthanorLabs";
|
|
|
|
repo = "atomic-swap";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-MOylUZ6BrvlxUrsZ5gg3JzW9ROG5UXeGhq3YoPZKdHs=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-fGQ6MI+3z7wRL0y7AUERVtN0V2rcRa+vqeB8+3FMzzc=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/swapcli"
|
|
|
|
"cmd/swapd"
|
|
|
|
"cmd/bootnode"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/swapd --prefix PATH : ${lib.makeBinPath [ monero-cli ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# integration tests require network access
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/AthanorLabs/atomic-swap";
|
|
|
|
description = "ETH-XMR atomic swap implementation";
|
|
|
|
license = with licenses; [ lgpl3Only ];
|
|
|
|
maintainers = with maintainers; [ happysalada lord-valen ];
|
|
|
|
};
|
|
|
|
}
|