Merge pull request #101471 from aquarial/master

redshift-plasma-applet: add patch for compatibility with redshift 1.12 update
This commit is contained in:
Timo Kaufmann 2021-10-23 11:32:57 +02:00 committed by GitHub
commit ea05036c2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, cmake, extra-cmake-modules, plasma-framework, kwindowsystem, redshift, fetchFromGitHub, }:
{ lib, stdenv, cmake, extra-cmake-modules, plasma-framework, kwindowsystem, redshift, fetchFromGitHub, fetchpatch, }:
let version = "1.0.18"; in
@ -13,6 +13,17 @@ stdenv.mkDerivation {
sha256 = "122nnbafa596rxdxlfshxk45lzch8c9342bzj7kzrsjkjg0xr9pq";
};
patches = [
# This patch fetches from out-of-source repo because the GitHub copy is frozen,
# the active fork is now on invent.kde.org. Remove this patch when a new version is released and src is updated
# Redshift version >= 1.12 requires the -P option to clear the existing effects before applying shading.
# Without it scrolling makes the screen gets darker and darker until it is impossible to see anything.
(fetchpatch {
url = "https://invent.kde.org/plasma/plasma-redshift-control/-/commit/898c3a4cfc6c317915f1e664078d8606497c4049.patch";
sha256 = "0b6pa3fcj698mgqnc85jbbmcl3qpf418mh06qgsd3c4v237my0nv";
})
];
patchPhase = ''
substituteInPlace package/contents/ui/main.qml \
--replace "redshiftCommand: 'redshift'" \