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}";
|
|
|
|
version = "1.8.2";
|
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";
|
|
|
|
sha256 = "099727w6dk689z3pcgbhsqjl74zzrh82a5vb2abxynamcqxcgz1w";
|
|
|
|
};
|
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
|
|
|
}
|