Last active
January 17, 2018 13:33
-
-
Save AcouBass/1f6c26ff7403d93ed90a35a600ed9cc9 to your computer and use it in GitHub Desktop.
runescape .nix - no longer needs curl-compat!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
env = pkgs.buildEnv { | |
name = "runscape-env"; | |
paths = with pkgs; [ | |
/* required by launcher executable */ | |
xorg.libSM xorg.libXxf86vm libpng12 xorg.libX11 expat.out | |
webkitgtk glib.out pango.out cairo.out gdk_pixbuf gtk2.out | |
stdenv.cc.cc.lib glib_networking.out curl.out | |
/* required by library additionaly downloaded by launcher - $HOME/Jagex/launcher/librs2client.so */ | |
SDL2 zlib mesa glew110 | |
]; | |
}; | |
in | |
pkgs.stdenv.mkDerivation rec { | |
name = "runescape-launcher-2.2.4"; | |
src = pkgs.fetchurl { | |
url = "https://content.runescape.com/downloads/ubuntu/pool/non-free/r/runescape-launcher/runescape-launcher_2.2.4_amd64.deb"; | |
sha256 = "12kyabn0jxsk1ldicpjbw3vjfd6jvsb0rj4pwr92bnvy809z1rw5"; | |
}; | |
dontPatchELF = true; | |
dontStrip = true; | |
nativeBuildInputs = [ pkgs.dpkg pkgs.makeWrapper ]; | |
unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root"; | |
installPhase = '' | |
mkdir -p $out | |
cp -r ./usr/* $out/ | |
substituteInPlace $out/bin/runescape-launcher \ | |
--replace "/usr/share/games/runescape-launcher/runescape" "$out/share/games/runescape-launcher/runescape" | |
substituteInPlace $out/share/applications/runescape-launcher.desktop \ | |
--replace "/usr/bin/runescape-launcher %u" "$out/bin/runescape-launcher %u" | |
patchelf --set-interpreter $(cat ${pkgs.stdenv.cc}/nix-support/dynamic-linker) \ | |
$out/share/games/runescape-launcher/runescape | |
wrapProgram $out/share/games/runescape-launcher/runescape \ | |
--prefix LD_LIBRARY_PATH : "/run/opengl-driver/lib:${env}/lib:${env}/lib64" | |
''; | |
} |
@AcouBass I saw your message in the #nixos irc about libwebkitgtk-1.0.so.0
How did you fix that? I cannot find it here.
webkitgtk
does not provide it, at least currently
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot to someone in the #NixOS IRC room - completely re-written and working!