diff --git a/pkgs/development/interpreters/io/default.nix b/pkgs/development/interpreters/io/default.nix index d0a3b20e5038c..48462a333bcb3 100644 --- a/pkgs/development/interpreters/io/default.nix +++ b/pkgs/development/interpreters/io/default.nix @@ -1,18 +1,27 @@ -{ lib, stdenv, fetchFromGitHub, cmake, zlib, sqlite, gmp, libffi, cairo, +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib, sqlite, gmp, libffi, cairo, ncurses, freetype, libGLU, libGL, libpng, libtiff, libjpeg, readline, libsndfile, libxml2, freeglut, libsamplerate, pcre, libevent, libedit, yajl, python3, openssl, glfw, pkg-config, libpthreadstubs, libXdmcp, libmemcached }: stdenv.mkDerivation { - name = "io-2015.11.11"; + pname = "io"; + version = "2017.09.06"; src = fetchFromGitHub { owner = "stevedekorte"; repo = "io"; - rev = "1fc725e0a8635e2679cbb20521f4334c25273caa"; - sha256 = "0ll2kd72zy8vf29sy0nnx3awk7nywpwpv21rvninjjaqkygrc0qw"; + rev = "b8a18fc199758ed09cd2f199a9bc821f6821072a"; + sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223"; }; + patches = [ + (fetchpatch { + name = "check-for-sysctl-h.patch"; + url = "https://github.com/IoLanguage/io/pull/446/commits/9f3e4d87b6d4c1bf583134d55d1cf92d3464c49f.patch"; + sha256 = "9f06073ac17f26c2ef6298143bdd1babe7783c228f9667622aa6c91bb7ec7fa0"; + }) + ]; + nativeBuildInputs = [ cmake ]; @@ -32,6 +41,17 @@ stdenv.mkDerivation { sed -ie \ "s/add_subdirectory(addons)/#add_subdirectory(addons)/g" \ CMakeLists.txt + # Bind Libs STATIC to avoid a segfault when relinking + sed -i 's/basekit SHARED/basekit STATIC/' libs/basekit/CMakeLists.txt + sed -i 's/garbagecollector SHARED/garbagecollector STATIC/' libs/garbagecollector/CMakeLists.txt + sed -i 's/coroutine SHARED/coroutine STATIC/' libs/coroutine/CMakeLists.txt + ''; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/io + $out/bin/io_static ''; # for gcc5; c11 inline semantics breaks the build