treewide: Make all the rest of configureFlags

This commit is contained in:
John Ericson 2018-08-03 12:52:40 -04:00
parent f92ed87372
commit f0d6b385d1
19 changed files with 49 additions and 30 deletions

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
preConfigure = '' preConfigure = ''
NOCONFIGURE=1 ./autogen.sh # autoreconfHook is not enough NOCONFIGURE=1 ./autogen.sh # autoreconfHook is not enough
''; '';
configureFlags = stdenv.lib.optionalString withGNOME "--enable-gnome"; configureFlags = stdenv.lib.optional withGNOME "--enable-gnome";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;
[ perl fltk openssl libjpeg libpng libXcursor libXi libXinerama ]; [ perl fltk openssl libjpeg libpng libXcursor libXi libXinerama ];
configureFlags = "--enable-ssl"; configureFlags = [ "--enable-ssl" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.dillo.org/; homepage = https://www.dillo.org/;

View File

@ -24,10 +24,13 @@ stdenv.mkDerivation rec {
++ optional withTcl tcl ++ optional withTcl tcl
++ optional withCyrus cyrus_sasl; ++ optional withCyrus cyrus_sasl;
configureFlags = optionalString withPerl "--enable-perl " configureFlags = [
+ optionalString withPython "--enable-python " (stdenv.lib.enableFeature withPerl "perl")
+ optionalString withTcl "--enable-tcl --with-tcl=${tcl}/lib " (stdenv.lib.enableFeature withPython "python")
+ optionalString withCyrus "--enable-cyrus "; (stdenv.lib.enableFeature withTcl "tcl")
(stdenv.lib.withFeatureAs withTcl "tcl" "${tcl}/lib")
(stdenv.lib.enableFeature withCyrus "cyrus")
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Advanced IRC bouncer"; description = "Advanced IRC bouncer";

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
preCheck = stdenv.lib.optional doCheck '' preCheck = stdenv.lib.optional doCheck ''
export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}" export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
''; '';
configureFlags = if withJson then "--json" else ""; configureFlags = stdenv.lib.optional withJson "--json";
preBuild='' preBuild=''
export USER=nonexistent-but-specified-user export USER=nonexistent-but-specified-user

View File

@ -12,7 +12,8 @@ stdenv.mkDerivation rec {
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${linux}/lib/modules/${linux.modDirVersion}/build" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${linux}/lib/modules/${linux.modDirVersion}/build"
''; '';
configureFlags="--prefix="; configureFlags= [ "--prefix=" ];
NIX_LDFLAGS = "-lgcc_s"; NIX_LDFLAGS = "-lgcc_s";
makeFlags = "SUID_ROOT= DESTDIR=\$(out) PREFIX="; makeFlags = "SUID_ROOT= DESTDIR=\$(out) PREFIX=";

View File

@ -24,7 +24,9 @@ stdenv.mkDerivation {
./autogen.sh ./autogen.sh
''; '';
configureFlags = if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}"; configureFlags = [
(if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
];
buildPhase = "make 3-stage-bootstrap"; buildPhase = "make 3-stage-bootstrap";
postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin"; postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin";

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
# Upstream strongly recommends against using --with-system-ffmpeg, # Upstream strongly recommends against using --with-system-ffmpeg,
# but we do it anyway because we're so hardcore (and we don't want # but we do it anyway because we're so hardcore (and we don't want
# multiple copies of ffmpeg). # multiple copies of ffmpeg).
configureFlags = stdenv.lib.optionalString (!useInternalFfmpeg) "--with-system-ffmpeg"; configureFlags = stdenv.lib.optional (!useInternalFfmpeg) "--with-system-ffmpeg";
buildInputs = buildInputs =
[ pkgconfig bzip2 gst-plugins-base orc ] [ pkgconfig bzip2 gst-plugins-base orc ]

View File

@ -7,7 +7,7 @@ stdenv.mkDerivation {
sha256 ="0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"; sha256 ="0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa";
}; };
configureFlags = if stdenv.is64bit then "--enable-64bit" else ""; configureFlags = stdenv.lib.optional stdenv.is64bit "--enable-64bit";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "C runtime libraries of ANTLR v3"; description = "C runtime libraries of ANTLR v3";

View File

@ -18,8 +18,7 @@ stdenv.mkDerivation rec {
sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in
''; '';
configureFlags = if stdenv.cc.isClang configureFlags = stdenv.lib.optional stdenv.cc.isClang "--disable-werror";
then [ "--disable-werror" ] else null;
CXXFLAGS="--std=gnu++0x"; # For c++11 constants in lcms2.h CXXFLAGS="--std=gnu++0x"; # For c++11 constants in lcms2.h

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses perl ]; buildInputs = [ ncurses perl ];
configureFlags = stdenv.lib.optionalString (perl == null) "--with-perl-bindings=no"; configureFlags = stdenv.lib.optional (perl == null) "--with-perl-bindings=no";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "C library to generate ICMP echo requests (a.k.a. ping packets)"; description = "C library to generate ICMP echo requests (a.k.a. ping packets)";

View File

@ -10,7 +10,10 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
configureFlags = if stdenv.isCygwin then "--enable-static" else "--enable-shared"; configureFlags = [
(stdenv.lib.enableFeature stdenv.isCygwin "static")
(stdenv.lib.enableFeature (!stdenv.isCygwin) "shared")
];
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "15m1w1qad3dj7r8n5ng1qqcaiyx1gyd6hnc3p2apgjllccdp77qg"; sha256 = "15m1w1qad3dj7r8n5ng1qqcaiyx1gyd6hnc3p2apgjllccdp77qg";
}; };
configureFlags = stdenv.lib.optionalString docSupport "--enable-doc"; configureFlags = stdenv.lib.optionals docSupport "--enable-doc";
buildInputs = [ yacc flex libusb libelf libftdi1 readline ] buildInputs = [ yacc flex libusb libelf libftdi1 readline ]
++ stdenv.lib.optionals docSupport [ texLive texinfo texi2html ]; ++ stdenv.lib.optionals docSupport [ texLive texinfo texi2html ];

View File

@ -10,8 +10,9 @@ stdenv.mkDerivation rec {
buildInputs = [ boost libtool groff ghostscript libgcrypt ]; buildInputs = [ boost libtool groff ghostscript libgcrypt ];
configureFlags = stdenv.lib.optionalString configureFlags = [
(libgcrypt == null) "--without-gcrypt"; (stdenv.lib.optional (libgcrypt == null) "--without-gcrypt")
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Collection of powerful tools for manipulating EPROM load files"; description = "Collection of powerful tools for manipulating EPROM load files";

View File

@ -3,7 +3,7 @@
# flex 2.6.3 causes: undefined reference to `yywrap' # flex 2.6.3 causes: undefined reference to `yywrap'
pkgconfig, fontforge, makeWrapper, flex_2_6_1, bison, pkgconfig, fontforge, makeWrapper, flex_2_6_1, bison,
supportFlags, supportFlags,
buildScript ? null, configureFlags ? "" buildScript ? null, configureFlags ? []
}: }:
with import ./util.nix { inherit lib; }; with import ./util.nix { inherit lib; };

View File

@ -10,8 +10,11 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl zlib ]; buildInputs = [ openssl zlib ];
configureFlags = configureFlags = [
"--with-nicklen=100 --with-topiclen=360 --enable-openssl=${openssl.dev}"; "--with-nicklen=100"
"--with-topiclen=360"
"--enable-openssl=${openssl.dev}"
];
postInstall = "echo postinstall; mkdir -p \${out}/ ; rm -rf \${out}/logs ; ln -s /home/ircd \${out}/logs;"; postInstall = "echo postinstall; mkdir -p \${out}/ ; rm -rf \${out}/logs ; ln -s /home/ircd \${out}/logs;";

View File

@ -12,8 +12,13 @@ stdenv.mkDerivation {
sha256 = "0nr833bl0q4zq52drjxmmpf7bs6kqxwa5kahwwxm9411khkxz0vc"; sha256 = "0nr833bl0q4zq52drjxmmpf7bs6kqxwa5kahwwxm9411khkxz0vc";
}; };
configureFlags = configureFlags = [
"--disable-readline --enable-udev_rules --enable-udev_sync --enable-pkgconfig --enable-applib"; "--disable-readline"
"--enable-udev_rules"
"--enable-udev_sync"
"--enable-pkgconfig"
"--enable-applib"
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ systemd ]; buildInputs = [ systemd ];

View File

@ -18,9 +18,10 @@ stdenv.mkDerivation {
sh autogen.sh sh autogen.sh
''; '';
configureFlags = if gccCross != null then configureFlags = stdenv.lib.optionals (gccCross != null) [
"--enable-firmware CROSS_COMPILE=${gccCross.targetPrefix}" "--enable-firmware"
else ""; "CROSS_COMPILE=${gccCross.targetPrefix}"
];
hardeningDisable = [ "pic" "stackprotector" ]; hardeningDisable = [ "pic" "stackprotector" ];

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile.in --replace ' install-exec-hook' "" substituteInPlace Makefile.in --replace ' install-exec-hook' ""
''; '';
configureFlags = stdenv.lib.optionalString (!withGtk) "--without-gtk"; configureFlags = stdenv.lib.optional (!withGtk) "--without-gtk";
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];

View File

@ -34,8 +34,9 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional (libpsl != null) libpsl ++ stdenv.lib.optional (libpsl != null) libpsl
++ stdenv.lib.optional stdenv.isDarwin perl; ++ stdenv.lib.optional stdenv.isDarwin perl;
configureFlags = configureFlags = [
if openssl != null then "--with-ssl=openssl" else "--without-ssl"; (stdenv.lib.withFeatureAs (openssl != null) "ssl" openssl)
];
doCheck = false; doCheck = false;