1 { lib, mkDerivation, perl }:
3 let inherit (lib) licenses maintainers platforms; in
5 { self, srcs, patches }:
11 version = args.version or srcs.${name}.version;
12 src = args.src or srcs.${name}.src;
15 mkDerivation (args // {
16 name = "${name}-${version}";
18 patches = args.patches or patches.${name} or [];
20 nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
21 propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
23 outputs = args.outputs or [ "out" "dev" ];
24 setOutputFlags = args.setOutputFlags or false;
27 . ${./hooks/move-qt-dev-tools.sh}
28 . ${./hooks/fix-qt-builtin-paths.sh}
32 ${args.preConfigure or ""}
34 fixQtBuiltinPaths . '*.pr?'
37 dontWrapQtApps = args.dontWrapQtApps or true;
40 if [ -d "''${!outputDev}/lib/pkgconfig" ]; then
41 find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do
43 -e "/^prefix=/ c prefix=''${!outputLib}" \
44 -e "/^exec_prefix=/ c exec_prefix=''${!outputBin}" \
45 -e "/^includedir=/ c includedir=''${!outputDev}/include"
51 ${args.postFixup or ""}
55 homepage = "http://www.qt.io";
56 description = "A cross-platform application framework for C++";
57 license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
58 maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
59 platforms = platforms.unix;
60 } // (args.meta or {});