Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 72 lines 2.3 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib, sqlite, gmp, libffi, cairo, 2 ncurses, freetype, libGLU, libGL, libpng, libtiff, libjpeg, readline, libsndfile, 3 libxml2, libglut, libsamplerate, pcre, libevent, libedit, yajl, 4 python3, openssl, glfw, pkg-config, libpthreadstubs, libXdmcp, libmemcached 5}: 6 7stdenv.mkDerivation { 8 pname = "io"; 9 version = "2017.09.06"; 10 src = fetchFromGitHub { 11 owner = "stevedekorte"; 12 repo = "io"; 13 rev = "b8a18fc199758ed09cd2f199a9bc821f6821072a"; 14 sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223"; 15 }; 16 17 patches = [ 18 (fetchpatch { 19 name = "check-for-sysctl-h.patch"; 20 url = "https://github.com/IoLanguage/io/pull/446/commits/9f3e4d87b6d4c1bf583134d55d1cf92d3464c49f.patch"; 21 sha256 = "9f06073ac17f26c2ef6298143bdd1babe7783c228f9667622aa6c91bb7ec7fa0"; 22 }) 23 ]; 24 25 nativeBuildInputs = [ 26 cmake 27 pkg-config 28 ]; 29 30 buildInputs = [ 31 zlib sqlite gmp libffi cairo ncurses freetype 32 libGLU libGL libpng libtiff libjpeg readline libsndfile libxml2 33 libglut libsamplerate pcre libevent libedit yajl 34 glfw openssl libpthreadstubs libXdmcp 35 libmemcached python3 36 ]; 37 38 preConfigure = '' 39 # The Addon generation (AsyncRequest and a others checked) seems to have 40 # trouble with building on Virtual machines. Disabling them until it 41 # can be fully investigated. 42 sed -ie \ 43 "s/add_subdirectory(addons)/#add_subdirectory(addons)/g" \ 44 CMakeLists.txt 45 # Bind Libs STATIC to avoid a segfault when relinking 46 sed -i 's/basekit SHARED/basekit STATIC/' libs/basekit/CMakeLists.txt 47 sed -i 's/garbagecollector SHARED/garbagecollector STATIC/' libs/garbagecollector/CMakeLists.txt 48 sed -i 's/coroutine SHARED/coroutine STATIC/' libs/coroutine/CMakeLists.txt 49 ''; 50 51 doInstallCheck = true; 52 53 installCheckPhase = '' 54 $out/bin/io 55 $out/bin/io_static 56 ''; 57 58 # for gcc5; c11 inline semantics breaks the build 59 env.NIX_CFLAGS_COMPILE = "-fgnu89-inline"; 60 61 meta = with lib; { 62 description = "Io programming language"; 63 homepage = "https://iolanguage.org/"; 64 license = licenses.bsd3; 65 66 maintainers = with maintainers; [ 67 raskin 68 maggesi 69 ]; 70 platforms = [ "x86_64-linux" ]; 71 }; 72}