2016-09-26 12:09:25 +03:00
|
|
|
{ stdenv, fetchFromGitHub, pythonPackages
|
|
|
|
, gnome_python
|
2016-09-21 23:18:44 +03:00
|
|
|
, libappindicator-gtk2, xflux, librsvg, wrapGAppsHook
|
2016-05-22 07:14:49 +03:00
|
|
|
}:
|
2016-09-26 12:09:25 +03:00
|
|
|
pythonPackages.buildPythonApplication rec {
|
2016-05-22 07:14:49 +03:00
|
|
|
name = "xflux-gui-${version}";
|
2016-09-21 23:18:44 +03:00
|
|
|
version = "2016-09-21";
|
2016-05-22 07:14:49 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "xflux-gui";
|
|
|
|
owner = "xflux-gui";
|
2016-09-21 23:18:44 +03:00
|
|
|
rev = "0b56204477494b473a390e8b0db043437ec14f32";
|
|
|
|
sha256 = "15pr8f31jnhqjlpvasnj6cmm6hw5gljphh2pxzav3zd9bp4yl56r";
|
2016-05-22 07:14:49 +03:00
|
|
|
};
|
|
|
|
|
2016-09-26 12:09:25 +03:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2016-05-22 07:14:49 +03:00
|
|
|
pexpect
|
|
|
|
pyGtkGlade
|
2016-09-26 12:09:25 +03:00
|
|
|
pygobject2
|
2016-05-22 07:14:49 +03:00
|
|
|
pyxdg
|
2016-09-13 08:10:43 +03:00
|
|
|
libappindicator-gtk2
|
2016-05-22 07:14:49 +03:00
|
|
|
gnome_python
|
|
|
|
];
|
|
|
|
|
2016-09-21 23:18:44 +03:00
|
|
|
buildInputs = [ xflux librsvg ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
2016-05-22 07:14:49 +03:00
|
|
|
|
|
|
|
postPatch = ''
|
2016-09-13 08:10:43 +03:00
|
|
|
substituteInPlace src/fluxgui/xfluxcontroller.py --replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${xflux}/bin/xflux\""
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2016-09-21 23:18:44 +03:00
|
|
|
wrapGAppsHook
|
|
|
|
makeWrapperArgs="''${gappsWrapperArgs[@]}"
|
2016-09-13 08:10:43 +03:00
|
|
|
wrapPythonPrograms
|
2016-09-26 12:09:25 +03:00
|
|
|
patchPythonScript $out/${pythonPackages.python.sitePackages}/fluxgui/fluxapp.py
|
2016-05-22 07:14:49 +03: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;
|
|
|
|
};
|
|
|
|
}
|