about summary refs log tree commit diff
path: root/pkgs/development/compilers/haxe
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2017-05-02 17:01:22 +0800
committerAndy Li <andy@onthewings.net>2017-05-06 00:41:43 +0800
commit56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e (patch)
tree515c33f38fdf5515b5b9d608baba0a0e0f86da2b /pkgs/development/compilers/haxe
parent587ed894a4293ee7315079d8324d3fc1edfe8a81 (diff)
downloadnixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.tar
nixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.tar.gz
nixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.tar.bz2
nixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.tar.lz
nixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.tar.xz
nixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.tar.zst
nixlib-56b30bf98a41c5ed8d33fafaa2c8b1243d7a9d8e.zip
haxe: 3.2.1 -> 3.4.2
Diffstat (limited to 'pkgs/development/compilers/haxe')
-rw-r--r--pkgs/development/compilers/haxe/default.nix18
-rw-r--r--pkgs/development/compilers/haxe/haxelib-nix.patch128
2 files changed, 8 insertions, 138 deletions
diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix
index a4077408ef00..684c6d25daad 100644
--- a/pkgs/development/compilers/haxe/default.nix
+++ b/pkgs/development/compilers/haxe/default.nix
@@ -1,25 +1,23 @@
-{ stdenv, fetchgit, ocaml, zlib, neko, camlp4 }:
+{ stdenv, fetchgit, ocaml, zlib, pcre, neko, camlp4 }:
 
 stdenv.mkDerivation {
-  name = "haxe-3.2.1";
+  name = "haxe-3.4.2";
 
-  buildInputs = [ocaml zlib neko camlp4];
+  buildInputs = [ocaml zlib pcre neko camlp4];
 
   src = fetchgit {
     url = "https://github.com/HaxeFoundation/haxe.git";
-    sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
+    sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
     fetchSubmodules = true;
 
-    # Tag 3.2.1
-    rev = "deab4424399b520750671e51e5f5c2684e942c17";
+    # Tag 3.4.2
+    rev = "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7";
   };
 
   prePatch = ''
-    sed -i -e 's|com.class_path <- \[|&"'"$out/lib/haxe/std/"'";|' main.ml
+    sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
   '';
 
-  patches = [ ./haxelib-nix.patch ];
-
   buildFlags = [ "all" "tools" ];
 
   installPhase = ''
@@ -34,7 +32,7 @@ stdenv.mkDerivation {
 
   meta = with stdenv.lib; {
     description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
-    homepage = http://haxe.org;
+    homepage = https://haxe.org;
     license = with licenses; [ gpl2 bsd2 /*?*/ ];  # -> docs/license.txt
     maintainers = [ maintainers.marcweber ];
     platforms = platforms.linux ++ platforms.darwin;
diff --git a/pkgs/development/compilers/haxe/haxelib-nix.patch b/pkgs/development/compilers/haxe/haxelib-nix.patch
deleted file mode 100644
index ed370e8efd12..000000000000
--- a/pkgs/development/compilers/haxe/haxelib-nix.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff --git a/src/tools/haxelib/Main.hx b/src/tools/haxelib/Main.hx
-index dc18815..def5231 100644
---- a/extra/haxelib_src/src/tools/haxelib/Main.hx
-+++ b/extra/haxelib_src/src/tools/haxelib/Main.hx
-@@ -1301,21 +1301,26 @@ class Main {
- 	}
-
- 	function checkRec( prj : String, version : String, l : List<{ project : String, version : String, info : Infos }> ) {
--		var pdir = getRepository() + Data.safe(prj);
--		if( !FileSystem.exists(pdir) )
--			throw "Library "+prj+" is not installed : run 'haxelib install "+prj+"'";
--		var version = if( version != null ) version else getCurrent(pdir);
--		var vdir = pdir + "/" + Data.safe(version);
--		if( vdir.endsWith("dev") )
--			vdir = getDev(pdir);
--		if( !FileSystem.exists(vdir) )
--			throw "Library "+prj+" version "+version+" is not installed";
--		for( p in l )
--			if( p.project == prj ) {
--				if( p.version == version )
--					return;
--				throw "Library "+prj+" has two version included "+version+" and "+p.version;
--			}
-+		var vdir = this.getNixLib(prj);
-+		if (vdir == null) {
-+			var pdir = getRepository() + Data.safe(prj);
-+			if( !FileSystem.exists(pdir) )
-+				throw "Library "+prj+" is not installed : run 'haxelib install "+prj+"'";
-+			var version = if( version != null ) version else getCurrent(pdir);
-+			var vdir = pdir + "/" + Data.safe(version);
-+			if( vdir.endsWith("dev") )
-+				vdir = getDev(pdir);
-+			if( !FileSystem.exists(vdir) )
-+				throw "Library "+prj+" version "+version+" is not installed";
-+			for( p in l )
-+				if( p.project == prj ) {
-+					if( p.version == version )
-+						return;
-+					throw "Library "+prj+" has two version included "+version+" and "+p.version;
-+				}
-+		} else {
-+			version = null;
-+		}
- 		var json = try File.getContent(vdir+"/"+Data.JSON) catch( e : Dynamic ) null;
- 		var inf = Data.readData(json,false);
- 		l.add({ project : prj, version : version, info: inf });
-@@ -1330,15 +1335,21 @@ class Main {
- 			var a = args[argcur++].split(":");
- 			checkRec(a[0],a[1],list);
- 		}
--		var rep = getRepository();
- 		for( d in list ) {
--			var pdir = Data.safe(d.project)+"/"+Data.safe(d.version)+"/";
--			var dir = rep + pdir;
--			try {
--				dir = getDev(rep+Data.safe(d.project));
-+			var dir = this.getNixLib(d.project);
-+			var pdir = Data.safe(d.project)+"/";
-+			if (dir == null) {
-+				var rep = getRepository();
-+				pdir += Data.safe(d.version)+"/";
-+				dir = rep + pdir;
-+				try {
-+					dir = getDev(rep+Data.safe(d.project));
-+					dir = Path.addTrailingSlash(dir);
-+					pdir = dir;
-+				} catch( e : Dynamic ) {}
-+			} else {
- 				dir = Path.addTrailingSlash(dir);
--				pdir = dir;
--			} catch( e : Dynamic ) {}
-+			}
- 			var ndir = dir + "ndll";
- 			if( FileSystem.exists(ndir) ) {
- 				var sysdir = ndir+"/"+Sys.systemName();
-@@ -1491,23 +1502,43 @@ class Main {
- 			);
- 	}
-
-+	function getNixLib(project:String):Null<String>
-+	{
-+		var hlibPath = Sys.getEnv("HAXELIB_PATH");
-+		if (hlibPath != null) {
-+			for (libDir in hlibPath.split(":")) {
-+				var fullpath = libDir;
-+				fullpath += libDir.substr(-1, 1) == "/" ? "" : "/";
-+				fullpath += Data.safe(project);
-+				if (FileSystem.exists(fullpath))
-+					return fullpath;
-+			}
-+		}
-+		return null;
-+	}
-
- 	function run() {
--		var rep = getRepository();
- 		var project = param("Library");
- 		var temp = project.split(":");
- 		project = temp[0];
--		var pdir = rep + Data.safe(project);
--		if( !FileSystem.exists(pdir) )
--			throw "Library "+project+" is not installed";
--		pdir += "/";
--		var version = temp[1] != null ? temp[1] : getCurrent(pdir);
--		var dev = try getDev(pdir) catch ( e : Dynamic ) null;
--		var vdir = dev != null ? dev : pdir + Data.safe(version);
-
- 		args.push(cli.cwd);
-+
-+		var vdir = this.getNixLib(project);
-+		if (vdir == null) {
-+			var rep = getRepository();
-+			var pdir = rep + Data.safe(project);
-+			if( !FileSystem.exists(pdir) )
-+				throw "Library "+project+" is not installed";
-+			pdir += "/";
-+			var version = temp[1] != null ? temp[1] : getCurrent(pdir);
-+			var dev = try getDev(pdir) catch ( e : Dynamic ) null;
-+			vdir = dev!=null ? dev : pdir + Data.safe(version);
-+			var rdir = vdir + "/run.n";
-+			if( !FileSystem.exists(rdir) )
-+				throw "Library "+project+" version "+version+" does not have a run script";
-+		}
- 		cli.cwd = vdir;
--
- 		var callArgs =
- 			switch try [Data.readData(File.getContent(vdir + '/haxelib.json'), false), null] catch (e:Dynamic) [null, e] {
- 				case [null, e]: