diff options
author | Will Dietz <w@wdtz.org> | 2018-04-25 08:09:56 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-04-25 08:18:07 -0500 |
commit | 2d54f8f915166dbdc93ed9497f622799e930bf9b (patch) | |
tree | f2ceedc9f0f7832d7a648a03777e95f15b42191d /pkgs/os-specific/linux/musl | |
parent | 97698b0d6d644cc6d59495e339f6fbf44ff8ac64 (diff) |
musl: build iconv using just-built pieces
This is a bit unusual for a package, but not libc's as they should stand alone.
Diffstat (limited to 'pkgs/os-specific/linux/musl')
-rw-r--r-- | pkgs/os-specific/linux/musl/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index 0912f427430b4..cd102cca00f1c 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -68,6 +68,8 @@ stdenv.mkDerivation rec { dontDisableStatic = true; separateDebugInfo = true; + NIX_DONT_SET_RPATH = true; + postInstall = '' # Not sure why, but link in all but scsi directory as that's what uclibc/glibc do. # Apparently glibc provides scsi itself? @@ -88,8 +90,13 @@ stdenv.mkDerivation rec { substituteInPlace $dev/bin/musl-gcc \ --replace $out/lib/musl-gcc.specs $dev/lib/musl-gcc.specs - # provide 'iconv' utility - $CC ${iconv_c} -o $out/bin/iconv + # provide 'iconv' utility, using just-built headers, libc/ldso + $CC ${iconv_c} -o $out/bin/iconv \ + -I$dev/include \ + -L$out/lib -Wl,-rpath=$out/lib \ + -lc \ + -B $out/lib \ + -Wl,-dynamic-linker=$(ls $out/lib/ld-*) '' + lib.optionalString useBSDCompatHeaders '' install -D ${queue_h} $dev/include/sys/queue.h install -D ${cdefs_h} $dev/include/sys/cdefs.h |