about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/rofi-pulse-select/default.nix
blob: 857cdddeb638e10d9aa77941a84a59609086fa2d (plain) (blame)
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
34
35
36
37
38
39
40
41
{ stdenv
, fetchFromGitLab
, lib
, makeWrapper
, ponymix
, rofi-unwrapped
}:

stdenv.mkDerivation rec {
  pname = "rofi-pulse-select";
  version = "0.2.0";

  src = fetchFromGitLab {
    owner = "DamienCassou";
    repo = pname;
    rev = version;
    sha256 = "1405v0bh2m8ip9c23l95i8iq2gfrpanc6f4dz17nysdcff2ay2p3";
  };

  installPhase = ''
    runHook preInstall

    install -D --target-directory=$out/bin/ ./rofi-pulse-select

    wrapProgram $out/bin/rofi-pulse-select \
      --prefix PATH ":" ${lib.makeBinPath [ rofi-unwrapped ponymix ]}

    runHook postInstall
  '';

  nativeBuildInputs = [ makeWrapper ];

  meta = with lib; {
    description = "Rofi-based interface to select source/sink (aka input/output) with PulseAudio";
    mainProgram = "rofi-pulse-select";
    homepage = "https://gitlab.com/DamienCassou/rofi-pulse-select";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ DamienCassou ];
    platforms = platforms.linux;
  };
}