Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-03-26 00:15:53 +00:00
committed by GitHub
46 changed files with 814 additions and 409 deletions

View File

@@ -1,20 +1,44 @@
{ lib, stdenv, fetchgit, coreutils, ocamlPackages, zlib, pcre, neko }:
let inherit (ocamlPackages) ocaml camlp4; in
{ lib, stdenv, fetchFromGitHub, coreutils, ocaml-ng, zlib, pcre, neko, mbedtls }:
let
generic = { version, sha256, prePatch }:
ocamlDependencies = version:
if lib.versionAtLeast version "4.0"
then with ocaml-ng.ocamlPackages; [
ocaml
findlib
sedlex_2
xml-light
ptmap
camlp5
sha
dune_2
luv
ocaml_extlib
] else with ocaml-ng.ocamlPackages_4_05; [
ocaml
camlp4
];
defaultPatch = ''
substituteInPlace extra/haxelib_src/src/haxelib/client/Main.hx \
--replace '"neko"' '"${neko}/bin/neko"'
'';
generic = { sha256, version, prePatch ? defaultPatch }:
stdenv.mkDerivation {
pname = "haxe";
inherit version;
buildInputs = [ocaml zlib pcre neko camlp4];
buildInputs = [ zlib pcre neko ]
++ lib.optional (lib.versionAtLeast version "4.1") [ mbedtls ]
++ ocamlDependencies version;
src = fetchgit {
url = "https://github.com/HaxeFoundation/haxe.git";
inherit sha256;
src = fetchFromGitHub {
owner = "HaxeFoundation";
repo = "haxe";
rev = version;
fetchSubmodules = true;
rev = "refs/tags/${version}";
inherit sha256;
};
inherit prePatch;
@@ -77,8 +101,8 @@ let
meta = with lib; {
description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
homepage = "https://haxe.org";
license = with licenses; [ gpl2 bsd2 /*?*/ ]; # -> docs/license.txt
maintainers = [ maintainers.marcweber ];
license = with licenses; [ gpl2Plus mit ]; # based on upstream opam file
maintainers = [ maintainers.marcweber maintainers.locallycompact ];
platforms = platforms.linux ++ platforms.darwin;
};
};
@@ -89,15 +113,20 @@ in {
sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
prePatch = ''
sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' main.ml
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/tools/haxelib/Main.hx
substituteInPlace extra/haxelib_src/src/tools/haxelib/Main.hx \
--replace '"neko"' '"${neko}/bin/neko"'
'';
};
haxe_3_4 = generic {
version = "3.4.6";
sha256 = "1myc4b8fwp0f9vky17wv45n34a583f5sjvajsc93f5gm1wanp4if";
prePatch = ''
${defaultPatch}
sed -i -re 's!(let +prefix_path += +).*( +in)!\1"'"$out/"'"\2!' src/main.ml
sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
'';
};
haxe_4_2 = generic {
version = "4.2.1";
sha256 = "sha256-0j6M21dh8DB1gC/bPYNJrVuDbJyqQbP+61ItO5RBUcA=";
};
}

View File

@@ -1,14 +1,16 @@
{ lib, stdenv, fetchurl, boehmgc, zlib, sqlite, pcre, cmake, pkg-config
{ lib, stdenv, fetchFromGitHub, boehmgc, zlib, sqlite, pcre, cmake, pkg-config
, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls, openssl, pkgs, gtk2, libpthreadstubs
}:
stdenv.mkDerivation rec {
pname = "neko";
version = "2.2.0";
version = "2.3.0";
src = fetchurl {
url = "https://nekovm.org/media/neko-${version}-src.tar.gz";
sha256 = "1qv47zaa0vzhjlq5wb71627n7dbsxpc1gqpg0hsngjxnbnh1q46g";
src = fetchFromGitHub {
owner = "HaxeFoundation";
repo = "neko";
rev = "v${lib.replaceStrings [ "." ] [ "-" ] version}";
sha256 = "19rc59cx7qqhcqlb0znwbnwbg04c1yq6xmvrwm1xi46k3vxa957g";
};
nativeBuildInputs = [ cmake pkg-config git ];
@@ -31,8 +33,17 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "A high-level dynamically typed programming language";
homepage = "https://nekovm.org";
license = licenses.lgpl21;
maintainers = [ maintainers.marcweber ];
license = [
# list based on https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE
licenses.gpl2Plus # nekoc, nekoml
licenses.lgpl21Plus # mysql.ndll
licenses.bsd3 # regexp.ndll
licenses.zlib # zlib.ndll
licenses.asl20 # mod_neko, mod_tora, mbedTLS
licenses.mit # overall, other libs
"https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE#L24-L40" # boehm gc
];
maintainers = [ maintainers.marcweber maintainers.locallycompact ];
platforms = platforms.linux ++ platforms.darwin;
};
}