Skip to content

Commit

Permalink
echidna-redistributable: link cxxabi as well on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Jan 3, 2024
1 parent c03f44b commit ab1f973
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"--extra-lib-dirs=${stripDylib (ncurses-static)}/lib"
] ++ (if stdenv.hostPlatform.isDarwin then [
"--extra-lib-dirs=${stripDylib (libiconv.override { enableStatic = true; })}/lib"
"--extra-lib-dirs=${stripDylib (libcxxabi)}/lib"
] else [])))
(haskell.lib.compose.enableCabalFlag "static")
];
Expand Down Expand Up @@ -107,7 +108,7 @@
# get the list of dynamic libs from otool and tidy the output
libs=$(${otool} -L $out/bin/echidna | tail -n +2 | sed 's/^[[:space:]]*//' | cut -d' ' -f1)
# get the path for libcxx
cxx=$(echo "$libs" | ${grep} '^/nix/store/.*-libcxx')
cxx=$(echo "$libs" | ${grep} '^/nix/store/.*-libcxx-')
# rewrite /nix/... library paths to point to /usr/lib
chmod 777 $out/bin/echidna
${install_name_tool} -change "$cxx" /usr/lib/libc++.1.dylib $out/bin/echidna
Expand Down

0 comments on commit ab1f973

Please sign in to comment.