about summary refs log tree commit diff
path: root/pkgs/applications/misc/lighthouse/default.nix
blob: 8400c01665ec1cc4781ccb698ee4255bbe82dc44 (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
42
43
44
45
46
47
48
49
{ stdenv, fetchFromGitHub, pkgconfig
, libX11, libxcb, cairo, gtk, pango, python27, python3
}:

stdenv.mkDerivation rec {
  name = "lighthouse-${date}";
  date = "2016-01-26";

  src = fetchFromGitHub {
    owner = "emgram769";
    repo = "lighthouse";
    rev = "bf11f111572475e855b0329202a14c9e128c7e57";
    sha256 = "1ppika61vg4sc9mczbkjqy2mhgxqg57xrnsmmq0h2lyvj0yhg3qn";
   };

  buildInputs = [
    pkgconfig libX11 libxcb cairo gtk pango python27 python3
  ];

  patches = [ ./Makefile.patch ];

  lighthouseInstaller = ''
    #!${stdenv.shell}
    cp -r $out/share/lighthouse/.config/lighthouse \$HOME/.config
    chmod -R +w \$HOME/.config/lighthouse
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp lighthouse $out/bin
    chmod +x config/lighthouse/cmd*
    chmod +x config/lighthouse/google.py
    patchShebangs config/lighthouse/
    patchShebangs config/lighthouse/scripts/
    mkdir -p $out/share/lighthouse/.config
    cp -r config/lighthouse $out/share/lighthouse/.config
    echo "${lighthouseInstaller}" > $out/bin/lighthouse-install
    chmod +x $out/bin/lighthouse-install
  '';

  meta = with stdenv.lib; {
    description = "A simple flexible popup dialog to run on X";
    homepage = https://github.com/emgram769/lighthouse;
    license = licenses.mit;
    maintainers = with maintainers; [ ramkromberg ];
    platforms = platforms.linux;
  };

}