Skip to content

Instantly share code, notes, and snippets.

@Jomik
Created March 14, 2019 11:23
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 Jomik/f162c9d3954808d443eec3648a093f6b to your computer and use it in GitHub Desktop.
Save Jomik/f162c9d3954808d443eec3648a093f6b to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
runCommandCC "cstub-patcher" { buildInputs = [ gcc patchelf ]; } ''
cat <<EOF > $out
#!${stdenv.shell}
${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${lib.makeLibraryPath [ zlib libxml2.out ]} \$1
EOF
chmod +x $out
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment