summary refs log tree commit diff
path: root/pkgs/applications/audio/pulseaudio-ctl/default.nix
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-06-03 15:51:22 +0800
committerPeter Hoeg <peter@hoeg.com>2018-06-03 15:51:56 +0800
commit33ff34f3a21c7f8870159835be2152ddf3d148e2 (patch)
treec597c4e25141d3419069b3e0ab7f7511d6874150 /pkgs/applications/audio/pulseaudio-ctl/default.nix
parent4ae5f8a92aa1e8ae21c3e40d5cbb29fae424de1b (diff)
downloadnixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.tar
nixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.tar.gz
nixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.tar.bz2
nixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.tar.lz
nixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.tar.xz
nixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.tar.zst
nixpkgs-33ff34f3a21c7f8870159835be2152ddf3d148e2.zip
pulseaudio-ctl: init at 1.66
Diffstat (limited to 'pkgs/applications/audio/pulseaudio-ctl/default.nix')
-rw-r--r--pkgs/applications/audio/pulseaudio-ctl/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/audio/pulseaudio-ctl/default.nix b/pkgs/applications/audio/pulseaudio-ctl/default.nix
new file mode 100644
index 00000000000..6e1e576043d
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-ctl/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, makeWrapper
+, bc, dbus, gawk, gnused, libnotify, pulseaudioLight }:
+
+let
+  path = stdenv.lib.makeBinPath [ bc dbus gawk gnused libnotify pulseaudioLight ];
+  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;
+  };
+}