diff --git a/hush-lightwalletd/default.nix b/hush-lightwalletd/default.nix new file mode 100644 index 0000000..a2b5484 --- /dev/null +++ b/hush-lightwalletd/default.nix @@ -0,0 +1,39 @@ +{ buildGoModule, fetchFromGitea, lib }: + +buildGoModule rec { + pname = "hush-lightwalletd"; + version = "0.1.1"; + + src = fetchFromGitea { + domain = "git.hush.is"; + owner = "hush"; + repo = "lightwalletd"; + rev = "v${version}"; + sha256 = "sha256-xzmNPoDDeZWe85SUoAj3ayzoE6JQHWNP1aDUt1WoJV8="; + }; + + vendorSha256 = null; + + ldflags = [ + "-s" "-w" + "-X git.hush.is/hush/lightwalletd/common.Version=v${version}" + "-X git.hush.is/hush/lightwalletd/common.GitCommit=v${version}" + "-X git.hush.is/hush/lightwalletd/common.BuildDate=1970-01-01" + "-X git.hush.is/hush/lightwalletd/common.BuildUser=nixbld" + ]; + + postFixup = '' + shopt -s extglob + cd $out/bin + rm !(lightwalletd) + ''; + + meta = with lib; { + description = "A backend service that provides a bandwidth-efficient interface to the Hush blockchain"; + homepage = "https://git.hush.is/hush/lightwalletd"; + maintainers = with maintainers; [ jahway603 ]; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} +