nixpkgs/pkgs/applications/misc/redshift-plasma-applet/default.nix

48 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, cmake, extra-cmake-modules, plasma-framework, kwindowsystem, redshift, fetchFromGitHub, }:
2017-02-05 23:13:06 +00:00
let version = "1.0.18"; in
2017-02-05 23:13:06 +00:00
stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "redshift-plasma-applet";
inherit version;
2017-02-05 23:13:06 +00:00
src = fetchFromGitHub {
owner = "kotelnik";
repo = "plasma-applet-redshift-control";
rev = "v${version}";
sha256 = "122nnbafa596rxdxlfshxk45lzch8c9342bzj7kzrsjkjg0xr9pq";
2017-02-05 23:13:06 +00:00
};
patchPhase = ''
substituteInPlace package/contents/ui/main.qml \
--replace "redshiftCommand: 'redshift'" \
"redshiftCommand: '${redshift}/bin/redshift'" \
--replace "redshiftOneTimeCommand: 'redshift -O " \
"redshiftOneTimeCommand: '${redshift}/bin/redshift -O "
substituteInPlace package/contents/ui/config/ConfigAdvanced.qml \
--replace "'redshift -V'" \
"'${redshift}/bin/redshift -V'"
'';
nativeBuildInputs = [
2017-02-05 23:13:06 +00:00
cmake
extra-cmake-modules
2017-02-05 23:13:06 +00:00
];
buildInputs = [
plasma-framework
kwindowsystem
];
2017-02-05 23:13:06 +00:00
dontWrapQtApps = true;
meta = with lib; {
2017-02-05 23:13:06 +00:00
description = "KDE Plasma 5 widget for controlling Redshift";
homepage = "https://github.com/kotelnik/plasma-applet-redshift-control";
2017-02-05 23:13:06 +00:00
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ benley zraexy ];
2017-02-05 23:13:06 +00:00
};
}