blob: 1ad57efda7a07c253455b3afac9554f4db6be0ae (
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, fetchFromGitHub, makeWrapper
, bc, dbus, gawk, gnused, libnotify, pulseaudio }:
let
path = stdenv.lib.makeBinPath [ bc dbus gawk gnused libnotify pulseaudio ];
pname = "pulseaudio-ctl";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "1.66";
src = fetchFromGitHub {
owner = "graysky2";
repo = pname;
rev = "v${version}";
sha256 = "19a24w7y19551ar41q848w7r1imqkl9cpff4dpb7yry7qp1yjg0y";
};
postPatch = ''
substituteInPlace Makefile \
--replace /usr $out
substituteInPlace common/${pname}.in \
--replace '$0' ${pname}
'';
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
wrapProgram $out/bin/${pname} \
--prefix PATH : ${path}
'';
meta = with stdenv.lib; {
description = "Control pulseaudio volume from the shell or mapped to keyboard shortcuts. No need for alsa-utils.";
homepage = https://bbs.archlinux.org/viewtopic.php?id=124513;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
}
|