fe0ab944db
The module definitions are factored out and shared between qt56 and qt59. The symlink farm which was created during builds is no longer needed.
29 lines
572 B
Nix
29 lines
572 B
Nix
{ stdenv, lib }:
|
|
|
|
let inherit (lib) optional; in
|
|
|
|
{ debug }:
|
|
|
|
args:
|
|
|
|
let
|
|
args_ = {
|
|
|
|
qmakeFlags =
|
|
(args.qmakeFlags or [])
|
|
++ optional (debug != null)
|
|
(if debug then "CONFIG+=debug" else "CONFIG+=release");
|
|
|
|
cmakeFlags =
|
|
(args.cmakeFlags or [])
|
|
++ [ "-DBUILD_TESTING=OFF" ]
|
|
++ optional (debug != null)
|
|
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
|
|
else "-DCMAKE_BUILD_TYPE=Release");
|
|
|
|
enableParallelBuilding = args.enableParallelBuilding or false;
|
|
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation (args // args_)
|