treewide: fix *Flags

This commit is contained in:
Robin Gloster 2019-10-28 10:17:49 +01:00 committed by Jan Tojnar
parent 20b02b80aa
commit ac8eaa8507
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
26 changed files with 107 additions and 99 deletions

View File

@ -37,15 +37,15 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig cmake ];
cmakeFlags = ''
-DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf
-DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf
-DINCLUDE-PROJECTM-TEST=OFF
-DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"}
-DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"}
-DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"}
-DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"}
'';
cmakeFlags = [
"-DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf"
"-DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf"
"-DINCLUDE-PROJECTM-TEST=OFF"
"-DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"}"
"-DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"}"
"-DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"}"
"-DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"}"
];
buildInputs = with stdenv.lib;
[ glew ftgl ]

View File

@ -52,7 +52,7 @@ stdenv.mkDerivation {
sed -e "s|^#\!\(.*/perl.*\)$|#\!\1$perlFlags|" -i perl.d/imap-proxy
'';
buildFlags = if debugBuild then "lumail2-debug" else "";
buildFlags = stdenv.lib.optional debugBuild "lumail2-debug";
installPhase = ''
mkdir -p $out/bin || true

View File

@ -39,20 +39,20 @@ stdenv.mkDerivation rec {
})
];
cmakeFlags = ''
-DUSE_ASPELL=ON
-DUSE_QT_QML=ON
-DFREE_SPACE_BAR_C=ON
-DUSE_MINIUPNP=ON
-DLOCAL_MINIUPNP=ON
-DDBUS_NOTIFY=ON
-DUSE_JS=ON
-DPERL_REGEX=ON
-DUSE_CLI_XMLRPC=ON
-DWITH_SOUNDS=ON
-DLUA_SCRIPT=ON
-DWITH_LUASCRIPTS=ON
'';
cmakeFlags = [
"-DUSE_ASPELL=ON"
"-DUSE_QT_QML=ON"
"-DFREE_SPACE_BAR_C=ON"
"-DUSE_MINIUPNP=ON"
"-DLOCAL_MINIUPNP=ON"
"-DDBUS_NOTIFY=ON"
"-DUSE_JS=ON"
"-DPERL_REGEX=ON"
"-DUSE_CLI_XMLRPC=ON"
"-DWITH_SOUNDS=ON"
"-DLUA_SCRIPT=ON"
"-DWITH_LUASCRIPTS=ON"
];
enableParallelBuilding = true;

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, cmake
{ stdenv
, fetchurl
, cmake
, singlePrec ? true
, mpiEnabled ? false
, fftw
@ -6,7 +8,6 @@
, perl
}:
stdenv.mkDerivation {
name = "gromacs-2019.4";
@ -19,18 +20,27 @@ stdenv.mkDerivation {
buildInputs = [ fftw perl ]
++ (stdenv.lib.optionals mpiEnabled [ openmpi ]);
cmakeFlags = ''
${if singlePrec then "-DGMX_DOUBLE=OFF" else "-DGMX_DOUBLE=ON -DGMX_DEFAULT_SUFFIX=OFF"}
${if mpiEnabled then "-DGMX_MPI:BOOL=TRUE
-DGMX_CPU_ACCELERATION:STRING=SSE4.1
-DGMX_OPENMP:BOOL=TRUE
-DGMX_THREAD_MPI:BOOL=FALSE"
else "-DGMX_MPI:BOOL=FALSE" }
'';
cmakeFlags = (
if singlePrec then [
"-DGMX_DOUBLE=OFF"
] else [
"-DGMX_DOUBLE=ON"
"-DGMX_DEFAULT_SUFFIX=OFF"
]
) ++ (
if mpiEnabled then [
"-DGMX_MPI:BOOL=TRUE"
"-DGMX_CPU_ACCELERATION:STRING=SSE4.1"
"-DGMX_OPENMP:BOOL=TRUE"
"-DGMX_THREAD_MPI:BOOL=FALSE"
] else [
"-DGMX_MPI:BOOL=FALSE"
]
);
meta = with stdenv.lib; {
homepage = "http://www.gromacs.org";
license = licenses.gpl2;
homepage = "http://www.gromacs.org";
license = licenses.gpl2;
description = "Molecular dynamics software package";
longDescription = ''
GROMACS is a versatile package to perform molecular dynamics,

View File

@ -22,14 +22,14 @@ buildGoPackage rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ go-md2man libseccomp libapparmor apparmor-parser which ];
makeFlags = ''BUILDTAGS+=seccomp BUILDTAGS+=apparmor'';
makeFlags = [ "BUILDTAGS+=seccomp" "BUILDTAGS+=apparmor" ];
buildPhase = ''
cd go/src/${goPackagePath}
patchShebangs .
substituteInPlace libcontainer/apparmor/apparmor.go \
--replace /sbin/apparmor_parser ${apparmor-parser}/bin/apparmor_parser
make ${makeFlags} runc
make ${toString makeFlags} runc
'';
installPhase = ''

View File

@ -47,9 +47,9 @@ let
includeDirs = self.buildDependsAgdaShareAgda
++ self.sourceDirectories ++ self.topSourceDirectories
++ [ "." ];
buildFlags = concatStringsSep " " (map (x: "-i " + x) self.includeDirs);
buildFlags = stdenv.lib.concatMap (x: ["-i" x]) self.includeDirs;
agdaWithArgs = "${Agda}/bin/agda ${self.buildFlags}";
agdaWithArgs = "${Agda}/bin/agda ${toString self.buildFlags}";
buildPhase = ''
runHook preBuild

View File

@ -92,7 +92,7 @@ let
attrValues (mkMathcompGenFrom overrides (mathcomp-deps mathcomp-pkg) mathcomp-version);
enableParallelBuilding = true;
buildFlags = optionalString withDoc "doc";
buildFlags = optional withDoc "doc";
COQBIN = "${coq}/bin/";

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
name = "sdl-env";
paths = buildInputs;
};
in "SDLMINUSI=-I${sdl}/include/SDL";
in [ "SDLMINUSI=-I${sdl}/include/SDL" ];
meta = with stdenv.lib; {
description = "Guile bindings for SDL";

View File

@ -10,7 +10,7 @@
} @ args:
let
inherit (stdenv.lib) getVersion versionAtLeast;
inherit (stdenv.lib) getVersion versionAtLeast optional;
in
assert versionAtLeast (getVersion erlang) minimumOTPVersion;
@ -29,9 +29,7 @@ in
inherit debugInfo;
buildFlags = if debugInfo
then "ERL_COMPILER_OPTIONS=debug_info"
else "";
buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info";
preBuild = ''
# The build process uses ./rebar. Link it to the nixpkgs rebar

View File

@ -16,11 +16,11 @@ stdenv.mkDerivation rec {
cd ../build
'';
cmakeFlags = ''
-DGDCM_BUILD_APPLICATIONS=ON
-DGDCM_BUILD_SHARED_LIBS=ON
-DGDCM_USE_VTK=ON
'';
cmakeFlags = [
"-DGDCM_BUILD_APPLICATIONS=ON"
"-DGDCM_BUILD_SHARED_LIBS=ON"
"-DGDCM_USE_VTK=ON"
];
enableParallelBuilding = true;
buildInputs = [ cmake vtk ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.Cocoa ];

View File

@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
cmakeFlags = "
-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3
";
cmakeFlags = [
"-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
];
doCheck = true;
checkTarget = "test";

View File

@ -16,9 +16,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
cmakeFlags = "
-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3
";
cmakeFlags = [
"-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
];
doCheck = true;
checkPhase = ''

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
echo 'INSTALL(DIRECTORY include DESTINATION .)' >> CMakeLists.txt
'';
cmakeFlags="-DLIBTCOD_SAMPLES=OFF";
cmakeFlags = [ "-DLIBTCOD_SAMPLES=OFF" ];
buildInputs = [ cmake SDL libGLU libGL upx zlib ];

View File

@ -11,10 +11,8 @@ with stdenv.lib; stdenv.mkDerivation rec {
sha256 = "1a39nflw7b2n51jfp3fdprnkpgzaspzww1dckfvaigflfli9s8rj";
};
makeFlags = concatStringsSep " " (
optional (compiler != null) "compiler=${compiler}" ++
optional (stdver != null) "stdver=${stdver}"
);
makeFlags = optional (compiler != null) "compiler=${compiler}"
++ optional (stdver != null) "stdver=${stdver}";
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch;

View File

@ -27,7 +27,7 @@ buildPythonPackage rec {
# gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86
patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch);
cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null;
cmakeFlags = lib.optional isPy3k "-DUSE_PYTHON3=TRUE";
meta = {
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pcre ];
nativeBuildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ];
makeFlags = ''PREFIX=$(out) CFGDIR=$(out)/cfg HAVE_RULES=yes'';
makeFlags = [ "PREFIX=$(out)" "CFGDIR=$(out)/cfg" "HAVE_RULES=yes" ];
outputs = [ "out" "man" ];

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation {
doCheck = true;
checkFlags = "units";
checkFlags = [ "units" ];
meta = with stdenv.lib; {
description = "A maintained ctags implementation";

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0gjkk4gxzqmxfdirrz2lr0bms6l9fc31vkmlywigkbdlh8wxgypp";
};
makeFlags = ''CC=cc PREFIX=$(out) CURSES=-lncurses'';
makeFlags = [ "CC=cc" "PREFIX=$(out)" "CURSES=-lncurses" ];
buildInputs = [ ncurses ];

View File

@ -124,8 +124,8 @@ let
prePatch = prePatchCommon;
inherit patches;
postPatch = "cd ./utils";
makeFlags = ''LANGS='';
installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin VIM_INSTALL_PATH=$(out)/share PYPREFIX='';
makeFlags = [ "LANGS=" ];
installFlags = [ "DESTDIR=$(out)" "BINDIR=$(out)/bin" "VIM_INSTALL_PATH=$(out)/share" "PYPREFIX=" ];
postInstall = ''
for prog in aa-audit aa-autodep aa-cleanprof aa-complain aa-disable aa-enforce aa-genprof aa-logprof aa-mergeprof aa-status aa-unconfined ; do
@ -162,8 +162,8 @@ let
prePatch = prePatchCommon;
postPatch = "cd ./binutils";
makeFlags = ''LANGS= USE_SYSTEM=1'';
installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin'';
makeFlags = [ "LANGS=" "USE_SYSTEM=1" ];
installFlags = [ "DESTDIR=$(out)" "BINDIR=$(out)/bin" ];
inherit doCheck;
@ -187,8 +187,11 @@ let
'';
inherit patches;
postPatch = "cd ./parser";
makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include AR=${stdenv.cc.bintools.targetPrefix}ar'';
installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
makeFlags = [
"LANGS=" "USE_SYSTEM=1" "INCLUDEDIR=${libapparmor}/include"
"AR=${stdenv.cc.bintools.targetPrefix}ar"
];
installFlags = [ "DESTDIR=$(out)" "DISTRO=unknown" ];
inherit doCheck;
@ -204,8 +207,8 @@ let
buildInputs = [ libapparmor pam ];
postPatch = "cd ./changehat/pam_apparmor";
makeFlags = ''USE_SYSTEM=1'';
installFlags = ''DESTDIR=$(out)'';
makeFlags = [ "USE_SYSTEM=1" ];
installFlags = [ "DESTDIR=$(out)" ];
inherit doCheck;
@ -219,7 +222,7 @@ let
nativeBuildInputs = [ which ];
postPatch = "cd ./profiles";
installFlags = ''DESTDIR=$(out) EXTRAS_DEST=$(out)/share/apparmor/extra-profiles'';
installFlags = [ "DESTDIR=$(out)" "EXTRAS_DEST=$(out)/share/apparmor/extra-profiles" ];
inherit doCheck;

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
mkdir -p "$out/bin"
mkdir -p "$out/share/man/man8"
'';
makeFlags='' prefix="''${out}" manprefix="''${out}/share/" '';
makeFlags = [ "prefix=$(out)" "manprefix=$(out)/share/" ];
meta = {
inherit (s) version;
description = ''Tool to detach from controlling TTY and attach to another'';

View File

@ -25,9 +25,7 @@ stdenv.mkDerivation rec {
# Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
# but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
makeFlags = ''
LDFLAGS=-lparted-fs-resize
'';
makeFlags = [ "LDFLAGS=-lparted-fs-resize" ];
propagatedBuildInputs = [ parted utillinux ];

View File

@ -75,20 +75,20 @@ stdenv.mkDerivation rec {
libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid
];
cmakeFlags = ''
-DENABLE_QT_IM_MODULE=ON
-DENABLE_GTK2_IM_MODULE=ON
-DENABLE_GTK3_IM_MODULE=ON
-DENABLE_GIR=OFF
-DENABLE_OPENCC=OFF
-DENABLE_PRESAGE=OFF
-DENABLE_XDGAUTOSTART=OFF
-DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"}
-DENABLE_TABLE=ON
-DENABLE_SPELL=ON
-DENABLE_QT_GUI=ON
-DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml'
'';
cmakeFlags = [
"-DENABLE_QT_IM_MODULE=ON"
"-DENABLE_GTK2_IM_MODULE=ON"
"-DENABLE_GTK3_IM_MODULE=ON"
"-DENABLE_GIR=OFF"
"-DENABLE_OPENCC=OFF"
"-DENABLE_PRESAGE=OFF"
"-DENABLE_XDGAUTOSTART=OFF"
"-DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"}"
"-DENABLE_TABLE=ON"
"-DENABLE_SPELL=ON"
"-DENABLE_QT_GUI=ON"
"-DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml'"
];
meta = with stdenv.lib; {
homepage = https://github.com/fcitx/fcitx;

View File

@ -9,12 +9,13 @@ stdenv.mkDerivation rec {
sha256 = "0xf0r6zxaqan1drz61nqf95p2pkiiihpvrjhrr9dx9j3vswyx31g";
};
buildFlags = with stdenv;
buildFlags = with stdenv; [ (
if isDarwin then "osx"
else if isFreeBSD then "freebsd"
else "cpulimit";
else "cpulimit"
) ];
installFlags = "PREFIX=$(out)";
installFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
homepage = http://limitcpu.sourceforge.net/;

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ unzip ];
buildFlags = if stdenv.cc.isClang then [ "CC=clang" ] else null;
buildFlags = stdenv.lib.optional stdenv.cc.isClang "CC=clang";
installPhase = ''
mkdir -p $out/bin

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ];
cmakeFlags="-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}";
cmakeFlags = ["-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}" ];
buildInputs = [ python libxml2 glib openssl curl check gpgme ];

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"}
)
'';
makeFlags = if static then "AM_LDFLAGS=-all-static" else "";
makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static";
dontDisableStatic = static;
meta = with lib; {