nixpkgs/pkgs/applications/blockchains/atomic-swap/default.nix
Artturin f47e5cbf23 atomic-swap: fix build
```
vendor/github.com/quic-go/quic-go/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration
```
2023-10-06 03:45:57 +03:00

44 lines
1.0 KiB
Nix

{ lib, buildGo120Module, fetchFromGitHub, nix-update-script, makeWrapper, monero-cli }:
let
pname = "atomic-swap";
version = "0.4.2";
buildGoModule = buildGo120Module;
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "AthanorLabs";
repo = "atomic-swap";
rev = "v${version}";
hash = "sha256-JnbKaGmpTDwQMSDR4Y8Q2JTtuQV5GGuovxeIYs0KgQI=";
};
vendorHash = "sha256-acBnXGy1kVBwB+j8VqGyinabnI/boTtbFNyjE6EHVes=";
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 ];
};
}