summary refs log tree commit diff
path: root/pkgs/os-specific/linux/lightum/default.nix
blob: ec56a89ce88feaaec57aab913fb3235b2b047c5f (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
{ lib, stdenv, fetchgit, libX11, libXScrnSaver, libXext, glib, dbus, pkg-config, systemd }:

stdenv.mkDerivation {
  name = "lightum-2014-06-07";
  src = fetchgit {
    url = "https://github.com/poliva/lightum";
    rev = "123e6babe0669b23d4c1dfa5511088608ff2baa8";
    sha256 = "01x24rcrkgksyvqpgkr9zafg3jgs8nqng8yf0hx0kbmcimar8dbp";
  };

  buildInputs = [
    dbus
    glib
    libX11
    libXScrnSaver
    libXext
    pkg-config
    systemd
  ];

  patchPhase = ''
    substituteInPlace Makefile \
      --replace "libsystemd-login" "libsystemd"
  '';

  installPhase = ''
    make install prefix=$out bindir=$out/bin docdir=$out/share/doc \
      mandir=$out/share/man INSTALL="install -c" INSTALLDATA="install -c -m 644"
  '';

  meta = {
    description = "MacBook automatic light sensor daemon";
    homepage = "https://github.com/poliva/lightum";
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [ puffnfresh ];
    platforms = lib.platforms.linux;
  };
}