From f3014ad8cc4013be896b131e30fbade07076807a Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Fri, 26 Jan 2018 21:47:51 +0900 Subject: [PATCH] cataclysm-dda-git: install the launcher for Linux desktop environments --- pkgs/games/cataclysm-dda/git.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 9f3ac07ec6ba..0f6f5fd7b5e6 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs . + sed -i data/xdg/com.cataclysmdda.cataclysm-dda.desktop \ + -e "s,\(Exec=\)\(cataclysm-tiles\),\1$out/bin/\2," ''; makeFlags = [ @@ -31,7 +33,10 @@ stdenv.mkDerivation rec { "NATIVE=osx CLANG=1" ]; - postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) '' + install -D -m 444 data/xdg/com.cataclysmdda.cataclysm-dda.desktop -T $out/share/applications/cataclysm-dda.desktop + install -D -m 444 data/xdg/cataclysm-dda.svg -t $out/share/icons/hicolor/scalable/apps + '' + stdenv.lib.optionalString stdenv.isDarwin '' app=$out/Applications/Cataclysm.app install -D -m 444 data/osx/Info.plist -t $app/Contents install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources