Merge pull request #21072 from boronine/neko-2.1.0

neko: 2.0.0 -> 2.1.0
This commit is contained in:
Tuomas Tynkkynen 2016-12-13 18:51:33 +02:00 committed by GitHub
commit c5ed16406b
1 changed files with 38 additions and 34 deletions

View File

@ -1,50 +1,54 @@
{ stdenv, fetchurl, fetchpatch, boehmgc, zlib, sqlite, pcre }: { stdenv, fetchurl, fetchpatch, boehmgc, zlib, sqlite, pcre, cmake, pkgconfig
, git, apacheHttpd, apr, aprutil, mariadb, mbedtls, openssl, pkgs, gtk2
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "neko-${version}"; name = "neko-${version}";
version = "2.0.0"; version = "2.1.0";
src = fetchurl { src = fetchurl {
url = "http://nekovm.org/_media/neko-${version}.tar.gz"; url = "http://nekovm.org/media/neko-${version}-src.tar.gz";
sha256 = "1lcm1ahbklfpd5lnqjwmvyj2vr85jbq57hszk5jgq0x6yx6p3927"; sha256 = "15ng9ad0jspnhj38csli1pvsv3nxm75f0nlps7i10194jvzdb4qc";
}; };
patches = stdenv.lib.singleton (fetchpatch { # Patches backported with reference to https://github.com/HaxeFoundation/neko/issues/131
url = "https://github.com/HaxeFoundation/neko/commit/" # They can probably be removed when bumping to next version
+ "ccc78c29deab7971e1369f4fe3dedd14cf9f3128.patch"; patches = [
sha256 = "1nya50rzai15hmpq2azganjxzgrfydf30glfwirgw6q8z7z3wpkq"; (fetchpatch {
}); url = "https://github.com/HaxeFoundation/neko/commit/"
+ "a8c71ad97faaccff6c6e9e09eba2d5efd022f8dc.patch";
sha256 = "0mnx15cdjs8mnl01mhc9z2gpzh4d1q0ygqnjackrqxz6x235ydyp";
})
(fetchpatch {
url = "https://github.com/HaxeFoundation/neko/commit/"
+ "fe87462d9c7a6ee27e28f5be5e4fc0ac87b34574.patch";
sha256 = "1jbmq6j32vg3qv20dbh82cp54886lgrh7gkcqins8a2y4l4dl3sc";
})
];
prePatch = with stdenv.lib; let buildInputs =
libs = concatStringsSep "," (map (lib: "\"${lib.dev}/include\"") buildInputs); [ boehmgc zlib sqlite pcre cmake pkgconfig git apacheHttpd apr aprutil
in '' mariadb.client mbedtls openssl ]
sed -i -e '/^search_includes/,/^}/c \ ++ stdenv.lib.optional stdenv.isLinux gtk2
search_includes = function(_) { return $array(${libs}) } ++ stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
' src/tools/install.neko pkgs.darwin.apple_sdk.frameworks.Carbon];
sed -i -e '/allocated = strdup/s|"[^"]*"|"'"$out/lib/neko:$out/bin"'"|' \ cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
vm/load.c prePatch = ''
# temporarily, fixed in 1.8.3 sed -i -e '/allocated = strdup/s|"[^"]*"|"'"$out/lib/neko:$out/bin"'"|' vm/load.c
sed -i -e 's/^#if defined(_64BITS)/& || defined(__x86_64__)/' vm/neko.h '';
for disabled_mod in mod_neko{,2} mod_tora{,2} mysql ui; do checkPhase = ''
sed -i -e '/^libs/,/^}/{/^\s*'"$disabled_mod"'\s*=>/,/^\s*}/d}' \ bin/neko bin/test.n
src/tools/install.neko
done
''; '';
makeFlags = "INSTALL_PREFIX=$(out)";
buildInputs = [ boehmgc zlib sqlite pcre ];
dontStrip = true; dontStrip = true;
preInstall = '' meta = with stdenv.lib; {
install -vd "$out/lib" "$out/bin"
'';
meta = {
description = "A high-level dynamically typed programming language"; description = "A high-level dynamically typed programming language";
homepage = http://nekovm.org; homepage = http://nekovm.org;
license = stdenv.lib.licenses.lgpl21; license = licenses.lgpl21;
maintainers = [ stdenv.lib.maintainers.marcweber ]; maintainers = [ maintainers.marcweber ];
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux ++ platforms.darwin;
}; };
} }