Skip to content

Instantly share code, notes, and snippets.

@CapsAdmin
Created January 26, 2018 09:49
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 CapsAdmin/cdd5ca9fd2a0711f323969bc765bb3de to your computer and use it in GitHub Desktop.
Save CapsAdmin/cdd5ca9fd2a0711f323969bc765bb3de to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "ffibuild_luajit2";
src = ./.;
buildInputs = [ gcc SDL2 ];
buildPhase = ''
gcc -xc -E -P -c /home/caps/goluwa/goluwa/framework/lua/build/SDL2/temp.c -o temp.p
'';
installPhase = ''
mkdir $out;
cp -L -r ${lib.getLib SDL2}/lib/libSDL2.so $out/.;
mv temp.p $out/temp.p;
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment