suitesparse: build shared libraries

This commit is contained in:
Thomas Tuegel
2015-06-04 07:09:29 -05:00
parent adcdec2e70
commit e36b3ec0a5
2 changed files with 15 additions and 16 deletions

View File

@@ -36,6 +36,18 @@ stdenv.mkDerivation {
NIX_CFLAGS = "-fPIC";
postInstall = ''
# Build and install shared library
(
cd "$(mktemp -d)"
for i in "$out"/lib/lib*.a; do
ar -x $i
done
gcc *.o --shared -o "$out/lib/libsuitesparse.so"
)
for i in umfpack cholmod amd camd colamd spqr; do
ln -s libsuitesparse.so "$out"/lib/lib$i.so;
done
# Install documentation
outdoc=$out/share/doc/${name}
mkdir -p $outdoc