2015-09-10 18:30:33 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch, boehmgc, zlib, sqlite, pcre }:
|
2009-11-30 02:05:07 +01:00
|
|
|
|
2012-10-07 11:18:25 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "neko-${version}";
|
2013-03-26 19:53:05 +01:00
|
|
|
version = "2.0.0";
|
2009-11-30 02:05:07 +01:00
|
|
|
|
2012-10-07 11:18:25 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://nekovm.org/_media/neko-${version}.tar.gz";
|
2013-03-26 19:53:05 +01:00
|
|
|
sha256 = "1lcm1ahbklfpd5lnqjwmvyj2vr85jbq57hszk5jgq0x6yx6p3927";
|
2012-10-07 11:18:25 +02:00
|
|
|
};
|
2009-11-30 02:05:07 +01:00
|
|
|
|
2015-09-10 18:30:33 +02:00
|
|
|
patches = stdenv.lib.singleton (fetchpatch {
|
|
|
|
url = "https://github.com/HaxeFoundation/neko/commit/"
|
|
|
|
+ "ccc78c29deab7971e1369f4fe3dedd14cf9f3128.patch";
|
|
|
|
sha256 = "1nya50rzai15hmpq2azganjxzgrfydf30glfwirgw6q8z7z3wpkq";
|
|
|
|
});
|
|
|
|
|
2012-10-07 11:18:25 +02:00
|
|
|
prePatch = with stdenv.lib; let
|
|
|
|
libs = concatStringsSep "," (map (lib: "\"${lib}/include\"") buildInputs);
|
|
|
|
in ''
|
|
|
|
sed -i -e '/^search_includes/,/^}/c \
|
|
|
|
search_includes = function(_) { return $array(${libs}) }
|
|
|
|
' src/tools/install.neko
|
|
|
|
sed -i -e '/allocated = strdup/s|"[^"]*"|"'"$out/lib/neko:$out/bin"'"|' \
|
|
|
|
vm/load.c
|
2012-10-07 23:10:42 +02:00
|
|
|
# temporarily, fixed in 1.8.3
|
|
|
|
sed -i -e 's/^#if defined(_64BITS)/& || defined(__x86_64__)/' vm/neko.h
|
2012-10-07 11:18:25 +02:00
|
|
|
|
|
|
|
for disabled_mod in mod_neko{,2} mod_tora{,2} mysql ui; do
|
|
|
|
sed -i -e '/^libs/,/^}/{/^\s*'"$disabled_mod"'\s*=>/,/^\s*}/d}' \
|
|
|
|
src/tools/install.neko
|
|
|
|
done
|
|
|
|
'';
|
2009-11-30 02:05:07 +01:00
|
|
|
|
2012-10-07 11:18:25 +02:00
|
|
|
makeFlags = "INSTALL_PREFIX=$(out)";
|
|
|
|
buildInputs = [ boehmgc zlib sqlite pcre ];
|
|
|
|
dontStrip = true;
|
2010-03-17 00:34:56 +01:00
|
|
|
|
2012-10-07 11:18:25 +02:00
|
|
|
preInstall = ''
|
|
|
|
install -vd "$out/lib" "$out/bin"
|
2009-11-30 02:05:07 +01:00
|
|
|
'';
|
|
|
|
|
2012-10-07 11:18:25 +02:00
|
|
|
meta = {
|
|
|
|
description = "A high-level dynamically typed programming language";
|
2009-11-30 02:05:07 +01:00
|
|
|
homepage = http://nekovm.org;
|
2012-10-07 11:18:25 +02:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-11-30 02:05:07 +01:00
|
|
|
};
|
2012-10-07 11:18:25 +02:00
|
|
|
}
|