2016-09-13 05:10:43 +00:00
|
|
|
{ stdenv, fetchFromGitHub, buildPythonPackage,
|
2016-05-22 04:14:49 +00:00
|
|
|
pexpect,
|
|
|
|
pyGtkGlade,
|
|
|
|
pygobject,
|
|
|
|
pyxdg,
|
|
|
|
gnome_python,
|
2016-09-13 05:10:43 +00:00
|
|
|
libappindicator-gtk2,
|
|
|
|
xflux,
|
|
|
|
python
|
2016-05-22 04:14:49 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "xflux-gui-${version}";
|
2016-09-13 05:10:43 +00:00
|
|
|
version = "2016-08-08";
|
2016-05-22 04:14:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "xflux-gui";
|
|
|
|
owner = "xflux-gui";
|
2016-09-13 05:10:43 +00:00
|
|
|
rev = "4125e70b6ad0aeda7de46b3a7083a26c392555dc";
|
|
|
|
sha256 = "1l56f59hnjyi7nn8wn3dfdx6lw2qjbrhdlcfz0qvwj6b0953f2s7";
|
2016-05-22 04:14:49 +00:00
|
|
|
};
|
|
|
|
|
2016-07-14 10:23:09 +00:00
|
|
|
# not sure if these need to be propagated or not?
|
2016-05-22 04:14:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pexpect
|
|
|
|
pyGtkGlade
|
|
|
|
pygobject
|
|
|
|
pyxdg
|
2016-09-13 05:10:43 +00:00
|
|
|
libappindicator-gtk2
|
2016-05-22 04:14:49 +00:00
|
|
|
gnome_python
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-09-13 05:10:43 +00:00
|
|
|
xflux
|
2016-05-22 04:14:49 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2016-09-13 05:10:43 +00:00
|
|
|
substituteInPlace src/fluxgui/xfluxcontroller.py --replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${xflux}/bin/xflux\""
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapPythonPrograms
|
|
|
|
patchPythonScript $out/${python.sitePackages}/fluxgui/fluxapp.py
|
2016-05-22 04:14:49 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|