mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-09 05:53:50 +00:00
ec632b745f
Fixes #39334 and Fixes #36729 Also, Fixes #36932 (hopefully it's still building) (This might be able to be able to be cherry-picked to 18.03 but be careful - chromium is extremely touchy. Probably best to wait for it to be built successfully on Hydra a few times.)
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_)
|