From 38b4a4364de02412795e4a452a0cfab9189d228f Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 8 Aug 2021 20:09:38 +0200 Subject: [PATCH] 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--incdir and --with--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. --- pkgs/development/compilers/ecl/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix index 269beef9e7a..e891c898c47 100644 --- a/pkgs/development/compilers/ecl/default.nix +++ b/pkgs/development/compilers/ecl/default.nix @@ -45,20 +45,20 @@ stdenv.mkDerivation { configureFlags = [ (if threadSupport then "--enable-threads" else "--disable-threads") - "--with-gmp-prefix=${lib.getDev gmp}" - "--with-libffi-prefix=${lib.getDev libffi}" - ] ++ lib.optional useBoehmgc "--with-libgc-prefix=${lib.getDev boehmgc}" - ++ lib.optional (!noUnicode) "--enable-unicode"; + "--with-gmp-incdir=${lib.getDev gmp}/include" + "--with-gmp-libdir=${lib.getLib gmp}/lib" + "--with-libffi-incdir=${lib.getDev libffi}/include" + "--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" ]; - postInstall = let - ldArgs = lib.strings.concatMapStringsSep " " - (l: ''--prefix NIX_LDFLAGS ' ' "-L${l.lib or l.out or l}/lib"'') - ([ gmp libffi ] ++ lib.optional useBoehmgc boehmgc); - in '' + postInstall = '' 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; {