redshift: install desktop files, and use absolute paths in them to avoid confusing geoclue agent

This commit is contained in:
Michael Peyton Jones
2018-08-14 15:53:39 +01:00
parent 2428f5dda1
commit a1762065c3
2 changed files with 12 additions and 0 deletions
@@ -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; {