1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 makeWrapper,
6 pkg-config,
7 openssl,
8 mpv,
9}:
10rustPlatform.buildRustPackage rec {
11 pname = "radio-cli";
12 version = "2.3.2";
13
14 src = fetchFromGitHub {
15 owner = "margual56";
16 repo = "radio-cli";
17 rev = "v${version}";
18 hash = "sha256-De/3tkvHf8dp04A0hug+aCbiXUc+XUYeHWYOiJ/bac0=";
19 };
20
21 cargoHash = "sha256-mxSlyQpMzLbiIbcVQUILHDyLsCf/9fanX9/yf0hyXHA=";
22
23 buildInputs = [ openssl ];
24
25 nativeBuildInputs = [
26 pkg-config
27 makeWrapper
28 ];
29
30 postInstall = ''
31 wrapProgram "$out/bin/radio-cli" \
32 --suffix PATH : ${lib.makeBinPath [ mpv ]}
33 '';
34
35 meta = {
36 description = "Simple radio CLI written in rust";
37 homepage = "https://github.com/margual56/radio-cli";
38 changelog = "https://github.com/margual56/radio-cli/releases/tag/v${version}";
39 license = lib.licenses.gpl2Only;
40 maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
41 mainProgram = "radio-cli";
42 platforms = lib.platforms.unix;
43 };
44}