nixpkgs-suyu/pkgs/development/libraries/qt-5/mkDerivation.nix
Matthew Bauer 6ed49262f5 treewide: remove BUILD_TESTING flag
This is now set by CMake
2019-03-11 10:11:28 -04:00

30 lines
576 B
Nix

{ stdenv, lib }:
let inherit (lib) optional; in
{ debug }:
args:
let
args_ = {
qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ]
++ (args.qmakeFlags or []);
NIX_CFLAGS_COMPILE =
optional (!debug) "-DQT_NO_DEBUG"
++ lib.toList (args.NIX_CFLAGS_COMPILE or []);
cmakeFlags =
(args.cmakeFlags or [])
++ [
("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
];
enableParallelBuilding = args.enableParallelBuilding or true;
};
in
stdenv.mkDerivation (args // args_)