3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #96982 from graham33/fix/96981_suitesparse_dylib_names

suitesparse: rename fixDarwinDylibNames override
This commit is contained in:
Jan Tojnar 2020-09-07 16:51:07 +02:00 committed by GitHub
commit 87ec0fb5f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,29 +57,6 @@ stdenv.mkDerivation rec {
"library"
];
# Likely fixed after 5.7.2
# https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/f6daae26ee391e475e2295e77c839aa7c1a8b784
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
# The fixDarwinDylibNames in nixpkgs can't seem to fix all the libraries.
# We manually fix them up here.
fixDarwinDylibNames() {
local flags=()
local old_id
for fn in "$@"; do
flags+=(-change "$PWD/lib/$(basename "$fn")" "$fn")
done
for fn in "$@"; do
if [ -L "$fn" ]; then continue; fi
echo "$fn: fixing dylib"
install_name_tool -id "$fn" "''${flags[@]}" "$fn"
done
}
fixDarwinDylibNames $(find "$out" -name "*.dylib")
'';
meta = with stdenv.lib; {
homepage = "http://faculty.cse.tamu.edu/davis/suitesparse.html";
description = "A suite of sparse matrix algorithms";