Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active August 31, 2019 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/5af745e591765f082e1a41a10ac20889 to your computer and use it in GitHub Desktop.
Save cleverca22/5af745e591765f082e1a41a10ac20889 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
lib.fix (self: {
rawImage = appimageTools.extractType2 {
name = "MinecraftBE";
src = fetchurl {
url = https://mcpelauncher.mrarm.io/appimage/Minecraft_Bedrock_Launcher.AppImage;
sha256 = "1506xpjrv24wcnfdc1w9zp0qzsi9dis8b8lml2kx7x39hzc6hwin";
};
};
patchedBedrock = runCommandCC "mc-bedrock" {} ''
set -x
cp -r ${self.rawImage} $out
chmod -R +w $out
cd $out
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) usr/bin/mcpelauncher-ui-qt
patchelf --set-rpath ${lib.makeLibraryPath [ glib zlib gcc.cc ]}:$out/usr/lib/:/run/opengl-driver/lib usr/bin/mcpelauncher-ui-qt
for $lib in $out/usr/lib/*.so*; do patchelf --set-rpath ${lib.makeLibraryPath [ glib zlib gcc.cc ] } $lib;done
patchelf --set-interpreter $(cat ${pkgsi686Linux.gcc}/nix-support/dynamic-linker) usr/bin/mcpelauncher-client
'';
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment