Skip to content

Commit

Permalink
Merge pull request #114168 from alwinber/fix-io
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 authored Feb 24, 2021
2 parents 21dc12c + 96876f1 commit 05f5a8d
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions pkgs/development/interpreters/io/default.nix
Original file line number Diff line number Diff line change
@@ -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
];
Expand All @@ -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
Expand Down

0 comments on commit 05f5a8d

Please sign in to comment.