From c6c701909123bb3ee593a96b5a18ee39d8aa30e8 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 8 Oct 2012 02:20:32 +0200 Subject: [PATCH] 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 --- pkgs/development/compilers/haxe/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index f7af2467e5f9..817e4573df24 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -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;