summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/boehm-gc
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-01-11 14:35:31 -0600
committerWill Dietz <w@wdtz.org>2018-02-13 09:44:39 -0600
commite4d5928ba37c705cf2a1b5468f87725a2d5e1dfa (patch)
treee12304123279ac75ed14f023471408c9088999f3 /pkgs/development/libraries/boehm-gc
parentff9b494103c6439795a4bed506e08945c92d19c2 (diff)
boehm-gc: fix missing include, fix build w/musl
Also disable-static, don't remember why
Diffstat (limited to 'pkgs/development/libraries/boehm-gc')
-rw-r--r--pkgs/development/libraries/boehm-gc/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix
index f3c58a93872a..9efcf023a455 100644
--- a/pkgs/development/libraries/boehm-gc/default.nix
+++ b/pkgs/development/libraries/boehm-gc/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkgconfig, libatomic_ops, enableLargeConfig ? false
+{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, libatomic_ops, enableLargeConfig ? false
, buildPlatform, hostPlatform
}:
@@ -20,9 +20,19 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "doc" ];
separateDebugInfo = stdenv.isLinux;
+ preConfigure = stdenv.lib.optionalString (stdenv.cc.libc == "musl") ''
+ export NIX_CFLAGS_COMPILE+="-D_GNU_SOURCE -DUSE_MMAP -DHAVE_DL_ITERATE_PHDR"
+ '';
+
+ patches = [ (fetchpatch {
+ url = "https://raw.githubusercontent.com/gentoo/musl/85b6a600996bdd71162b357e9ba93d8559342432/dev-libs/boehm-gc/files/boehm-gc-7.6.0-sys_select.patch";
+ sha256 = "1gydwlklvci30f5dpp5ccw2p2qpph5y41r55wx9idamjlq66fbb3";
+ }) ];
+
configureFlags =
[ "--enable-cplusplus" ]
- ++ lib.optional enableLargeConfig "--enable-large-config";
+ ++ lib.optional enableLargeConfig "--enable-large-config"
+ ++ lib.optional (stdenv.cc.libc == "musl") "--disable-static";
doCheck = true; # not cross;