2022-06-16 17:23:12 +00:00
|
|
|
{ newScope
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchgit
|
|
|
|
, fetchpatch
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeSetupHook
|
|
|
|
, makeWrapper
|
|
|
|
, bison
|
|
|
|
, cups
|
|
|
|
, harfbuzz
|
|
|
|
, libGL
|
|
|
|
, perl
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, writeText
|
|
|
|
, gstreamer
|
|
|
|
, gst-plugins-base
|
2022-11-21 17:40:18 +00:00
|
|
|
, gst-plugins-good
|
|
|
|
, gst-libav
|
|
|
|
, gst-vaapi
|
2022-06-16 17:23:12 +00:00
|
|
|
, gtk3
|
|
|
|
, dconf
|
2022-11-21 17:40:18 +00:00
|
|
|
, libglvnd
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPackages
|
|
|
|
|
|
|
|
# options
|
|
|
|
, developerBuild ? false
|
|
|
|
, debug ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
srcs = import ./srcs.nix {
|
|
|
|
inherit fetchurl;
|
|
|
|
mirror = "mirror://qt";
|
|
|
|
};
|
|
|
|
|
|
|
|
qtModule =
|
|
|
|
import ./qtModule.nix
|
|
|
|
{ inherit stdenv lib perl cmake ninja writeText; }
|
|
|
|
{ inherit self srcs; };
|
|
|
|
|
|
|
|
addPackages = self: with self;
|
|
|
|
let
|
|
|
|
callPackage = self.newScope { inherit qtModule srcs; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
inherit callPackage qtModule srcs;
|
|
|
|
|
|
|
|
qtbase = callPackage ./modules/qtbase.nix {
|
|
|
|
withGtk3 = true;
|
|
|
|
inherit (srcs.qtbase) src version;
|
|
|
|
inherit bison cups harfbuzz libGL dconf gtk3 developerBuild cmake;
|
2022-10-21 18:38:19 +00:00
|
|
|
patches = [
|
|
|
|
./patches/qtbase-qmake-pkg-config.patch
|
2022-11-21 17:40:18 +00:00
|
|
|
./patches/qtbase-tzdir.patch
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2022-11-21 17:40:18 +00:00
|
|
|
env = callPackage ./qt-env.nix {};
|
|
|
|
full = env "qt-full-${qtbase.version}" ([
|
|
|
|
qt3d
|
|
|
|
qt5compat
|
|
|
|
qtcharts
|
|
|
|
qtconnectivity
|
|
|
|
qtdeclarative
|
|
|
|
qtdoc
|
|
|
|
qtimageformats
|
|
|
|
qtlottie
|
|
|
|
qtmultimedia
|
|
|
|
qtnetworkauth
|
|
|
|
qtpositioning
|
|
|
|
qtsensors
|
|
|
|
qtserialbus
|
|
|
|
qtserialport
|
|
|
|
qtshadertools
|
|
|
|
qtquick3d
|
|
|
|
qtsvg
|
|
|
|
qtscxml
|
|
|
|
qttools
|
|
|
|
qttranslations
|
|
|
|
qtvirtualkeyboard
|
|
|
|
qtwebchannel
|
|
|
|
qtwebengine
|
|
|
|
qtwebsockets
|
|
|
|
qtwebview
|
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [ qtwayland libglvnd ]);
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
qt3d = callPackage ./modules/qt3d.nix { };
|
|
|
|
qt5compat = callPackage ./modules/qt5compat.nix { };
|
|
|
|
qtcharts = callPackage ./modules/qtcharts.nix { };
|
|
|
|
qtconnectivity = callPackage ./modules/qtconnectivity.nix { };
|
|
|
|
qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { };
|
|
|
|
qtdeclarative = callPackage ./modules/qtdeclarative.nix { };
|
|
|
|
qtdoc = callPackage ./modules/qtdoc.nix { };
|
2022-09-30 11:47:45 +00:00
|
|
|
qthttpserver = callPackage ./modules/qthttpserver.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtimageformats = callPackage ./modules/qtimageformats.nix { };
|
|
|
|
qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { };
|
|
|
|
qtlottie = callPackage ./modules/qtlottie.nix { };
|
|
|
|
qtmultimedia = callPackage ./modules/qtmultimedia.nix {
|
2022-11-21 17:40:18 +00:00
|
|
|
inherit gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi;
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { };
|
|
|
|
qtpositioning = callPackage ./modules/qtpositioning.nix { };
|
|
|
|
qtsensors = callPackage ./modules/qtsensors.nix { };
|
|
|
|
qtserialbus = callPackage ./modules/qtserialbus.nix { };
|
|
|
|
qtserialport = callPackage ./modules/qtserialport.nix { };
|
|
|
|
qtshadertools = callPackage ./modules/qtshadertools.nix { };
|
2022-09-30 11:47:45 +00:00
|
|
|
qtspeech = callPackage ./modules/qtspeech.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtquick3d = callPackage ./modules/qtquick3d.nix { };
|
2022-09-30 11:47:45 +00:00
|
|
|
qtquick3dphysics = callPackage ./modules/qtquick3dphysics.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtquicktimeline = callPackage ./modules/qtquicktimeline.nix { };
|
|
|
|
qtremoteobjects = callPackage ./modules/qtremoteobjects.nix { };
|
|
|
|
qtsvg = callPackage ./modules/qtsvg.nix { };
|
|
|
|
qtscxml = callPackage ./modules/qtscxml.nix { };
|
|
|
|
qttools = callPackage ./modules/qttools.nix { };
|
|
|
|
qttranslations = callPackage ./modules/qttranslations.nix { };
|
|
|
|
qtvirtualkeyboard = callPackage ./modules/qtvirtualkeyboard.nix { };
|
|
|
|
qtwayland = callPackage ./modules/qtwayland.nix { };
|
|
|
|
qtwebchannel = callPackage ./modules/qtwebchannel.nix { };
|
|
|
|
qtwebengine = callPackage ./modules/qtwebengine.nix { };
|
|
|
|
qtwebsockets = callPackage ./modules/qtwebsockets.nix { };
|
|
|
|
qtwebview = callPackage ./modules/qtwebview.nix { };
|
|
|
|
|
|
|
|
wrapQtAppsHook = makeSetupHook {
|
|
|
|
deps = [ buildPackages.makeWrapper ];
|
|
|
|
} ./hooks/wrap-qt-apps-hook.sh;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
qmake = makeSetupHook {
|
|
|
|
deps = [ self.qtbase.dev ];
|
|
|
|
substitutions = {
|
|
|
|
inherit debug;
|
|
|
|
fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh;
|
|
|
|
};
|
|
|
|
} ./hooks/qmake-hook.sh;
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# TODO(@Artturin): convert to makeScopeWithSplicing
|
|
|
|
# simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01
|
2022-06-16 17:23:12 +00:00
|
|
|
self = lib.makeScope newScope addPackages;
|
|
|
|
in
|
|
|
|
self
|