2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, perl
|
|
|
|
, moveBuildTree
|
|
|
|
, srcs
|
|
|
|
, patches ? [ ]
|
|
|
|
}:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
args:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (args) pname;
|
|
|
|
version = args.version or srcs.${pname}.version;
|
|
|
|
src = args.src or srcs.${pname}.src;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation (args // {
|
|
|
|
inherit pname version src;
|
|
|
|
patches = args.patches or patches.${pname} or [ ];
|
|
|
|
|
|
|
|
buildInputs = args.buildInputs or [ ];
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]
|
2024-02-29 20:09:43 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ];
|
2023-11-16 04:20:00 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
(lib.warnIf (args ? qtInputs) "qt6.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++
|
|
|
|
(args.propagatedBuildInputs or []);
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
moveToDev = false;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
outputs = args.outputs or [ "out" "dev" ];
|
|
|
|
|
|
|
|
dontWrapQtApps = args.dontWrapQtApps or true;
|
2024-04-21 15:54:59 +00:00
|
|
|
}) // {
|
|
|
|
meta = with lib; let
|
|
|
|
pos = builtins.unsafeGetAttrPos "pname" args;
|
|
|
|
in {
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://www.qt.io/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Cross-platform application framework for C++";
|
2022-11-21 17:40:18 +00:00
|
|
|
license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ];
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ milahu nickcao ];
|
2022-12-17 10:02:37 +00:00
|
|
|
platforms = platforms.unix;
|
2024-04-21 15:54:59 +00:00
|
|
|
position = "${pos.file}:${toString pos.line}";
|
2022-06-16 17:23:12 +00:00
|
|
|
} // (args.meta or { });
|
2024-04-21 15:54:59 +00:00
|
|
|
}
|