{ lib, stdenv , fetchurl , cmake , bash , unzip , glibc , openssl , gcc , libGLU , libGL , freetype , xorg , alsaLib , cairo , libuuid , libnsl , makeWrapper , ... }: { name, src, ... }: stdenv.mkDerivation rec { inherit name src; pharo-share = import ./share.nix { inherit lib stdenv fetchurl unzip; }; hardeningDisable = [ "format" "pic" ]; nativeBuildInputs = [ unzip cmake gcc makeWrapper ]; buildInputs = [ bash glibc openssl libGLU libGL freetype xorg.libX11 xorg.libICE xorg.libSM alsaLib cairo pharo-share libnsl ]; LD_LIBRARY_PATH = lib.makeLibraryPath [ cairo libGLU libGL freetype openssl libuuid alsaLib xorg.libICE xorg.libSM ]; preConfigure = '' cd build/ ''; installPhase = '' mkdir -p "$prefix/lib/$name" cd ../../results mv vm-display-null vm-display-null.so mv vm-display-X11 vm-display-X11.so mv vm-sound-null vm-sound-null.so mv vm-sound-ALSA vm-sound-ALSA.so mv pharo pharo-vm cp * "$prefix/lib/$name" mkdir $prefix/bin chmod u+w $prefix/bin cat > $prefix/bin/pharo-cog <