2017-02-28 15:37:57 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
# Updates
|
|
|
|
|
|
|
|
Before a major version update, make a copy of this directory. (We like to
|
|
|
|
keep the old version around for a short time after major updates.) Add a
|
|
|
|
top-level attribute to `top-level/all-packages.nix`.
|
|
|
|
|
|
|
|
1. Update the URL in `maintainers/scripts/generate-qt.sh`.
|
|
|
|
2. From the top of the Nixpkgs tree, run
|
|
|
|
`./maintainers/scripts/generate-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`.
|
2017-05-15 12:44:33 +01:00
|
|
|
3. Update `qtCompatVersion` below if the minor version number changes.
|
|
|
|
4. Check that the new packages build correctly.
|
|
|
|
5. Commit the changes and open a pull request.
|
2017-02-28 15:37:57 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
{
|
|
|
|
newScope,
|
|
|
|
stdenv, fetchurl, makeSetupHook, makeWrapper,
|
|
|
|
bison, cups ? null, harfbuzz, mesa, perl,
|
2017-03-20 17:18:47 +00:00
|
|
|
gstreamer, gst-plugins-base, gtk3, dconf,
|
2017-02-28 15:37:57 +00:00
|
|
|
|
|
|
|
# options
|
|
|
|
developerBuild ? false,
|
|
|
|
decryptSslTraffic ? false,
|
2017-06-02 16:49:32 +01:00
|
|
|
debug ? null,
|
2017-02-28 15:37:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2017-05-15 12:44:33 +01:00
|
|
|
qtCompatVersion = "5.8";
|
|
|
|
|
2017-02-28 15:37:57 +00:00
|
|
|
mirror = "http://download.qt.io";
|
|
|
|
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
|
|
|
|
2017-06-02 16:49:32 +01:00
|
|
|
mkDerivation = args:
|
|
|
|
stdenv.mkDerivation (args // {
|
|
|
|
|
|
|
|
outputs = args.outputs or [ "out" "dev" ];
|
|
|
|
|
|
|
|
propagatedUserEnvPkgs =
|
|
|
|
(args.propagatedUserEnvPkgs or [])
|
|
|
|
++ map getBin (args.propagatedBuildInputs or []);
|
|
|
|
|
|
|
|
qmakeFlags =
|
|
|
|
(args.qmakeFlags or [])
|
|
|
|
++ optional (debug != null)
|
|
|
|
(if debug then "CONFIG+=debug" else "CONFIG+=release");
|
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
(args.cmakeFlags or [])
|
|
|
|
++ [ "-DBUILD_TESTING=OFF" ]
|
|
|
|
++ optional (debug != null)
|
|
|
|
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
|
|
|
|
else "-DCMAKE_BUILD_TYPE=Release");
|
|
|
|
|
|
|
|
enableParallelBuilding = args.enableParallelBuilding or true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2017-02-28 15:37:57 +00:00
|
|
|
qtSubmodule = args:
|
|
|
|
let
|
|
|
|
inherit (args) name;
|
|
|
|
version = args.version or srcs."${name}".version;
|
|
|
|
src = args.src or srcs."${name}".src;
|
|
|
|
in mkDerivation (args // {
|
|
|
|
name = "${name}-${version}";
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
|
|
|
|
nativeBuildInputs =
|
|
|
|
(args.nativeBuildInputs or [])
|
2017-06-02 16:40:19 +01:00
|
|
|
++ [ perl self.qmake ];
|
2017-02-28 15:37:57 +00:00
|
|
|
|
|
|
|
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
|
|
|
|
|
|
|
|
setOutputFlags = args.setOutputFlags or false;
|
|
|
|
|
|
|
|
setupHook = ../qtsubmodule-setup-hook.sh;
|
|
|
|
|
|
|
|
meta = self.qtbase.meta // (args.meta or {});
|
|
|
|
});
|
|
|
|
|
|
|
|
addPackages = self: with self;
|
|
|
|
let
|
2017-05-15 12:44:33 +01:00
|
|
|
callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; };
|
2017-02-28 15:37:57 +00:00
|
|
|
in {
|
|
|
|
|
2017-06-02 16:49:32 +01:00
|
|
|
inherit mkDerivation;
|
|
|
|
|
2017-02-28 15:37:57 +00:00
|
|
|
qtbase = callPackage ./qtbase {
|
|
|
|
inherit (srcs.qtbase) src version;
|
|
|
|
inherit bison cups harfbuzz mesa;
|
|
|
|
inherit developerBuild decryptSslTraffic;
|
|
|
|
};
|
|
|
|
|
|
|
|
qtconnectivity = callPackage ./qtconnectivity.nix {};
|
|
|
|
qtdeclarative = callPackage ./qtdeclarative {};
|
|
|
|
qtdoc = callPackage ./qtdoc.nix {};
|
|
|
|
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
|
|
|
qtimageformats = callPackage ./qtimageformats.nix {};
|
|
|
|
qtlocation = callPackage ./qtlocation.nix {};
|
2017-03-25 23:16:51 +00:00
|
|
|
qtmacextras = callPackage ./qtmacextras.nix {};
|
2017-02-28 15:37:57 +00:00
|
|
|
qtmultimedia = callPackage ./qtmultimedia.nix {
|
|
|
|
inherit gstreamer gst-plugins-base;
|
|
|
|
};
|
|
|
|
qtquick1 = null;
|
|
|
|
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
|
|
|
|
qtquickcontrols2 = callPackage ./qtquickcontrols2.nix {};
|
|
|
|
qtscript = callPackage ./qtscript {};
|
|
|
|
qtsensors = callPackage ./qtsensors.nix {};
|
|
|
|
qtserialport = callPackage ./qtserialport {};
|
|
|
|
qtsvg = callPackage ./qtsvg.nix {};
|
|
|
|
qttools = callPackage ./qttools {};
|
|
|
|
qttranslations = callPackage ./qttranslations.nix {};
|
|
|
|
qtwayland = callPackage ./qtwayland.nix {};
|
|
|
|
qtwebchannel = callPackage ./qtwebchannel.nix {};
|
|
|
|
qtwebengine = callPackage ./qtwebengine {};
|
|
|
|
qtwebkit = callPackage ./qtwebkit {};
|
|
|
|
qtwebsockets = callPackage ./qtwebsockets.nix {};
|
|
|
|
qtx11extras = callPackage ./qtx11extras.nix {};
|
|
|
|
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {};
|
|
|
|
|
|
|
|
env = callPackage ../qt-env.nix {};
|
2017-03-25 23:16:51 +00:00
|
|
|
full = env "qt-${qtbase.version}" ([
|
2017-02-28 15:37:57 +00:00
|
|
|
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
|
|
|
|
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript
|
2017-03-25 23:16:51 +00:00
|
|
|
qtsensors qtserialport qtsvg qttools qttranslations
|
2017-02-28 15:37:57 +00:00
|
|
|
qtwebsockets qtx11extras qtxmlpatterns
|
2017-03-25 23:16:51 +00:00
|
|
|
] ++ optional (!stdenv.isDarwin) qtwayland
|
|
|
|
++ optional (stdenv.isDarwin) qtmacextras);
|
2017-02-28 15:37:57 +00:00
|
|
|
|
2017-05-17 20:25:42 +01:00
|
|
|
qmake = makeSetupHook {
|
|
|
|
deps = [ self.qtbase.dev ];
|
|
|
|
substitutions = { inherit (stdenv) isDarwin; };
|
|
|
|
} ../qmake-hook.sh;
|
2017-02-28 15:37:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
self = makeScope newScope addPackages;
|
|
|
|
|
|
|
|
in self
|