summary refs log tree commit diff
path: root/pkgs/applications/misc/redshift
diff options
context:
space:
mode:
authorMichael Peyton Jones <me@michaelpj.com>2018-08-09 15:17:43 +0100
committerMichael Peyton Jones <me@michaelpj.com>2018-08-14 15:53:39 +0100
commita1762065c3696530789109d37781dedb0400e140 (patch)
tree36b1561bff775b1b6d165a5cd700088adbc37055 /pkgs/applications/misc/redshift
parent2428f5dda13475afba2dee93f4beb2bd97086930 (diff)
downloadnixpkgs-a1762065c3696530789109d37781dedb0400e140.tar
nixpkgs-a1762065c3696530789109d37781dedb0400e140.tar.gz
nixpkgs-a1762065c3696530789109d37781dedb0400e140.tar.bz2
nixpkgs-a1762065c3696530789109d37781dedb0400e140.tar.lz
nixpkgs-a1762065c3696530789109d37781dedb0400e140.tar.xz
nixpkgs-a1762065c3696530789109d37781dedb0400e140.tar.zst
nixpkgs-a1762065c3696530789109d37781dedb0400e140.zip
redshift: install desktop files, and use absolute paths in them to avoid confusing geoclue agent
Diffstat (limited to 'pkgs/applications/misc/redshift')
-rw-r--r--pkgs/applications/misc/redshift/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix
index c6d3d6e1a9d..b8c49cb02a6 100644
--- a/pkgs/applications/misc/redshift/default.nix
+++ b/pkgs/applications/misc/redshift/default.nix
@@ -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; {