redshift: support macosx
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchurl, autoconf, automake, gettext, intltool
|
{ stdenv, fetchFromGitHub, fetchurl, autoconf, automake, gettext, intltool
|
||||||
, libtool, pkgconfig, wrapGAppsHook, wrapPython, geoclue2, gobjectIntrospection
|
, libtool, pkgconfig, wrapGAppsHook, wrapPython, gobjectIntrospection
|
||||||
, gtk3, python, pygobject3, pyxdg, libdrm, libxcb, hicolor-icon-theme }:
|
, gtk3, python, pygobject3, hicolor-icon-theme, pyxdg
|
||||||
|
|
||||||
|
, withCoreLocation ? stdenv.isDarwin, CoreLocation, Foundation, Cocoa
|
||||||
|
, withQuartz ? stdenv.isDarwin, ApplicationServices
|
||||||
|
, withRandr ? stdenv.isLinux, libxcb
|
||||||
|
, withDrm ? stdenv.isLinux, libdrm
|
||||||
|
, withGeoclue ? stdenv.isLinux, geoclue }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "redshift-${version}";
|
name = "redshift-${version}";
|
||||||
@@ -29,15 +35,25 @@ stdenv.mkDerivation rec {
|
|||||||
wrapPython
|
wrapPython
|
||||||
];
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-randr=${if withRandr then "yes" else "no"}"
|
||||||
|
"--enable-geoclue2=${if withGeoclue then "yes" else "no"}"
|
||||||
|
"--enable-drm=${if withDrm then "yes" else "no"}"
|
||||||
|
"--enable-quartz=${if withQuartz then "yes" else "no"}"
|
||||||
|
"--enable-corelocation=${if withCoreLocation then "yes" else "no"}"
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
geoclue2
|
|
||||||
gobjectIntrospection
|
gobjectIntrospection
|
||||||
gtk3
|
gtk3
|
||||||
libdrm
|
|
||||||
libxcb
|
|
||||||
python
|
python
|
||||||
hicolor-icon-theme
|
hicolor-icon-theme
|
||||||
];
|
] ++ stdenv.lib.optional withRandr libxcb
|
||||||
|
++ stdenv.lib.optional withGeoclue geoclue
|
||||||
|
++ stdenv.lib.optional withDrm libdrm
|
||||||
|
++ stdenv.lib.optional withQuartz ApplicationServices
|
||||||
|
++ stdenv.lib.optionals withCoreLocation [ CoreLocation Foundation Cocoa ]
|
||||||
|
;
|
||||||
|
|
||||||
pythonPath = [ pygobject3 pyxdg ];
|
pythonPath = [ pygobject3 pyxdg ];
|
||||||
|
|
||||||
@@ -59,7 +75,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
homepage = http://jonls.dk/redshift;
|
homepage = http://jonls.dk/redshift;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ yegortimoshenko ];
|
maintainers = with maintainers; [ yegortimoshenko ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19765,6 +19765,8 @@ with pkgs;
|
|||||||
|
|
||||||
redshift = callPackage ../applications/misc/redshift {
|
redshift = callPackage ../applications/misc/redshift {
|
||||||
inherit (python3Packages) python pygobject3 pyxdg wrapPython;
|
inherit (python3Packages) python pygobject3 pyxdg wrapPython;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) CoreLocation ApplicationServices Foundation Cocoa;
|
||||||
|
geoclue = geoclue2;
|
||||||
};
|
};
|
||||||
|
|
||||||
redshift-plasma-applet = libsForQt5.callPackage ../applications/misc/redshift-plasma-applet { };
|
redshift-plasma-applet = libsForQt5.callPackage ../applications/misc/redshift-plasma-applet { };
|
||||||
|
|||||||
Reference in New Issue
Block a user