mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 19:45:54 +00:00
dcea0913e5
This commit was too aggressive in adding configure flags. Only qtbsea needs the -no-framework flag to work correctly. Qmake will handle everything else for us.
32 lines
606 B
Nix
32 lines
606 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 [])
|
|
++ [
|
|
"-DBUILD_TESTING=OFF"
|
|
("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
|
|
];
|
|
|
|
enableParallelBuilding = args.enableParallelBuilding or true;
|
|
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation (args // args_)
|