aboutsummaryrefslogtreecommitdiff
path: root/pkgs/games/steam/fhsenv.nix
diff options
context:
space:
mode:
authorKlemens Nanni <klemens@posteo.de>2020-10-27 16:12:02 +0100
committerAndreas Rammhold <andreas@rammhold.de>2020-10-27 16:21:43 +0100
commitdb236e588de4058d40b157936059835c378c2a3e (patch)
treeb192032063bdc2eddd604ce83e5f021123bef9c6 /pkgs/games/steam/fhsenv.nix
parent30ea1f1288f1dfe4c3580bc38435d7588c83833c (diff)
steam: Do $PATH lookup in steam.desktop instead of hardcoding derivation
The desktop application and the absoloute path work fine. But consider desktop environments such as KDE where, in the application menu, one can right click entries and pin them to widgets/panels, add them to the desktop, etc. Doing so effectively means copying /run/current-system/sw/share/applications/steam.desktop to ~/.local/share/plasma_icons/ or ~/Desktop/, i.e. managed stated gets duplicated outside the nix scope. The problem here is that steam.desktop hardcodes Exec=/nix/store/<derivation hash>-steam/bin/steam %U this means such copies will point at wrong/outdated derivations once the steam package changes, i.e. widgets/panels/desktop icons will no longer work and must be recreated. Therefore replace the absoloute path with a $PATH lookup to allow "safe" copying; this isn't optimal but other applications such Firefox and Thunderbrid currently behave the same way ($PATH lookup in their .desktop file).
Diffstat (limited to 'pkgs/games/steam/fhsenv.nix')
-rw-r--r--pkgs/games/steam/fhsenv.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix
index 32acef9757be..ecd318e64c66 100644
--- a/pkgs/games/steam/fhsenv.nix
+++ b/pkgs/games/steam/fhsenv.nix
@@ -223,7 +223,7 @@ in buildFHSUserEnv rec {
mkdir -p $out/share/applications
ln -s ${steam}/share/icons $out/share
ln -s ${steam}/share/pixmaps $out/share
- sed "s,/usr/bin/steam,$out/bin/steam,g" ${steam}/share/applications/steam.desktop > $out/share/applications/steam.desktop
+ sed "s,/usr/bin/steam,steam,g" ${steam}/share/applications/steam.desktop > $out/share/applications/steam.desktop
'';
profile = ''