Files
nixpkgs/pkgs/by-name/ra/radioboat/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
buildGoModule,
mpv,
makeWrapper,
installShellFiles,
nix-update-script,
testers,
radioboat,
}:
buildGoModule rec {
pname = "radioboat";
version = "0.3.0";
src = fetchFromGitHub {
owner = "slashformotion";
repo = "radioboat";
rev = "v${version}";
hash = "sha256-4k+WK2Cxu1yBWgvEW9LMD2RGfiY7XDAe0qqph82zvlI=";
};
vendorHash = "sha256-H2vo5gngXUcrem25tqz/1MhOgpNZcN+IcaQHZrGyjW8=";
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 = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
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 { };
tests.version = testers.testVersion {
package = radioboat;
command = "radioboat version";
};
};
meta = with lib; {
description = "Terminal web radio client";
mainProgram = "radioboat";
homepage = "https://github.com/slashformotion/radioboat";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ zendo ];
};
}