From 962c4430baad2ea72dfae26b862247bacb3caa28 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sun, 5 Feb 2017 18:13:06 -0500 Subject: [PATCH] redshift-plasma-applet: init at 1.0.17 --- .../misc/redshift-plasma-applet/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/misc/redshift-plasma-applet/default.nix 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 000000000000..3cf6f7d754be --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f638c0801f7a..60c0b749ccd1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16766,6 +16766,8 @@ with pkgs; inherit (python3Packages) python pygobject3 pyxdg; }; + redshift-plasma-applet = callPackage ../applications/misc/redshift-plasma-applet { }; + orion = callPackage ../misc/themes/orion {}; albatross = callPackage ../misc/themes/albatross { };