c4cac55d69
We prefer to have $out/include & $out/lib installed so that things like multiple outputs can work. There is no way to do this in Qt currently without also disabling the ‘framework’ install. Not sure if this will break anything but it will fix issues we run into on some projects like python2.7-pyside: Linux: https://hydra.nixos.org/build/73219181 macOS: https://hydra.nixos.org/build/73059550 Hopefully this gives us consistency between the two.
34 lines
698 B
Nix
34 lines
698 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 []);
|
|
|
|
configureFlags = [ "-no-framework" ]
|
|
++ (args.configureFlags 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_)
|