2021-01-25 09:26:54 +01:00
|
|
|
{ lib, fetchFromGitHub, buildPythonApplication, python3Packages, wrapGAppsHook
|
2019-09-13 13:30:02 +02:00
|
|
|
, xflux, librsvg, gtk3, gobject-introspection, pango, gdk-pixbuf, atk
|
2021-03-24 17:45:56 +01:00
|
|
|
, pexpect, pygobject3, pyxdg, libappindicator-gtk3
|
2016-05-22 06:14:49 +02:00
|
|
|
}:
|
2019-09-13 13:30:02 +02:00
|
|
|
buildPythonApplication rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "xflux-gui";
|
2019-09-13 13:30:02 +02:00
|
|
|
version = "1.2.0";
|
2016-05-22 06:14:49 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "xflux-gui";
|
|
|
|
owner = "xflux-gui";
|
2017-09-05 13:12:27 +02:00
|
|
|
rev = "v${version}";
|
2019-09-13 13:30:02 +02:00
|
|
|
sha256 = "09zphcd9821ink63636swql4g85hg6lpsazqg1mawlk9ikc8zbps";
|
2016-05-22 06:14:49 +02:00
|
|
|
};
|
|
|
|
|
2019-09-13 13:30:02 +02:00
|
|
|
propagatedBuildInputs = [
|
2016-05-22 06:14:49 +02:00
|
|
|
pyxdg
|
2019-09-13 13:30:02 +02:00
|
|
|
pexpect
|
|
|
|
pygobject3
|
2016-05-22 06:14:49 +02:00
|
|
|
];
|
|
|
|
|
2019-09-13 13:30:02 +02:00
|
|
|
buildInputs = [
|
|
|
|
xflux gtk3
|
|
|
|
];
|
2016-09-21 22:18:44 +02:00
|
|
|
|
2019-09-13 13:30:02 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook gobject-introspection
|
|
|
|
pango gdk-pixbuf atk libappindicator-gtk3
|
|
|
|
];
|
2016-05-22 06:14:49 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-09-13 13:30:02 +02:00
|
|
|
substituteInPlace src/fluxgui/xfluxcontroller.py \
|
|
|
|
--replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${xflux}/bin/xflux\""
|
2016-09-13 07:10:43 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2016-09-21 22:18:44 +02:00
|
|
|
wrapGAppsHook
|
2016-09-13 07:10:43 +02:00
|
|
|
wrapPythonPrograms
|
2019-09-13 13:30:02 +02:00
|
|
|
patchPythonScript $out/${python3Packages.python.sitePackages}/fluxgui/fluxapp.py
|
2016-05-22 06:14:49 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Better lighting for Linux. Open source GUI for xflux";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://justgetflux.com/linux.html";
|
2021-01-15 10:19:50 +01: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 06:14:49 +02:00
|
|
|
};
|
|
|
|
}
|