1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 makeWrapper,
6 curl,
7 jq,
8 mpv,
9}:
10
11stdenv.mkDerivation rec {
12 pname = "somafm-cli";
13 version = "0.3.1";
14
15 src = fetchFromGitHub {
16 owner = "rockymadden";
17 repo = "somafm-cli";
18 rev = "v${version}";
19 sha256 = "1h5p9qsczgfr450sklh2vkllcpzb7nicbs8ciyvkavh3d7hds0yy";
20 };
21
22 nativeBuildInputs = [ makeWrapper ];
23
24 installPhase = ''
25 install -m0755 -D src/somafm $out/bin/somafm
26 wrapProgram $out/bin/somafm --prefix PATH ":" "${
27 lib.makeBinPath [
28 curl
29 jq
30 mpv
31 ]
32 }";
33 '';
34
35 meta = with lib; {
36 description = "Listen to SomaFM in your terminal via pure bash";
37 homepage = "https://github.com/rockymadden/somafm-cli";
38 license = licenses.mit;
39 platforms = platforms.all;
40 maintainers = with maintainers; [ SuperSandro2000 ];
41 mainProgram = "somafm";
42 };
43}