2022-11-21 17:40:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, boehmgc, zlib, sqlite, pcre, cmake, pkg-config
|
2022-12-17 10:02:37 +00:00
|
|
|
, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls_2, openssl, pkgs, gtk2, libpthreadstubs
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/HaxeFoundation/neko/pull/224
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/HaxeFoundation/neko/commit/ff5da9b0e96cc0eabc44ad2c10b7a92623ba49ee.patch";
|
|
|
|
sha256 = "sha256-isM7QGPiyXgT2zpIGd+r12vKg7I1rOWYTTWxuECafro=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
2022-12-17 10:02:37 +00:00
|
|
|
libmysqlclient mbedtls_2 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" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
env = lib.optionalAttrs stdenv.cc.isClang {
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
bin/neko bin/test.n
|
|
|
|
'';
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# Called from tools/test.neko line 2
|
|
|
|
# Uncaught exception - Segmentation fault
|
|
|
|
doInstallCheck = !stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|