Skip to content

Instantly share code, notes, and snippets.

@NWuensche
Created September 8, 2017 10:56
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 NWuensche/b920a762b4ff954260dc2ddd11e70d56 to your computer and use it in GitHub Desktop.
Save NWuensche/b920a762b4ff954260dc2ddd11e70d56 to your computer and use it in GitHub Desktop.
{pkgs, stdenv, gcc, zlib, lib}:
stdenv.mkDerivation rec {
name = "Planescape-Enhanced";
src = ./install.sh;
unpackPhase = "true";
installPhase = ''
set -x
mkdir -p $out
substitute $src install.sh \
--replace /bin/rm "/run/current-system/sw/bin/rm"
patchShebangs install.sh
sh install.sh
for exe in $out/bin/* ; do
patchelf --interpreter "$(cat ${gcc}/nix-support/dynamic-linker)" --set-rpath ${lib.makeLibraryPath [ zlib ]}
done
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment