HaXe: support nekotools boot - add haxelib
svn path=/nixpkgs/trunk/; revision=20674
This commit is contained in:
parent
23809aa681
commit
19f0cd20fd
|
@ -37,18 +37,22 @@ let
|
||||||
# END
|
# END
|
||||||
}.src;
|
}.src;
|
||||||
|
|
||||||
in
|
src_haxe = {
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "haxe-cvs";
|
|
||||||
|
|
||||||
# REGION AUTO UPDATE: { name="haxe"; type="cvs"; cvsRoot = ":pserver:anonymous@cvs.motion-twin.com:/cvsroot"; module = "haxe"; groups = "haxe_group"; }
|
# REGION AUTO UPDATE: { name="haxe"; type="cvs"; cvsRoot = ":pserver:anonymous@cvs.motion-twin.com:/cvsroot"; module = "haxe"; groups = "haxe_group"; }
|
||||||
src= sourceFromHead "haxe-F_01-25-35.tar.gz"
|
src= sourceFromHead "haxe-F_01-25-35.tar.gz"
|
||||||
(fetchurl { url = "http://mawercer.de/~nix/repos/haxe-F_01-25-35.tar.gz"; sha256 = "8e5e5330e2fd7ffbbfe48d40bda03256aefbe30cf1be1d9c9065117b2b179f24"; });
|
(fetchurl { url = "http://mawercer.de/~nix/repos/haxe-F_01-25-35.tar.gz"; sha256 = "8e5e5330e2fd7ffbbfe48d40bda03256aefbe30cf1be1d9c9065117b2b179f24"; });
|
||||||
# END
|
# END
|
||||||
|
}.src;
|
||||||
|
|
||||||
|
|
||||||
|
# the HaXe compiler
|
||||||
|
haxe = stdenv.mkDerivation {
|
||||||
|
name = "haxe-cvs";
|
||||||
|
|
||||||
buildInputs = [ocaml zlib makeWrapper];
|
buildInputs = [ocaml zlib makeWrapper];
|
||||||
|
|
||||||
|
src = src_haxe;
|
||||||
|
|
||||||
inherit zlib;
|
inherit zlib;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
@ -88,4 +92,48 @@ stdenv.mkDerivation {
|
||||||
maintainers = [args.lib.maintainers.marcweber];
|
maintainers = [args.lib.maintainers.marcweber];
|
||||||
platforms = args.lib.platforms.linux;
|
platforms = args.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# build a tool found in std/tools/${name} source directory
|
||||||
|
# the .hxml files contain a recipe to cerate a binary.
|
||||||
|
tool = { name, description }: stdenv.mkDerivation {
|
||||||
|
|
||||||
|
inherit name;
|
||||||
|
|
||||||
|
src = src_haxe;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cd std/tools/${name};
|
||||||
|
haxe *.hxml
|
||||||
|
ensureDir $out/bin
|
||||||
|
mv ${name} $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [haxe neko];
|
||||||
|
|
||||||
|
dontStrip=1;
|
||||||
|
|
||||||
|
installPhase=":";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
inherit description;
|
||||||
|
homepage = http://haxe.org;
|
||||||
|
# license = "?"; TODO
|
||||||
|
maintainers = [args.lib.maintainers.marcweber];
|
||||||
|
platforms = args.lib.platforms.linux;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
inherit haxe;
|
||||||
|
|
||||||
|
haxelib = tool {
|
||||||
|
name = "haxelib";
|
||||||
|
description = "haxelib is a HaXe library management tool similar to easyinstall or ruby gems";
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,12 @@ composableDerivation {} ( fixed : {
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's@"/usr/include",@${includes}@' \
|
-e 's@"/usr/include",@${includes}@' \
|
||||||
src/tools/install.neko
|
src/tools/install.neko
|
||||||
sed -i "s@/usr/local@$out@" Makefile
|
sed -i "s@/usr/local@$out@" Makefile vm/load.c
|
||||||
|
# make sure that nekotools boot finds the neko executable and not our wrapper:
|
||||||
ensureDir $out/{bin,lib}
|
ensureDir $out/{bin,lib}
|
||||||
|
|
||||||
|
sed -i "s@\"neko\"@\".neko-wrapped\"@" src/tools/nekoboot.neko
|
||||||
|
ln -s ./neko bin/.neko-wrapped
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inherit zlib;
|
inherit zlib;
|
||||||
|
@ -45,12 +49,18 @@ composableDerivation {} ( fixed : {
|
||||||
# if stripping was done neko and nekoc would be the same. ?!
|
# if stripping was done neko and nekoc would be the same. ?!
|
||||||
dontStrip = 1;
|
dontStrip = 1;
|
||||||
|
|
||||||
|
# neko-wrapped: nekotools boot has to find it. So don't prefix wrapped executable by "."
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/bin/nekoc" \
|
for prog in nekotools nekoc; do
|
||||||
--set "LD_LIBRARY_PATH" $out/lib/neko \
|
wrapProgram "$out/bin/$prog" \
|
||||||
|
--prefix "LD_LIBRARY_PATH" $out/lib/neko
|
||||||
|
done
|
||||||
|
|
||||||
wrapProgram "$out/bin/neko" \
|
wrapProgram "$out/bin/neko" \
|
||||||
--set "LD_LIBRARY_PATH" $out/lib/neko \
|
--prefix "LD_LIBRARY_PATH" $out/lib/neko
|
||||||
|
|
||||||
|
# create symlink so that nekotools boot finds not wrapped neko-wrapped executable
|
||||||
|
ln -s ln -s ../../bin/.neko-wrapped $out/lib/neko
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO make them optional and make them work
|
# TODO make them optional and make them work
|
||||||
|
|
|
@ -2257,9 +2257,11 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
haxe = import ../development/compilers/haxe {
|
haxeDist = import ../development/compilers/haxe {
|
||||||
inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper;
|
inherit fetchurl sourceFromHead stdenv lib ocaml zlib makeWrapper neko;
|
||||||
};
|
};
|
||||||
|
haxe = haxeDist.haxe;
|
||||||
|
haxelib = haxeDist.haxelib;
|
||||||
|
|
||||||
falcon = builderDefsPackage (import ../development/interpreters/falcon) {
|
falcon = builderDefsPackage (import ../development/interpreters/falcon) {
|
||||||
inherit cmake;
|
inherit cmake;
|
||||||
|
|
Loading…
Reference in New Issue