about summary refs log tree commit diff
path: root/pkgs/tools/misc/xflux/gui.nix
blob: b78eb910f938cdca227a34f736c7a057de1a590c (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
{ stdenv, pkgs, fetchFromGitHub, buildPythonPackage,
  pexpect,
  pyGtkGlade,
  pygobject,
  pyxdg,
  gnome_python,
}:
buildPythonPackage rec {
  version = "1.1.1";
  name = "xflux-gui-${version}";

  src = fetchFromGitHub {
    repo = "xflux-gui";
    owner = "xflux-gui";
    rev = "d897dfd";
    sha256 = "1mx1r2hz3g3waafn4w8hql0gaasfizbzz60bk5llw007k4k8892r";
  };

  # remove messing with shipped binary
  patches = [ ./setup.patch ];

  # not sure if these need to be propogated or not?
  propagatedBuildInputs = [
    pexpect
    pyGtkGlade
    pygobject
    pyxdg
    pkgs.libappindicator-gtk2
    gnome_python
  ];

  buildInputs = [
    pkgs.xflux
  ];

  postPatch = ''
     substituteInPlace src/fluxgui/xfluxcontroller.py --replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${pkgs.xflux}/bin/xflux\""
  '';

  meta = {
    description = "Better lighting for Linux. Open source GUI for xflux";
    homepage = https://justgetflux.com/linux.html;
    license = stdenv.lib.licenses.unfree; # marked as unfree since the source code contains a copy of the unfree xflux binary
    maintainers = [ stdenv.lib.maintainers.sheenobu ];
    platforms = stdenv.lib.platforms.linux;
  };
}