Skip to content

Commit

Permalink
mimalloc: (really) unbreak dynamic linking
Browse files Browse the repository at this point in the history
4d39209 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>
  • Loading branch information
thoughtpolice committed Dec 4, 2019
1 parent 58aa380 commit a2f9bcd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkgs/development/libraries/mimalloc/default.nix
Expand Up @@ -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" ];
Expand Down

0 comments on commit a2f9bcd

Please sign in to comment.