Merge pull request #21205 from boronine/haxe-3.2.1

haxe: 3.1.3 -> 3.2.1

authored by Arseniy Seroka and committed by GitHub a45ffc7e 501e485e

+22 -20
+4 -4
pkgs/development/compilers/haxe/default.nix
··· 1 { stdenv, fetchgit, ocaml, zlib, neko, camlp4 }: 2 3 stdenv.mkDerivation { 4 - name = "haxe-3.1.3"; 5 6 buildInputs = [ocaml zlib neko camlp4]; 7 8 src = fetchgit { 9 url = "https://github.com/HaxeFoundation/haxe.git"; 10 - sha256 = "0d8s9yqsqcbr2lfw4xnmg7vzgb6k1jq6hlwwaf1kmn9wxpvcc6x9"; 11 fetchSubmodules = true; 12 13 - # Tag 3.1.3 14 - rev = "7be30670b2f1f9b6082499c8fb9e23c0a6df6c28"; 15 }; 16 17 prePatch = ''
··· 1 { stdenv, fetchgit, ocaml, zlib, neko, camlp4 }: 2 3 stdenv.mkDerivation { 4 + name = "haxe-3.2.1"; 5 6 buildInputs = [ocaml zlib neko camlp4]; 7 8 src = fetchgit { 9 url = "https://github.com/HaxeFoundation/haxe.git"; 10 + sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3"; 11 fetchSubmodules = true; 12 13 + # Tag 3.2.1 14 + rev = "deab4424399b520750671e51e5f5c2684e942c17"; 15 }; 16 17 prePatch = ''
+18 -16
pkgs/development/compilers/haxe/haxelib-nix.patch
··· 1 - diff --git a/extra/haxelib_src/src/tools/haxelib/Main.hx b/extra/haxelib_src/src/tools/haxelib/Main.hx 2 - index a44a785..0eb811a 100644 3 --- a/extra/haxelib_src/src/tools/haxelib/Main.hx 4 +++ b/extra/haxelib_src/src/tools/haxelib/Main.hx 5 - @@ -996,21 +996,26 @@ class Main { 6 } 7 - 8 function checkRec( prj : String, version : String, l : List<{ project : String, version : String, info : Infos }> ) { 9 - var pdir = getRepository() + Data.safe(prj); 10 - if( !FileSystem.exists(pdir) ) ··· 44 var json = try File.getContent(vdir+"/"+Data.JSON) catch( e : Dynamic ) null; 45 var inf = Data.readData(json,false); 46 l.add({ project : prj, version : version, info: inf }); 47 - @@ -1025,15 +1030,21 @@ class Main { 48 var a = args[argcur++].split(":"); 49 checkRec(a[0],a[1],list); 50 } ··· 73 var ndir = dir + "ndll"; 74 if( FileSystem.exists(ndir) ) { 75 var sysdir = ndir+"/"+Sys.systemName(); 76 - @@ -1153,21 +1164,39 @@ class Main { 77 - print(' Path: $devPath'); 78 } 79 - 80 + function getNixLib(project:String):Null<String> 81 + { 82 + var hlibPath = Sys.getEnv("HAXELIB_PATH"); ··· 91 + } 92 + return null; 93 + } 94 - + 95 function run() { 96 - var rep = getRepository(); 97 var project = param("Library"); ··· 103 - pdir += "/"; 104 - var version = temp[1] != null ? temp[1] : getCurrent(pdir); 105 - var dev = try getDev(pdir) catch ( e : Dynamic ) null; 106 - - var vdir = dev!=null ? dev : pdir + Data.safe(version); 107 - - var rdir = vdir + "/run.n"; 108 - - if( !FileSystem.exists(rdir) ) 109 - - throw "Library "+project+" version "+version+" does not have a run script"; 110 + var vdir = this.getNixLib(project); 111 + if (vdir == null) { 112 + var rep = getRepository(); ··· 121 + if( !FileSystem.exists(rdir) ) 122 + throw "Library "+project+" version "+version+" does not have a run script"; 123 + } 124 - args.push(Sys.getCwd()); 125 - Sys.setCwd(vdir); 126 - var cmd = "neko run.n";
··· 1 + diff --git a/src/tools/haxelib/Main.hx b/src/tools/haxelib/Main.hx 2 + index dc18815..def5231 100644 3 --- a/extra/haxelib_src/src/tools/haxelib/Main.hx 4 +++ b/extra/haxelib_src/src/tools/haxelib/Main.hx 5 + @@ -1301,21 +1301,26 @@ class Main { 6 } 7 + 8 function checkRec( prj : String, version : String, l : List<{ project : String, version : String, info : Infos }> ) { 9 - var pdir = getRepository() + Data.safe(prj); 10 - if( !FileSystem.exists(pdir) ) ··· 44 var json = try File.getContent(vdir+"/"+Data.JSON) catch( e : Dynamic ) null; 45 var inf = Data.readData(json,false); 46 l.add({ project : prj, version : version, info: inf }); 47 + @@ -1330,15 +1335,21 @@ class Main { 48 var a = args[argcur++].split(":"); 49 checkRec(a[0],a[1],list); 50 } ··· 73 var ndir = dir + "ndll"; 74 if( FileSystem.exists(ndir) ) { 75 var sysdir = ndir+"/"+Sys.systemName(); 76 + @@ -1491,23 +1502,43 @@ class Main { 77 + ); 78 } 79 + 80 + function getNixLib(project:String):Null<String> 81 + { 82 + var hlibPath = Sys.getEnv("HAXELIB_PATH"); ··· 91 + } 92 + return null; 93 + } 94 + 95 function run() { 96 - var rep = getRepository(); 97 var project = param("Library"); ··· 103 - pdir += "/"; 104 - var version = temp[1] != null ? temp[1] : getCurrent(pdir); 105 - var dev = try getDev(pdir) catch ( e : Dynamic ) null; 106 + - var vdir = dev != null ? dev : pdir + Data.safe(version); 107 + 108 + args.push(cli.cwd); 109 + + 110 + var vdir = this.getNixLib(project); 111 + if (vdir == null) { 112 + var rep = getRepository(); ··· 121 + if( !FileSystem.exists(rdir) ) 122 + throw "Library "+project+" version "+version+" does not have a run script"; 123 + } 124 + cli.cwd = vdir; 125 + - 126 + var callArgs = 127 + switch try [Data.readData(File.getContent(vdir + '/haxelib.json'), false), null] catch (e:Dynamic) [null, e] { 128 + case [null, e]: