summary refs log tree commit diff
path: root/pkgs/applications/misc/redshift-plasma-applet
diff options
context:
space:
mode:
authorBenjamin Staffin <benley@gmail.com>2017-02-05 18:13:06 -0500
committerBenjamin Staffin <benley@gmail.com>2017-02-05 18:15:39 -0500
commit962c4430baad2ea72dfae26b862247bacb3caa28 (patch)
treed71ef80944019c9ec86e47c3de6597187ce79482 /pkgs/applications/misc/redshift-plasma-applet
parentb5957eaf2fdf3f363564abf577005a9f1d55425c (diff)
downloadnixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.tar
nixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.tar.gz
nixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.tar.bz2
nixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.tar.lz
nixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.tar.xz
nixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.tar.zst
nixpkgs-962c4430baad2ea72dfae26b862247bacb3caa28.zip
redshift-plasma-applet: init at 1.0.17
Diffstat (limited to 'pkgs/applications/misc/redshift-plasma-applet')
-rw-r--r--pkgs/applications/misc/redshift-plasma-applet/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/misc/redshift-plasma-applet/default.nix b/pkgs/applications/misc/redshift-plasma-applet/default.nix
new file mode 100644
index 00000000000..3cf6f7d754b
--- /dev/null
+++ b/pkgs/applications/misc/redshift-plasma-applet/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, cmake, kde5, redshift, fetchFromGitHub, ... }:
+
+let version = "1.0.17"; in
+
+stdenv.mkDerivation {
+  name = "redshift-plasma-applet-${version}";
+
+  src = fetchFromGitHub {
+    owner = "kotelnik";
+    repo = "plasma-applet-redshift-control";
+    rev = "v${version}";
+    sha256 = "1lp1rb7i6c18lrgqxsglbvyvzh71qbm591abrbhw675ii0ca9hgj";
+  };
+
+  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'"
+  '';
+
+  buildInputs = [
+    cmake
+    kde5.plasma-framework
+  ];
+
+
+  meta = with stdenv.lib; {
+    description = "KDE Plasma 5 widget for controlling Redshift";
+    homepage = https://github.com/kotelnik/plasma-applet-redshift-control;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ benley ];
+  };
+}