ecl: inform ecl about libraries to link against via configure flags
All libraries that ecl will have compiled libraries and executables link against now have their own --with-<dep>-incdir and --with-<dep>-libdir flag which is perfect for our distinct lib and dev outputs. Consequently, we can get rid of the NIX_LDFLAGS-based hack in the wrapper since ecl can figure out which flags to pass on its own.
This commit is contained in:
parent
52279811f5
commit
38b4a4364d
|
@ -45,20 +45,20 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
(if threadSupport then "--enable-threads" else "--disable-threads")
|
(if threadSupport then "--enable-threads" else "--disable-threads")
|
||||||
"--with-gmp-prefix=${lib.getDev gmp}"
|
"--with-gmp-incdir=${lib.getDev gmp}/include"
|
||||||
"--with-libffi-prefix=${lib.getDev libffi}"
|
"--with-gmp-libdir=${lib.getLib gmp}/lib"
|
||||||
] ++ lib.optional useBoehmgc "--with-libgc-prefix=${lib.getDev boehmgc}"
|
"--with-libffi-incdir=${lib.getDev libffi}/include"
|
||||||
++ lib.optional (!noUnicode) "--enable-unicode";
|
"--with-libffi-libdir=${lib.getLib libffi}/lib"
|
||||||
|
] ++ lib.optionals useBoehmgc [
|
||||||
|
"--with-libgc-incdir=${lib.getDev boehmgc}/include"
|
||||||
|
"--with-libgc-libdir=${lib.getLib boehmgc}/lib"
|
||||||
|
] ++ lib.optional (!noUnicode) "--enable-unicode";
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
postInstall = let
|
postInstall = ''
|
||||||
ldArgs = lib.strings.concatMapStringsSep " "
|
|
||||||
(l: ''--prefix NIX_LDFLAGS ' ' "-L${l.lib or l.out or l}/lib"'')
|
|
||||||
([ gmp libffi ] ++ lib.optional useBoehmgc boehmgc);
|
|
||||||
in ''
|
|
||||||
sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
|
sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
|
||||||
wrapProgram "$out/bin/ecl" --prefix PATH ':' "${gcc}/bin" ${ldArgs}
|
wrapProgram "$out/bin/ecl" --prefix PATH ':' "${gcc}/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue