aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/misc/somafm-cli/default.nix
blob: 312b402ae66d197f6b209b950a8887015791b6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv
, 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
    wrapProgram $out/bin/somafm --prefix PATH ":" "${stdenv.lib.makeBinPath [ curl jq mpv ]}";
  '';

  meta = with stdenv.lib; {
    description = "Listen to SomaFM in your terminal via pure bash";
    homepage = "https://github.com/rockymadden/somafm-cli";
    license = licenses.mit;
    maintainers = with maintainers; [ SuperSandro2000 ];
  };
}