1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00

mimalloc: (really) unbreak dynamic linking

4d392099 didn't quite do the trick, but this should finally fix
everything -- namely, the -secure.so symlink was broken, and
libmimalloc.so itself was also a symlink that needed to be replaced with
the real shared object file.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2019-12-04 16:24:09 -06:00
parent 58aa380671
commit a2f9bcd132
No known key found for this signature in database
GPG key ID: 25D2038DEB08021D

View file

@ -26,13 +26,16 @@ stdenv.mkDerivation rec {
mv $out/lib/*/include $dev/include
# move everything else into place
mv $out/lib/*/libmimalloc*${soext} $out/lib/libmimalloc${soext}
mv $out/lib/*/libmimalloc*.a $out/lib/libmimalloc.a
mv $out/lib/*/mimalloc*.o $out/lib/mimalloc.o
mv $out/lib/mimalloc-1.0/libmimalloc*${soext}.1.0 $out/lib/libmimalloc${soext}
mv $out/lib/mimalloc-1.0/libmimalloc*.a $out/lib/libmimalloc.a
mv $out/lib/mimalloc-1.0/mimalloc*.o $out/lib/mimalloc.o
# remote duplicate dir. FIXME: try to fix the .cmake file distribution
# so we can re-use it for dependencies...
rm -r $out/lib/mimalloc-1.0/
rm -rf $out/lib/mimalloc-1.0
'' + stdenv.lib.optionalString secureBuild ''
# fix a broken symlink for the -secure alias
ln -sfv $out/lib/libmimalloc.so $out/lib/libmimalloc-secure.so
'';
outputs = [ "out" "dev" ];