2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-08-26 17:24:40 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, curl
|
|
|
|
, jq
|
|
|
|
, mpv
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "somafm-cli";
|
|
|
|
version = "0.3.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rockymadden";
|
|
|
|
repo = "somafm-cli";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1h5p9qsczgfr450sklh2vkllcpzb7nicbs8ciyvkavh3d7hds0yy";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -m0755 -D src/somafm $out/bin/somafm
|
2021-01-15 09:19:50 +00:00
|
|
|
wrapProgram $out/bin/somafm --prefix PATH ":" "${lib.makeBinPath [ curl jq mpv ]}";
|
2020-08-26 17:24:40 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-08-26 17:24:40 +01:00
|
|
|
description = "Listen to SomaFM in your terminal via pure bash";
|
|
|
|
homepage = "https://github.com/rockymadden/somafm-cli";
|
|
|
|
license = licenses.mit;
|
2020-10-26 08:04:38 +00:00
|
|
|
platforms = platforms.all;
|
2020-08-26 17:24:40 +01:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|