3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/xflux/gui.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, buildPythonApplication, python3Packages, wrapGAppsHook
, xflux, librsvg, gtk3, gobject-introspection, pango, gdk-pixbuf, atk
, pexpect, pyGtkGlade, pygobject3, pyxdg, libappindicator-gtk3
2016-05-22 05:14:49 +01:00
}:
buildPythonApplication rec {
pname = "xflux-gui";
version = "1.2.0";
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 = "09zphcd9821ink63636swql4g85hg6lpsazqg1mawlk9ikc8zbps";
2016-05-22 05:14:49 +01:00
};
propagatedBuildInputs = [
2016-05-22 05:14:49 +01:00
pyxdg
pexpect
pygobject3
2016-05-22 05:14:49 +01:00
];
buildInputs = [
xflux gtk3
];
nativeBuildInputs = [
wrapGAppsHook gobject-introspection
pango gdk-pixbuf atk libappindicator-gtk3
];
2016-05-22 05:14:49 +01:00
postPatch = ''
substituteInPlace src/fluxgui/xfluxcontroller.py \
--replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${xflux}/bin/xflux\""
'';
postFixup = ''
wrapGAppsHook
wrapPythonPrograms
patchPythonScript $out/${python3Packages.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";
2021-01-15 09:19:50 +00:00
license = lib.licenses.unfree; # marked as unfree since the source code contains a copy of the unfree xflux binary
maintainers = [ lib.maintainers.sheenobu ];
platforms = lib.platforms.linux;
2016-05-22 05:14:49 +01:00
};
}