2021-03-20 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, boehmgc, zlib, sqlite, pcre, cmake, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls, openssl, pkgs, gtk2, libpthreadstubs
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "neko";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "2.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "HaxeFoundation";
|
|
|
|
repo = "neko";
|
|
|
|
rev = "v${lib.replaceStrings [ "." ] [ "-" ] version}";
|
|
|
|
sha256 = "19rc59cx7qqhcqlb0znwbnwbg04c1yq6xmvrwm1xi46k3vxa957g";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config git ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs =
|
|
|
|
[ boehmgc zlib sqlite pcre apacheHttpd apr aprutil
|
|
|
|
libmysqlclient mbedtls openssl libpthreadstubs ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional stdenv.isLinux gtk2
|
|
|
|
++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
|
2020-04-24 23:36:52 +00:00
|
|
|
pkgs.darwin.apple_sdk.frameworks.Carbon];
|
|
|
|
cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
bin/neko bin/test.n
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A high-level dynamically typed programming language";
|
|
|
|
homepage = "https://nekovm.org";
|
2021-03-20 04:20:00 +00:00
|
|
|
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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|