diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2020-08-02 17:53:33 +0000 |
---|---|---|
committer | Michael Weiss <dev.primeos@gmail.com> | 2020-08-06 11:58:26 +0200 |
commit | 79415b0bf6503a009c29b12943452404e0d54439 (patch) | |
tree | 4f5438364229a6e3ad8e1d395cd162a96c1b4ed6 /pkgs/applications/misc/redshift | |
parent | 3f5258b6ab472e9c831189555b5b6f0e44551ce7 (diff) |
gammastep: init at 2.0.1
Note: Since Gammastep is a fork of Redshift the mkRedshift will be reused as long as they don't diverge too far. Also: Gammastep should eventually replace redshift-wlr.
Diffstat (limited to 'pkgs/applications/misc/redshift')
-rw-r--r-- | pkgs/applications/misc/redshift/default.nix | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix index faa9153830216..a95e5226f9bdf 100644 --- a/pkgs/applications/misc/redshift/default.nix +++ b/pkgs/applications/misc/redshift/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchFromGitHub, autoconf, automake, gettext, intltool +{ stdenv, fetchFromGitHub, fetchFromGitLab +, autoconf, automake, gettext, intltool , libtool, pkgconfig, wrapGAppsHook, wrapPython, gobject-introspection , gtk3, python, pygobject3, pyxdg @@ -18,11 +19,16 @@ let stdenv.mkDerivation rec { inherit pname version src meta; - patches = [ + patches = stdenv.lib.optionals (pname != "gammastep") [ # https://github.com/jonls/redshift/pull/575 ./575.patch ]; + postPatch = stdenv.lib.optionalString (pname == "gammastep") '' + substituteInPlace configure.ac \ + --replace "[gammastep], [2.0]" "[gammastep], [${version}]" + ''; + nativeBuildInputs = [ autoconf automake @@ -62,7 +68,12 @@ let # the geoclue agent may inspect these paths and expect them to be # valid without having the correct $PATH set - postInstall = '' + postInstall = if (pname == "gammastep") then '' + substituteInPlace $out/share/applications/gammastep.desktop \ + --replace 'Exec=gammastep' "Exec=$out/bin/gammastep" + substituteInPlace $out/share/applications/gammastep-indicator.desktop \ + --replace 'Exec=gammastep-indicator' "Exec=$out/bin/gammastep-indicator" + '' else '' substituteInPlace $out/share/applications/redshift.desktop \ --replace 'Exec=redshift' "Exec=$out/bin/redshift" substituteInPlace $out/share/applications/redshift-gtk.desktop \ @@ -118,4 +129,24 @@ rec { homepage = "https://github.com/minus7/redshift"; }; }; + + gammastep = mkRedshift rec { + pname = "gammastep"; + version = "2.0.1"; + + src = fetchFromGitLab { + owner = "chinstrap"; + repo = pname; + rev = "v${version}"; + sha256 = "1ky4h892sg2mfbwwq5xv0vnjflsl2x3nsy5q456r1kyk1gwkj0rg"; + }; + + meta = redshift.meta // { + name = "${pname}-${version}"; + longDescription = "Gammastep" + + stdenv.lib.removePrefix "Redshift" redshift.meta.longDescription; + homepage = "https://gitlab.com/chinstrap/gammastep"; + maintainers = [ stdenv.lib.maintainers.primeos ] ++ redshift.meta.maintainers; + }; + }; } |