git.iko.soy/typeable/nixpkgs
on master help sign in
redshift-wlr: Init at 2019-04-17

redshift-wlr is a fork of redshift that adds support for the wlr-gamma-control protocol. This supports sway and any other Wayland compositors that implement the standard in the future.

commit3dfb476ddcdb04e56eb2892607120bf7a714ca53 authorRiley Inman <rileyminman@gmail.com> dateSat 7 Sep 2019, 13:45 (7 years ago) parent41d9212
2 files changed+103−77
pkgs/applications/misc/redshift/default.nix+101−75 pkgs/top-level/all-packages.nix+2−2
pkgs/applications/misc/redshift/default.nix+101−75
@@ -11,82 +11,108 @@
1111, withGeoclue ? withGeolocation && stdenv.isLinux, geoclue
1212}:
1313
14−stdenv.mkDerivation rec {
15− pname = "redshift";
16− version = "1.12";
17−
18− src = fetchFromGitHub {
19− owner = "jonls";
20− repo = "redshift";
21− rev = "v${version}";
22− sha256 = "12cb4gaqkybp4bkkns8pam378izr2mwhr2iy04wkprs2v92j7bz6";
14+let
15+ mkRedshift =
16+ { pname, version, src, meta }:
17+ stdenv.mkDerivation rec {
18+ inherit pname version src meta;
19+
20+ patches = [
21+ # https://github.com/jonls/redshift/pull/575
22+ ./575.patch
23+ ];
24+
25+ nativeBuildInputs = [
26+ autoconf
27+ automake
28+ gettext
29+ intltool
30+ libtool
31+ pkgconfig
32+ wrapGAppsHook
33+ wrapPython
34+ ];
35+
36+ configureFlags = [
37+ "--enable-randr=${if withRandr then "yes" else "no"}"
38+ "--enable-geoclue2=${if withGeoclue then "yes" else "no"}"
39+ "--enable-drm=${if withDrm then "yes" else "no"}"
40+ "--enable-quartz=${if withQuartz then "yes" else "no"}"
41+ "--enable-corelocation=${if withCoreLocation then "yes" else "no"}"
42+ ];
43+
44+ buildInputs = [
45+ gobject-introspection
46+ gtk3
47+ python
48+ ] ++ stdenv.lib.optional withRandr libxcb
49+ ++ stdenv.lib.optional withGeoclue geoclue
50+ ++ stdenv.lib.optional withDrm libdrm
51+ ++ stdenv.lib.optional withQuartz ApplicationServices
52+ ++ stdenv.lib.optionals withCoreLocation [ CoreLocation Foundation Cocoa ]
53+ ;
54+
55+ pythonPath = [ pygobject3 pyxdg ];
56+
57+ preConfigure = "./bootstrap";
58+
59+ postFixup = "wrapPythonPrograms";
60+
61+ # the geoclue agent may inspect these paths and expect them to be
62+ # valid without having the correct $PATH set
63+ postInstall = ''
64+ substituteInPlace $out/share/applications/redshift.desktop \
65+ --replace 'Exec=redshift' "Exec=$out/bin/redshift"
66+ substituteInPlace $out/share/applications/redshift.desktop \
67+ --replace 'Exec=redshift-gtk' "Exec=$out/bin/redshift-gtk"
68+ '';
69+
70+ enableParallelBuilding = true;
71+ };
72+in
73+rec {
74+ redshift = mkRedshift rec {
75+ pname = "redshift";
76+ version = "1.12";
77+
78+ src = fetchFromGitHub {
79+ owner = "jonls";
80+ repo = "redshift";
81+ rev = "v${version}";
82+ sha256 = "12cb4gaqkybp4bkkns8pam378izr2mwhr2iy04wkprs2v92j7bz6";
83+ };
84+
85+ meta = with stdenv.lib; {
86+ description = "Screen color temperature manager";
87+ longDescription = ''
88+ Redshift adjusts the color temperature according to the position
89+ of the sun. A different color temperature is set during night and
90+ daytime. During twilight and early morning, the color temperature
91+ transitions smoothly from night to daytime temperature to allow
92+ your eyes to slowly adapt. At night the color temperature should
93+ be set to match the lamps in your room.
94+ '';
95+ license = licenses.gpl3Plus;
96+ homepage = http://jonls.dk/redshift;
97+ platforms = platforms.unix;
98+ maintainers = with maintainers; [ yegortimoshenko globin ];
99+ };
23100 };
24101
25− patches = [
26− # https://github.com/jonls/redshift/pull/575
27− ./575.patch
28− ];
29−
30− nativeBuildInputs = [
31− autoconf
32− automake
33− gettext
34− intltool
35− libtool
36− pkgconfig
37− wrapGAppsHook
38− wrapPython
39− ];
40−
41− configureFlags = [
42− "--enable-randr=${if withRandr then "yes" else "no"}"
43− "--enable-geoclue2=${if withGeoclue then "yes" else "no"}"
44− "--enable-drm=${if withDrm then "yes" else "no"}"
45− "--enable-quartz=${if withQuartz then "yes" else "no"}"
46− "--enable-corelocation=${if withCoreLocation then "yes" else "no"}"
47− ];
48−
49− buildInputs = [
50− gobject-introspection
51− gtk3
52− python
53− ] ++ stdenv.lib.optional withRandr libxcb
54− ++ stdenv.lib.optional withGeoclue geoclue
55− ++ stdenv.lib.optional withDrm libdrm
56− ++ stdenv.lib.optional withQuartz ApplicationServices
57− ++ stdenv.lib.optionals withCoreLocation [ CoreLocation Foundation Cocoa ]
58− ;
59−
60− pythonPath = [ pygobject3 pyxdg ];
61−
62− preConfigure = "./bootstrap";
63−
64− postFixup = "wrapPythonPrograms";
65−
66− # the geoclue agent may inspect these paths and expect them to be
67− # valid without having the correct $PATH set
68− postInstall = ''
69− substituteInPlace $out/share/applications/redshift.desktop \
70− --replace 'Exec=redshift' "Exec=$out/bin/redshift"
71− substituteInPlace $out/share/applications/redshift.desktop \
72− --replace 'Exec=redshift-gtk' "Exec=$out/bin/redshift-gtk"
73− '';
74−
75− enableParallelBuilding = true;
76−
77− meta = with stdenv.lib; {
78− description = "Screen color temperature manager";
79− longDescription = ''
80− Redshift adjusts the color temperature according to the position
81− of the sun. A different color temperature is set during night and
82− daytime. During twilight and early morning, the color temperature
83− transitions smoothly from night to daytime temperature to allow
84− your eyes to slowly adapt. At night the color temperature should
85− be set to match the lamps in your room.
86− '';
87− license = licenses.gpl3Plus;
88− homepage = http://jonls.dk/redshift;
89− platforms = platforms.unix;
90− maintainers = with maintainers; [ yegortimoshenko globin ];
102+ redshift-wlr = mkRedshift {
103+ pname = "redshift-wlr";
104+ version = "2019-04-17";
105+
106+ src = fetchFromGitHub {
107+ owner = "minus7";
108+ repo = "redshift";
109+ rev = "eecbfedac48f827e96ad5e151de8f41f6cd3af66";
110+ sha256 = "0rs9bxxrw4wscf4a8yl776a8g880m5gcm75q06yx2cn3lw2b7v22";
111+ };
112+
113+ meta = redshift.meta // {
114+ description = redshift.meta.description + "(with wlroots patches)";
115+ homepage = https://github.com/minus7/redshift;
116+ };
91117 };
92118}
pkgs/top-level/all-packages.nix+2−2
@@ -23367,11 +23367,11 @@ in
2336723367
2336823368 plasma-applet-volumewin7mixer = libsForQt5.callPackage ../applications/misc/plasma-applet-volumewin7mixer { };
2336923369
23370− redshift = callPackage ../applications/misc/redshift {
23370+ inherit (callPackages ../applications/misc/redshift {
2337123371 inherit (python3Packages) python pygobject3 pyxdg wrapPython;
2337223372 inherit (darwin.apple_sdk.frameworks) CoreLocation ApplicationServices Foundation Cocoa;
2337323373 geoclue = geoclue2;
23374− };
23374+ }) redshift redshift-wlr;
2337523375
2337623376 redshift-plasma-applet = libsForQt5.callPackage ../applications/misc/redshift-plasma-applet { };
2337723377