nixpkgs-suyu/pkgs/development/compilers/haxe/default.nix

41 lines
1 KiB
Nix
Raw Normal View History

2017-05-02 11:01:22 +02:00
{ stdenv, fetchgit, ocaml, zlib, pcre, neko, camlp4 }:
stdenv.mkDerivation {
2017-05-02 11:01:22 +02:00
name = "haxe-3.4.2";
2017-05-02 11:01:22 +02:00
buildInputs = [ocaml zlib pcre neko camlp4];
2014-06-01 15:13:04 +02:00
src = fetchgit {
url = "https://github.com/HaxeFoundation/haxe.git";
2017-05-02 11:01:22 +02:00
sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
2014-06-01 15:13:04 +02:00
fetchSubmodules = true;
2017-05-02 11:01:22 +02:00
# Tag 3.4.2
rev = "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7";
};
prePatch = ''
2017-05-02 11:01:22 +02:00
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
'';
buildFlags = [ "all" "tools" ];
installPhase = ''
install -vd "$out/bin" "$out/lib/haxe/std"
2014-06-01 15:13:04 +02:00
install -vt "$out/bin" haxe haxelib
cp -vr std "$out/lib/haxe"
'';
setupHook = ./setup-hook.sh;
dontStrip = true;
meta = with stdenv.lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
2017-05-02 11:01:22 +02:00
homepage = https://haxe.org;
license = with licenses; [ gpl2 bsd2 /*?*/ ]; # -> docs/license.txt
maintainers = [ maintainers.marcweber ];
2016-12-13 19:22:31 +01:00
platforms = platforms.linux ++ platforms.darwin;
};
}