haxe: Remove build files of haxelib/haxedoc early.

Previously, we installed std by omitting the tools directory. Now, there are
occasions where you actually want to use things like tools.haxelib from within
your project, for example to create something that interfaces with the haxelib
API. So we now just remove all files in there that were created during the main
build in postBuild.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2012-10-08 02:20:32 +02:00
parent 529fee610b
commit c6c7019091
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

@ -14,11 +14,15 @@ stdenv.mkDerivation {
sed -i -e 's|com.class_path <- \[|&"'"$out/lib/haxe/std/"'";|' main.ml
'';
postBuild = ''
find std/tools -name '*.n' -delete
rm std/tools/haxedoc/haxedoc std/tools/haxelib/haxelib
'';
installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
install -vt "$out/bin" haxe haxelib haxedoc
find std -mindepth 1 -maxdepth 1 -path std/tools -o \
-exec cp -vr '{}' "$out/lib/haxe/std" \;
cp -vr std "$out/lib/haxe"
'';
dontStrip = true;