nixpkgs-suyu/pkgs/development/libraries/qt-5/mkDerivation.nix

32 lines
606 B
Nix
Raw Normal View History

{ 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 =
2018-01-19 14:59:17 +01:00
optional (!debug) "-DQT_NO_DEBUG"
++ lib.toList (args.NIX_CFLAGS_COMPILE or []);
cmakeFlags =
(args.cmakeFlags or [])
2018-01-19 14:59:17 +01:00
++ [
"-DBUILD_TESTING=OFF"
("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
];
enableParallelBuilding = args.enableParallelBuilding or true;
};
in
stdenv.mkDerivation (args // args_)