summary refs log tree commit diff
path: root/pkgs/development/compilers/haxe
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2009-11-30 01:05:04 +0000
committerMarc Weber <marco-oweber@gmx.de>2009-11-30 01:05:04 +0000
commitc5b2c2c40a7392fe5ddddf401344fb16f16ca3f1 (patch)
treec8c0348ea823143d9e51dd67f19e35c340f75956 /pkgs/development/compilers/haxe
parent09474b8ca1ac816744cfa0e4682150ccb1890a93 (diff)
downloadnixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.tar
nixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.tar.gz
nixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.tar.bz2
nixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.tar.lz
nixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.tar.xz
nixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.tar.zst
nixpkgs-c5b2c2c40a7392fe5ddddf401344fb16f16ca3f1.zip
adding haxe
svn path=/nixpkgs/trunk/; revision=18708
Diffstat (limited to 'pkgs/development/compilers/haxe')
-rw-r--r--pkgs/development/compilers/haxe/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix
new file mode 100644
index 00000000000..8b69ecc72c5
--- /dev/null
+++ b/pkgs/development/compilers/haxe/default.nix
@@ -0,0 +1,49 @@
+args: with args;
+
+stdenv.mkDerivation {
+  name = "haxe-cvs";
+
+  src = sourceByName "haxe";
+
+  buildInputs = [ocaml zlib makeWrapper];
+
+  inherit zlib;
+
+  buildPhase = ''
+    mkdir -p ocaml/{swflib,extc,extlib-dev,xml-light} neko/libs
+
+    # strange setup. install.ml seems to co the same repo again into haxe directory!
+    tar xfz $src --strip-components=1 -C haxe
+
+    t(){ tar xfz $1 -C $2 --strip-components=2; }
+    t ${sourceByName "haxe_swflib"} ocaml/swflib
+    t ${sourceByName "haxe_extc"} ocaml/extc
+    t ${sourceByName "haxe_extlib_dev"} ocaml/extlib-dev
+    t ${sourceByName "haxe_xml_light"} ocaml/xml-light
+    t ${sourceByName "haxe_neko_include"} neko/libs
+
+    sed -e '/download();/d' \
+        -e "s@/usr/lib/@''${zlib}/lib/@g" \
+        doc/install.ml > install.ml
+    
+    ocaml install.ml
+  '';
+
+  # probably rpath should be set properly
+  installPhase = ''
+    ensureDir $out/lib/haxe
+    cp -r bin $out/bin
+    wrapProgram "$out/bin/haxe" \
+      --set "LD_LIBRARY_PATH" $zlib/lib \
+      --set HAXE_LIBRARY_PATH "''${HAXE_LIBRARY_PATH}''${HAXE_LIBRARY_PATH:-:}:$out/lib/haxe/std:."
+    cp -r std $out/lib/haxe/
+  '';
+
+  meta = { 
+    description = "programming language targeting JavaScript, Flash, NekVM, PHP, C++";
+    homepage = http://haxe.org;
+    license = ["GPLv2" "BSD2" /*?*/ ];  # -> docs/license.txt
+    maintainers = [args.lib.maintainers.marcweber];
+    platforms = args.lib.platforms.linux;
+  };
+}