nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, fetchpatch, boehmgc, zlib, sqlite, pcre, cmake, pkg-config
2, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls_2, openssl, pkgs, gtk2, libpthreadstubs
3}:
4
5stdenv.mkDerivation rec {
6 pname = "neko";
7 version = "2.3.0";
8
9 src = fetchFromGitHub {
10 owner = "HaxeFoundation";
11 repo = "neko";
12 rev = "v${lib.replaceStrings [ "." ] [ "-" ] version}";
13 sha256 = "19rc59cx7qqhcqlb0znwbnwbg04c1yq6xmvrwm1xi46k3vxa957g";
14 };
15
16 patches = [
17 # https://github.com/HaxeFoundation/neko/pull/224
18 (fetchpatch {
19 url = "https://github.com/HaxeFoundation/neko/commit/ff5da9b0e96cc0eabc44ad2c10b7a92623ba49ee.patch";
20 sha256 = "sha256-isM7QGPiyXgT2zpIGd+r12vKg7I1rOWYTTWxuECafro=";
21 })
22 ];
23
24 nativeBuildInputs = [ cmake pkg-config git ];
25 buildInputs =
26 [ boehmgc zlib sqlite pcre apacheHttpd apr aprutil
27 libmysqlclient mbedtls_2 openssl libpthreadstubs ]
28 ++ lib.optional stdenv.isLinux gtk2
29 ++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
30 pkgs.darwin.apple_sdk.frameworks.Carbon];
31 cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
32
33 installCheckPhase = ''
34 bin/neko bin/test.n
35 '';
36
37 # Called from tools/test.neko line 2
38 # Uncaught exception - Segmentation fault
39 doInstallCheck = !stdenv.isDarwin;
40 dontPatchELF = true;
41 dontStrip = true;
42
43 meta = with lib; {
44 description = "A high-level dynamically typed programming language";
45 homepage = "https://nekovm.org";
46 license = [
47 # list based on https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE
48 licenses.gpl2Plus # nekoc, nekoml
49 licenses.lgpl21Plus # mysql.ndll
50 licenses.bsd3 # regexp.ndll
51 licenses.zlib # zlib.ndll
52 licenses.asl20 # mod_neko, mod_tora, mbedTLS
53 licenses.mit # overall, other libs
54 "https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE#L24-L40" # boehm gc
55 ];
56 maintainers = [ maintainers.marcweber maintainers.locallycompact ];
57 platforms = platforms.linux ++ platforms.darwin;
58 };
59}