From 9104b29c39cee2b50bf93e00374e22474a0fef9a Mon Sep 17 00:00:00 2001 From: zendo Date: Sat, 2 Jul 2022 19:02:04 +0800 Subject: [PATCH] radioboat: init at 0.2.1 --- pkgs/applications/audio/radioboat/default.nix | 60 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/applications/audio/radioboat/default.nix diff --git a/pkgs/applications/audio/radioboat/default.nix b/pkgs/applications/audio/radioboat/default.nix new file mode 100644 index 000000000000..f96339848dda --- /dev/null +++ b/pkgs/applications/audio/radioboat/default.nix @@ -0,0 +1,60 @@ +{ lib +, fetchFromGitHub +, buildGoModule +, mpv +, makeWrapper +, installShellFiles +, nix-update-script +, testers +, radioboat +}: + +buildGoModule rec { + pname = "radioboat"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "slashformotion"; + repo = "radioboat"; + rev = "v${version}"; + sha256 = "sha256-ZAKTWmK3hCJxm/578cjtdgMA2ZRhCFtzfGdta0gmuFY="; + }; + + vendorSha256 = "sha256-X3KiqaiOQYQBfVckh50C+4oxIVN6gXyNuQtBwGvjdFQ="; + + ldflags = [ + "-s" + "-w" + "-X github.com/slashformotion/radioboat/internal/buildinfo.Version=${version}" + ]; + + nativeBuildInputs = [ makeWrapper installShellFiles ]; + + preFixup = '' + wrapProgram $out/bin/radioboat --prefix PATH ":" "${lib.makeBinPath [ mpv ]}"; + ''; + + postInstall = '' + installShellCompletion --cmd radioboat \ + --bash <($out/bin/radioboat completion bash) \ + --fish <($out/bin/radioboat completion fish) \ + --zsh <($out/bin/radioboat completion zsh) + ''; + + passthru = { + updateScript = nix-update-script { attrPath = pname; }; + tests.version = testers.testVersion { + package = radioboat; + command = "radioboat version"; + version = version; + }; + }; + + meta = with lib; { + description = "A terminal web radio client"; + homepage = "https://github.com/slashformotion/radioboat"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ zendo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 994833f1c99d..efe72ef6fe48 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29632,6 +29632,8 @@ with pkgs; roomeqwizard = callPackage ../applications/audio/roomeqwizard { }; + radioboat = callPackage ../applications/audio/radioboat { }; + radiotray-ng = callPackage ../applications/audio/radiotray-ng { wxGTK = wxGTK30; };