mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
6ed49262f5
This is now set by CMake
31 lines
576 B
Nix
31 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_)
|