diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix b/infra/libkookie/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix new file mode 100644 index 000000000000..2c6333cb0204 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix @@ -0,0 +1,32 @@ +{ lib, debug, wrapQtAppsHook }: + +let inherit (lib) optional; in + +mkDerivation: + +args: + +let + args_ = { + + qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ] + ++ (args.qmakeFlags or []); + + NIX_CFLAGS_COMPILE = toString ( + 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; + + nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ wrapQtAppsHook ]; + + }; +in + +mkDerivation (args // args_) |