forked from mirrors/nixpkgs
redshift: install desktop files, and use absolute paths in them to avoid confusing geoclue agent
This commit is contained in:
parent
2428f5dda1
commit
a1762065c3
|
@ -116,6 +116,9 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
# needed so that .desktop files are installed, which geoclue cares about
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.geoclue2.enable = mkIf (cfg.provider == "geoclue2") true;
|
||||
|
||||
systemd.user.services.redshift =
|
||||
|
|
|
@ -61,6 +61,15 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postFixup = "wrapPythonPrograms";
|
||||
|
||||
# the geoclue agent may inspect these paths and expect them to be
|
||||
# valid without having the correct $PATH set
|
||||
postInstall = ''
|
||||
substituteInPlace $out/share/applications/redshift.desktop \
|
||||
--replace 'Exec=redshift' "Exec=$out/bin/redshift"
|
||||
substituteInPlace $out/share/applications/redshift.desktop \
|
||||
--replace 'Exec=redshift-gtk' "Exec=$out/bin/redshift-gtk"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue