2022-07-02 11:02:04 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildGoModule,
|
|
|
|
mpv,
|
|
|
|
makeWrapper,
|
|
|
|
installShellFiles,
|
|
|
|
nix-update-script,
|
|
|
|
testers,
|
|
|
|
radioboat,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "radioboat";
|
2023-05-23 03:01:22 +00:00
|
|
|
version = "0.3.0";
|
2022-07-02 11:02:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "slashformotion";
|
|
|
|
repo = "radioboat";
|
|
|
|
rev = "v${version}";
|
2023-05-23 03:01:22 +00:00
|
|
|
hash = "sha256-4k+WK2Cxu1yBWgvEW9LMD2RGfiY7XDAe0qqph82zvlI=";
|
2022-07-02 11:02:04 +00:00
|
|
|
};
|
|
|
|
|
2023-05-23 03:01:22 +00:00
|
|
|
vendorHash = "sha256-H2vo5gngXUcrem25tqz/1MhOgpNZcN+IcaQHZrGyjW8=";
|
2022-07-02 11:02:04 +00:00
|
|
|
|
|
|
|
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 = {
|
2022-12-25 22:11:14 +00:00
|
|
|
updateScript = nix-update-script { };
|
2022-07-02 11:02:04 +00:00
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = radioboat;
|
|
|
|
command = "radioboat version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Terminal web radio client";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "radioboat";
|
2022-07-02 11:02:04 +00:00
|
|
|
homepage = "https://github.com/slashformotion/radioboat";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ zendo ];
|
|
|
|
};
|
|
|
|
}
|