about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2020-03-09 16:15:54 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2020-03-09 16:15:54 +0100
commit018a46ffe84126b6b71dc4944108877e0b40c745 (patch)
treeb5b80d266763c3c0d5d54a5a2b1834f0a9c54756 /pkgs/games
parent7d514dab57492ebfe9c9f7f7016eb406f21f9522 (diff)
downloadnixlib-018a46ffe84126b6b71dc4944108877e0b40c745.tar
nixlib-018a46ffe84126b6b71dc4944108877e0b40c745.tar.gz
nixlib-018a46ffe84126b6b71dc4944108877e0b40c745.tar.bz2
nixlib-018a46ffe84126b6b71dc4944108877e0b40c745.tar.lz
nixlib-018a46ffe84126b6b71dc4944108877e0b40c745.tar.xz
nixlib-018a46ffe84126b6b71dc4944108877e0b40c745.tar.zst
nixlib-018a46ffe84126b6b71dc4944108877e0b40c745.zip
minecraft: install missing gsettings schemas
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/minecraft/default.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix
index 5bc2157a70bf..157fb4b93b9e 100644
--- a/pkgs/games/minecraft/default.nix
+++ b/pkgs/games/minecraft/default.nix
@@ -2,6 +2,8 @@
 , fetchurl
 , makeDesktopItem
 , makeWrapper
+, wrapGAppsHook
+, gobject-introspection
 , jre # old or modded versions of the game may require Java 8 (https://aur.archlinux.org/packages/minecraft-launcher/#pinned-674960)
 , xorg
 , zlib
@@ -96,10 +98,12 @@ in
     sha256 = "0w8z21ml79kblv20wh5lz037g130pxkgs8ll9s3bi94zn2pbrhim";
   };
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
+  buildInputs = [ gobject-introspection ];
 
   sourceRoot = ".";
 
+  dontWrapGApps = true;
   dontConfigure = true;
   dontBuild = true;
 
@@ -109,11 +113,6 @@ in
 
     ${desktopItem.buildCommand}
     install -D $icon $out/share/icons/hicolor/symbolic/apps/minecraft-launcher.svg
-
-    makeWrapper $out/opt/minecraft-launcher/minecraft-launcher $out/bin/minecraft-launcher \
-      --prefix LD_LIBRARY_PATH : ${envLibPath} \
-      --prefix PATH : ${stdenv.lib.makeBinPath [ jre ]} \
-      --run "cd /tmp" # Do not create `GPUCache` in current directory
   '';
 
   preFixup = ''
@@ -129,6 +128,15 @@ in
       $out/opt/minecraft-launcher/liblauncher.so
   '';
 
+  postFixup = ''
+    # Do not create `GPUCache` in current directory
+    makeWrapper $out/opt/minecraft-launcher/minecraft-launcher $out/bin/minecraft-launcher \
+      --prefix LD_LIBRARY_PATH : ${envLibPath} \
+      --prefix PATH : ${stdenv.lib.makeBinPath [ jre ]} \
+      --run "cd /tmp" \
+      "''${gappsWrapperArgs[@]}"
+  '';
+
   meta = with stdenv.lib; {
     description = "Official launcher for Minecraft, a sandbox-building game";
     homepage = "https://minecraft.net";