summary refs log tree commit diff
path: root/pkgs/os-specific/linux/pommed-light
diff options
context:
space:
mode:
authorBalletie <skip_meesie@hotmail.com>2016-12-18 20:48:41 +0100
committerJoachim Fasting <joachifm@fastmail.fm>2017-01-02 19:40:43 +0100
commit66c745e30d26ee30de4a6fa4dfc7862b48ee2697 (patch)
treec37018483b1b9b70a77697416316380e8a753260 /pkgs/os-specific/linux/pommed-light
parent1cc8b830792eb415c97df939776e29cae26fefdf (diff)
downloadnixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.tar
nixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.tar.gz
nixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.tar.bz2
nixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.tar.lz
nixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.tar.xz
nixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.tar.zst
nixpkgs-66c745e30d26ee30de4a6fa4dfc7862b48ee2697.zip
pommed-light: init at 1.50lw
Diffstat (limited to 'pkgs/os-specific/linux/pommed-light')
-rw-r--r--pkgs/os-specific/linux/pommed-light/default.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/pommed-light/default.nix b/pkgs/os-specific/linux/pommed-light/default.nix
new file mode 100644
index 00000000000..a039984ff33
--- /dev/null
+++ b/pkgs/os-specific/linux/pommed-light/default.nix
@@ -0,0 +1,65 @@
+{
+  stdenv
+, fetchurl
+, pciutils
+, confuse
+, alsaLib
+, audiofile
+, pkgconfig
+, zlib
+, eject
+}:
+
+stdenv.mkDerivation rec {
+  pkgname = "pommed-light";
+  version = "1.50lw";
+  name = "${pkgname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/bytbox/${pkgname}/archive/v${version}.tar.gz";
+
+    sha256 = "1r2f28zqmyvzgymd0ng53hscbrq8vcqhxdnkq5dppjf9yrzn018b";
+  };
+
+  postPatch = ''
+    substituteInPlace pommed.conf.mactel --replace /usr $out
+    substituteInPlace pommed.conf.pmac --replace /usr $out
+    substituteInPlace pommed/beep.h --replace /usr $out
+    substituteInPlace pommed/cd_eject.c --replace /usr/bin/eject ${eject}/bin/eject
+  '';
+
+  buildInputs = [
+    pciutils
+    confuse
+    alsaLib
+    audiofile
+    pkgconfig
+    zlib
+    eject
+  ];
+
+  installPhase = ''
+    install -Dm755 pommed/pommed $out/bin/pommed
+    install -Dm644 pommed.conf.mactel $out/etc/pommed.conf.mactel
+    install -Dm644 pommed.conf.pmac $out/etc/pommed.conf.pmac
+
+    # Man page
+    install -Dm644 pommed.1 $out/share/man/man1/pommed.1
+
+    # Sounds
+    install -Dm644 pommed/data/goutte.wav $out/share/pommed/goutte.wav
+    install -Dm644 pommed/data/click.wav $out/share/pommed/click.wav
+  '';
+
+  meta = {
+    description = "A trimmed version of the pommed hotkey handler for MacBooks";
+    longDescription = ''
+      This is a stripped-down version of pommed with client, dbus, and
+      ambient light sensor support removed, optimized for use with dwm
+      and the like.
+    '';
+    homepage = https://github.com/bytbox/pommed-light;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}