2016-12-09 09:16:27 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, boehmgc, zlib, sqlite, pcre, cmake, pkgconfig
|
|
|
|
, git, apacheHttpd, apr, aprutil, mariadb, mbedtls, openssl, pkgs, gtk2
|
|
|
|
}:
|
2009-11-30 01:05:07 +00:00
|
|
|
|
2012-10-07 09:18:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "neko-${version}";
|
2016-12-09 09:16:27 +00:00
|
|
|
version = "2.1.0";
|
2009-11-30 01:05:07 +00:00
|
|
|
|
2012-10-07 09:18:25 +00:00
|
|
|
src = fetchurl {
|
2016-12-09 09:16:27 +00:00
|
|
|
url = "http://nekovm.org/media/neko-${version}-src.tar.gz";
|
|
|
|
sha256 = "15ng9ad0jspnhj38csli1pvsv3nxm75f0nlps7i10194jvzdb4qc";
|
2012-10-07 09:18:25 +00:00
|
|
|
};
|
2009-11-30 01:05:07 +00:00
|
|
|
|
2016-12-11 17:33:01 +00:00
|
|
|
# Patches backported with reference to https://github.com/HaxeFoundation/neko/issues/131
|
|
|
|
# They can probably be removed when bumping to next version
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/HaxeFoundation/neko/commit/"
|
|
|
|
+ "a8c71ad97faaccff6c6e9e09eba2d5efd022f8dc.patch";
|
|
|
|
sha256 = "0mnx15cdjs8mnl01mhc9z2gpzh4d1q0ygqnjackrqxz6x235ydyp";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/HaxeFoundation/neko/commit/"
|
|
|
|
+ "fe87462d9c7a6ee27e28f5be5e4fc0ac87b34574.patch";
|
|
|
|
sha256 = "1jbmq6j32vg3qv20dbh82cp54886lgrh7gkcqins8a2y4l4dl3sc";
|
|
|
|
})
|
2017-05-20 21:14:08 +00:00
|
|
|
# https://github.com/HaxeFoundation/neko/pull/165
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/HaxeFoundation/neko/commit/"
|
|
|
|
+ "c6d9c6d796200990b3b6a53a4dc716c9192398e6.patch";
|
|
|
|
sha256 = "1pq0qhhb9gbhc3zbgylwp0amhwsz0q0ggpj6v2xgv0hfy7d63rcd";
|
|
|
|
})
|
2017-11-08 15:05:19 +00:00
|
|
|
# Glibc 2.26 no longer has xlocale.h, patch backported from upstream commit
|
|
|
|
# e286c8f3301fa443255a3101d14b7392467051b8.
|
|
|
|
./xlocale-fix.patch
|
2016-12-11 17:33:01 +00:00
|
|
|
];
|
|
|
|
|
2016-12-09 09:16:27 +00:00
|
|
|
buildInputs =
|
|
|
|
[ boehmgc zlib sqlite pcre cmake pkgconfig git apacheHttpd apr aprutil
|
|
|
|
mariadb.client mbedtls openssl ]
|
2016-12-11 17:11:24 +00:00
|
|
|
++ stdenv.lib.optional stdenv.isLinux gtk2
|
2016-12-09 09:16:27 +00:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
|
2016-12-11 17:11:24 +00:00
|
|
|
pkgs.darwin.apple_sdk.frameworks.Carbon];
|
|
|
|
cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
|
2016-12-09 09:16:27 +00:00
|
|
|
prePatch = ''
|
|
|
|
sed -i -e '/allocated = strdup/s|"[^"]*"|"'"$out/lib/neko:$out/bin"'"|' vm/load.c
|
|
|
|
'';
|
2010-03-16 23:34:56 +00:00
|
|
|
|
2016-12-09 09:16:27 +00:00
|
|
|
checkPhase = ''
|
|
|
|
bin/neko bin/test.n
|
2009-11-30 01:05:07 +00:00
|
|
|
'';
|
|
|
|
|
2017-12-03 10:30:08 +00:00
|
|
|
doCheck = true;
|
2016-12-09 09:16:27 +00:00
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2012-10-07 09:18:25 +00:00
|
|
|
description = "A high-level dynamically typed programming language";
|
2009-11-30 01:05:07 +00:00
|
|
|
homepage = http://nekovm.org;
|
2016-12-09 09:16:27 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.marcweber ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2009-11-30 01:05:07 +00:00
|
|
|
};
|
2012-10-07 09:18:25 +00:00
|
|
|
}
|