nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 boehmgc,
6 zlib,
7 sqlite,
8 pcre2,
9 cmake,
10 pkg-config,
11 git,
12 apacheHttpd,
13 apr,
14 aprutil,
15 libmysqlclient,
16 mbedtls,
17 openssl,
18 gtk3,
19 libpthreadstubs,
20 nix-update-script,
21}:
22
23stdenv.mkDerivation rec {
24 pname = "neko";
25 version = "2.4.1";
26
27 src = fetchFromGitHub {
28 owner = "HaxeFoundation";
29 repo = "neko";
30 rev = "v${lib.replaceStrings [ "." ] [ "-" ] version}";
31 hash = "sha256-cTu+AlDnpXAow6jM77Ct9DM8p//z6N1utk7Wsd+0g9U=";
32 };
33
34 nativeBuildInputs = [
35 cmake
36 pkg-config
37 git
38 ];
39 buildInputs = [
40 boehmgc
41 zlib
42 sqlite
43 pcre2
44 apacheHttpd
45 apr
46 aprutil
47 libmysqlclient
48 mbedtls
49 openssl
50 libpthreadstubs
51 ]
52 ++ lib.optional stdenv.hostPlatform.isLinux gtk3;
53 cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
54
55 env = lib.optionalAttrs stdenv.cc.isClang {
56 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
57 };
58
59 installCheckPhase = ''
60 bin/neko bin/test.n
61 '';
62
63 # Called from tools/test.neko line 2
64 # Uncaught exception - Segmentation fault
65 doInstallCheck = !stdenv.hostPlatform.isDarwin;
66 dontPatchELF = true;
67 dontStrip = true;
68
69 passthru.updateScript = nix-update-script { };
70
71 meta = {
72 description = "High-level dynamically typed programming language";
73 homepage = "https://nekovm.org";
74 license = [
75 # list based on https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE
76 lib.licenses.gpl2Plus # nekoc, nekoml
77 lib.licenses.lgpl21Plus # mysql.ndll
78 lib.licenses.bsd3 # regexp.ndll
79 lib.licenses.zlib # zlib.ndll
80 lib.licenses.asl20 # mod_neko, mod_tora, mbedTLS
81 lib.licenses.mit # overall, other libs
82 "https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE#L24-L40" # boehm gc
83 ];
84 maintainers = with lib.maintainers; [
85 marcweber
86 locallycompact
87 ];
88 platforms = lib.platforms.linux ++ lib.platforms.darwin;
89 broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
90 };
91}