gmp: split into multiple outputs

This commit is contained in:
Vladimír Čunát
2015-10-15 17:43:23 +02:00
parent dd915f82e7
commit 148e03b2f1
24 changed files with 65 additions and 58 deletions

View File

@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
chmod u+x $(pwd)/../${usr_prefix}/bin/mlton
# So the builder runs the binary compiler with gmp.
export LD_LIBRARY_PATH=${gmp}/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${gmp.out}/lib:$LD_LIBRARY_PATH
'' + stdenv.lib.optionalString stdenv.isLinux ''
# Patch ELF interpreter.
@@ -92,10 +92,10 @@ stdenv.mkDerivation rec {
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $out/lib/mlton
# Path to libgmp.
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-link-opt '-lm -lgmp'" "-link-opt '-lm -lgmp -L${gmp}/lib'"
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-link-opt '-lm -lgmp'" "-link-opt '-lm -lgmp -L${gmp.out}/lib'"
# Path to gmp.h.
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-cc-opt '-O1 -fno-common'" "-cc-opt '-O1 -fno-common -I${gmp}/include'"
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-cc-opt '-O1 -fno-common'" "-cc-opt '-O1 -fno-common -I${gmp.dev}/include'"
# Path to the same cc used in the build; needed at runtime.
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "gcc='gcc'" "gcc='"$(type -p cc)"'"