2016-09-26 10:09:25 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pythonPackages
|
|
|
|
, gnome_python
|
2016-09-21 21:18:44 +01:00
|
|
|
, libappindicator-gtk2, xflux, librsvg, wrapGAppsHook
|
2016-05-22 05:14:49 +01:00
|
|
|
}:
|
2016-09-26 10:09:25 +01:00
|
|
|
pythonPackages.buildPythonApplication rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "xflux-gui";
|
2017-09-05 12:12:27 +01:00
|
|
|
version = "1.1.10";
|
2016-05-22 05:14:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "xflux-gui";
|
|
|
|
owner = "xflux-gui";
|
2017-09-05 12:12:27 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1k67qg9y4c0n9ih0syx81ixbdl2x89gd4arwh71316cshskn0rc8";
|
2016-05-22 05:14:49 +01:00
|
|
|
};
|
|
|
|
|
2016-09-26 10:09:25 +01:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2016-05-22 05:14:49 +01:00
|
|
|
pexpect
|
|
|
|
pyGtkGlade
|
2016-09-26 10:09:25 +01:00
|
|
|
pygobject2
|
2016-05-22 05:14:49 +01:00
|
|
|
pyxdg
|
2016-09-13 06:10:43 +01:00
|
|
|
libappindicator-gtk2
|
2016-05-22 05:14:49 +01:00
|
|
|
gnome_python
|
|
|
|
];
|
|
|
|
|
2016-09-21 21:18:44 +01:00
|
|
|
buildInputs = [ xflux librsvg ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
2016-05-22 05:14:49 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2016-09-13 06:10:43 +01:00
|
|
|
substituteInPlace src/fluxgui/xfluxcontroller.py --replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${xflux}/bin/xflux\""
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2016-09-21 21:18:44 +01:00
|
|
|
wrapGAppsHook
|
2016-09-13 06:10:43 +01:00
|
|
|
wrapPythonPrograms
|
2016-09-26 10:09:25 +01:00
|
|
|
patchPythonScript $out/${pythonPackages.python.sitePackages}/fluxgui/fluxapp.py
|
2016-05-22 05:14:49 +01: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;
|
|
|
|
};
|
|
|
|
}
|