erlang: make `configureFlags` appending instead of overwriting

The erlang `generic-builder` accepts a lot of arguments that would
affect the `configureFlags` passed to `mkDerivation`. Though all these
arguments would be without any effect if additionally `configureFlags`
is passed and not the empty list.

This change should make it easier to "compose" arbitrary erlang overrides.
This commit is contained in:
Norbert Melzer 2020-08-30 11:41:14 +02:00
parent 7596bb4739
commit 29ac9bedf0
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,8 @@ in stdenv.mkDerivation ({
++ optional odbcSupport "--with-odbc=${unixODBC}" ++ optional odbcSupport "--with-odbc=${unixODBC}"
++ optional wxSupport "--enable-wx" ++ optional wxSupport "--enable-wx"
++ optional withSystemd "--enable-systemd" ++ optional withSystemd "--enable-systemd"
++ optional stdenv.isDarwin "--enable-darwin-64bit"; ++ optional stdenv.isDarwin "--enable-darwin-64bit"
++ configureFlags;
# install-docs will generate and install manpages and html docs # install-docs will generate and install manpages and html docs
# (PDFs are generated only when fop is available). # (PDFs are generated only when fop is available).
@ -131,7 +132,6 @@ in stdenv.mkDerivation ({
// optionalAttrs (postUnpack != "") { inherit postUnpack; } // optionalAttrs (postUnpack != "") { inherit postUnpack; }
// optionalAttrs (patches != []) { inherit patches; } // optionalAttrs (patches != []) { inherit patches; }
// optionalAttrs (patchPhase != "") { inherit patchPhase; } // optionalAttrs (patchPhase != "") { inherit patchPhase; }
// optionalAttrs (configureFlags != []) { inherit configureFlags; }
// optionalAttrs (configurePhase != "") { inherit configurePhase; } // optionalAttrs (configurePhase != "") { inherit configurePhase; }
// optionalAttrs (preConfigure != "") { inherit preConfigure; } // optionalAttrs (preConfigure != "") { inherit preConfigure; }
// optionalAttrs (postConfigure != "") { inherit postConfigure; } // optionalAttrs (postConfigure != "") { inherit postConfigure; }