1 { lib, stdenv, cmake, extra-cmake-modules, plasma-framework, kwindowsystem, redshift, fetchFromGitHub, fetchpatch, }:
3 let version = "1.0.18"; in
6 pname = "redshift-plasma-applet";
9 src = fetchFromGitHub {
11 repo = "plasma-applet-redshift-control";
13 sha256 = "122nnbafa596rxdxlfshxk45lzch8c9342bzj7kzrsjkjg0xr9pq";
17 # This patch fetches from out-of-source repo because the GitHub copy is frozen,
18 # the active fork is now on invent.kde.org. Remove this patch when a new version is released and src is updated
19 # Redshift version >= 1.12 requires the -P option to clear the existing effects before applying shading.
20 # Without it scrolling makes the screen gets darker and darker until it is impossible to see anything.
22 url = "https://invent.kde.org/plasma/plasma-redshift-control/-/commit/898c3a4cfc6c317915f1e664078d8606497c4049.patch";
23 sha256 = "0b6pa3fcj698mgqnc85jbbmcl3qpf418mh06qgsd3c4v237my0nv";
28 substituteInPlace package/contents/ui/main.qml \
29 --replace "redshiftCommand: 'redshift'" \
30 "redshiftCommand: '${redshift}/bin/redshift'" \
31 --replace "redshiftOneTimeCommand: 'redshift -O " \
32 "redshiftOneTimeCommand: '${redshift}/bin/redshift -O "
34 substituteInPlace package/contents/ui/config/ConfigAdvanced.qml \
35 --replace "'redshift -V'" \
36 "'${redshift}/bin/redshift -V'"
49 dontWrapQtApps = true;
52 description = "KDE Plasma 5 widget for controlling Redshift";
53 homepage = "https://github.com/kotelnik/plasma-applet-redshift-control";
54 license = licenses.gpl2Plus;
55 platforms = platforms.linux;
56 maintainers = with maintainers; [ benley zraexy ];