2012-10-07 10:18:25 +01:00
|
|
|
{ stdenv, fetchurl, boehmgc, zlib, sqlite, pcre }:
|
2009-11-30 01:05:07 +00:00
|
|
|
|
2012-10-07 10:18:25 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "neko-${version}";
|
2013-03-26 18:53:05 +00:00
|
|
|
version = "2.0.0";
|
2009-11-30 01:05:07 +00:00
|
|
|
|
2012-10-07 10:18:25 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://nekovm.org/_media/neko-${version}.tar.gz";
|
2013-03-26 18:53:05 +00:00
|
|
|
sha256 = "1lcm1ahbklfpd5lnqjwmvyj2vr85jbq57hszk5jgq0x6yx6p3927";
|
2012-10-07 10:18:25 +01:00
|
|
|
};
|
2009-11-30 01:05:07 +00:00
|
|
|
|
2012-10-07 10:18:25 +01: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 22:10:42 +01:00
|
|
|
# temporarily, fixed in 1.8.3
|
|
|
|
sed -i -e 's/^#if defined(_64BITS)/& || defined(__x86_64__)/' vm/neko.h
|
2012-10-07 10:18:25 +01: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 01:05:07 +00:00
|
|
|
|
2012-10-07 10:18:25 +01:00
|
|
|
makeFlags = "INSTALL_PREFIX=$(out)";
|
|
|
|
buildInputs = [ boehmgc zlib sqlite pcre ];
|
|
|
|
dontStrip = true;
|
2010-03-16 23:34:56 +00:00
|
|
|
|
2012-10-07 10:18:25 +01:00
|
|
|
preInstall = ''
|
|
|
|
install -vd "$out/lib" "$out/bin"
|
2009-11-30 01:05:07 +00:00
|
|
|
'';
|
|
|
|
|
2012-10-07 10:18:25 +01:00
|
|
|
meta = {
|
|
|
|
description = "A high-level dynamically typed programming language";
|
2009-11-30 01:05:07 +00:00
|
|
|
homepage = http://nekovm.org;
|
2012-10-07 10:18:25 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-11-30 01:05:07 +00:00
|
|
|
};
|
2012-10-07 10:18:25 +01:00
|
|
|
}
|