From 46cfae29076f988bcb2cb277e450f920e54bc531 Mon Sep 17 00:00:00 2001 From: luftmensch-luftmensch Date: Mon, 29 Jul 2024 10:06:25 +0200 Subject: [PATCH] radio-cli: init at 2.3.1 --- pkgs/by-name/ra/radio-cli/package.nix | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/ra/radio-cli/package.nix diff --git a/pkgs/by-name/ra/radio-cli/package.nix b/pkgs/by-name/ra/radio-cli/package.nix new file mode 100644 index 000000000000..655e416b554a --- /dev/null +++ b/pkgs/by-name/ra/radio-cli/package.nix @@ -0,0 +1,44 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + makeWrapper, + pkg-config, + openssl, + mpv, +}: +rustPlatform.buildRustPackage rec { + pname = "radio-cli"; + version = "2.3.1"; + + src = fetchFromGitHub { + owner = "margual56"; + repo = "radio-cli"; + rev = "v${version}"; + hash = "sha256-XN0IzU7+V0zUUXfOygWrZXQX09IEpVo2Rhwfv+Lny/E="; + }; + + cargoHash = "sha256-XCzDNUZpyfu4gJr1lUx1/VbLkEv3OnJvYku0eEJbK5s="; + + buildInputs = [ openssl ]; + + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + postInstall = '' + wrapProgram "$out/bin/radio-cli" \ + --suffix PATH : ${lib.makeBinPath [ mpv ]} + ''; + + meta = { + description = "Simple radio CLI written in rust"; + homepage = "https://github.com/margual56/radio-cli"; + changelog = "https://github.com/margual56/radio-cli/releases/tag/v${version}"; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ luftmensch-luftmensch ]; + mainProgram = "radio-cli"; + platforms = lib.platforms.linux; + }; +}