nixpkgs/pkgs/tools/misc/xflux/gui.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

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