From 78eb9771b7ddb8ad531340c6704bb7fd8f2b302f Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Fri, 10 Mar 2017 19:46:14 +0100 Subject: [PATCH] antichamber: init at 1.1 --- pkgs/games/humblebundle/antichamber.nix | 56 +++++++++++++++++++++++++ pkgs/games/humblebundle/default.nix | 1 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/games/humblebundle/antichamber.nix diff --git a/pkgs/games/humblebundle/antichamber.nix b/pkgs/games/humblebundle/antichamber.nix new file mode 100644 index 00000000..c671c4ef --- /dev/null +++ b/pkgs/games/humblebundle/antichamber.nix @@ -0,0 +1,56 @@ +{ stdenv, lib, fetchHumbleBundle, unzip +, xorg, libpulseaudio, libvorbis, libogg, mesa }: + +stdenv.mkDerivation rec { + name = "antichamber-1.1"; + + src = fetchHumbleBundle { + name = "antichamber_1.01_linux_1392664980.sh"; + machineName = "antichamber_linux"; + md5 = "37bca01c411d813c8729259b7db2dba0"; + }; + + dontStrip = true; + phases = ["installPhase"]; + + installPhase = let + rpath = lib.makeLibraryPath [ + "$dest/Binaries/Linux" + xorg.libX11 + xorg.libXi + stdenv.cc.cc.lib + libpulseaudio + libvorbis + libogg + mesa + ]; + in '' + dest="$out/share/antichamber" + + # Unpack binaries and data into $dest + mkdir -p "$dest" + ${unzip}/bin/unzip $src "data/*" -d $dest && [ $? -le 2 ] + mv $dest/data/*/* $dest + rm -r $dest/data + + # Patch heavily :-) + patchelf \ + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${rpath}" "$dest/Binaries/Linux/UDKGame-Linux" + for exe in $dest/Binaries/Linux/lib/*.so{,.*} ; do + patchelf --set-rpath "${rpath}" "$exe" + done + + # Fixup permissions, just to be sure. + find "$dest" -type f -exec chmod 644 "{}" + + find "$dest/Binaries" -type f -exec chmod 755 "{}" + + + mkdir -p "$out/bin" + cat > $out/bin/antichamber <