Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt5: 5.12.7 -> 5.14.2 #84232

Merged
14 commits merged into from Jul 31, 2020
14 changes: 5 additions & 9 deletions pkgs/applications/graphics/digikam/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, doxygen, extra-cmake-modules, wrapGAppsHook
{ mkDerivation, lib, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook

# For `digitaglinktree`
, perl, sqlite
Expand Down Expand Up @@ -33,7 +33,6 @@
, libkipi
, libksane
, liblqr1
, libqtav
, libusb1
, marble
, libGL
Expand All @@ -52,13 +51,11 @@

mkDerivation rec {
pname = "digikam";
version = "6.2.0";
version = "6.4.0";

src = fetchFromGitHub {
owner = "KDE";
repo = "digikam";
rev = "v${version}";
sha256 = "1l1nb1nwicmip2jxhn5gzr7h60igvns0zs3kzp36r6qf4wvg3v2z";
src = fetchurl {
url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.xz";
sha256 = "0vwd97zkxv30y8x0z76s4fsj4w9ysgsmpjclp2h2bpava7zi4l3p";
};

nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ];
Expand All @@ -76,7 +73,6 @@ mkDerivation rec {
libkipi
libksane
liblqr1
libqtav
libusb1
libGL
libGLU
Expand Down
10 changes: 9 additions & 1 deletion pkgs/applications/networking/browsers/falkon/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, mkDerivation, lib, fetchFromGitHub
{ stdenv, mkDerivation, lib, fetchFromGitHub, fetchpatch
, cmake, extra-cmake-modules, pkgconfig, qmake
, libpthreadstubs, libxcb, libXdmcp
, qtsvg, qttools, qtwebengine, qtx11extras
Expand All @@ -17,6 +17,14 @@ mkDerivation rec {
sha256 = "1w64slh9wpcfi4v7ds9wci1zvwh0dh787ndpi6hd4kmdgnswvsw7";
};

patches = [
# fixes build with qt5 5.14
(fetchpatch {
url = "https://github.com/KDE/falkon/commit/bbde5c6955c43bc744ed2c4024598495de908f2a.diff";
sha256 = "0f7qcddvvdnij3di0acg7jwvwfwyd0xizlav4wccclbj8x7qp5ld";
})
];

preConfigure = ''
export NONBLOCK_JS_DIALOGS=true
export KDE_INTEGRATION=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

mkDerivation rec {
pname = "chatterino2";
version = "unstable-2019-05-11";
version = "2.1.7";
src = fetchFromGitHub {
owner = "fourtf";
repo = pname;
rev = "8c46cbf571dc8fd77287bf3186445ff52b1d1aaf";
sha256 = "0i2385hamhd9i7jdy906cfrd81cybw524j92l87c8pzrkxphignk";
rev = "v${version}";
sha256 = "0bbdzainfa7hlz5p0jfq4y04i3wix7z3i6w193906bi4gr9wilpg";
fetchSubmodules = true;
};
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From ac9387271b2420a71f7d172f44354fc35adac504 Mon Sep 17 00:00:00 2001
From: Manuel Nickschas <sputnick@quassel-irc.org>
Date: Tue, 7 Jan 2020 18:34:54 +0100
Subject: [PATCH] common: Disable enum type stream operators for Qt >= 5.14

Starting from version 5.14, Qt provides stream operators for enum
types, which collide with the ones we ship in types.h. Disable
Quassel's stream operators when compiling against Qt 5.14 or later.

(cherry-picked from 579e559a6322209df7cd51c34801fecff5fe734b)
---
src/common/types.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/common/types.h b/src/common/types.h
index 467d9fb2..c4b9f364 100644
--- a/src/common/types.h
+++ b/src/common/types.h
@@ -140,6 +140,7 @@ Q_DECLARE_METATYPE(QHostAddress)
typedef QList<MsgId> MsgIdList;
typedef QList<BufferId> BufferIdList;

+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
/**
* Catch-all stream serialization operator for enum types.
*
@@ -169,6 +170,7 @@ QDataStream &operator>>(QDataStream &in, T &value) {
value = static_cast<T>(v);
return in;
}
+#endif

// Exceptions

--
2.26.2

6 changes: 6 additions & 0 deletions pkgs/applications/networking/irc/quassel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ in (if !buildClient then stdenv.mkDerivation else mkDerivation) rec {
sha256 = "0z8p7iv90yrrjbh31cyxhpr6hsynfmi23rlayn7p2f6ki5az7yc3";
};

patches = [
# fixes build with Qt 5.14
# source: https://github.com/quassel/quassel/pull/518/commits/8a46d983fc99204711cdff1e4c542e272fef45b9
./0001-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch
];

enableParallelBuilding = true;

# Prevent ``undefined reference to `qt_version_tag''' in SSL check
Expand Down
10 changes: 9 additions & 1 deletion pkgs/development/libraries/exiv2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
(cd ../tests/ && python3 runner.py)
'';

# With cmake we have to enable samples or there won't be
# With CMake we have to enable samples or there won't be
# a tests target. This removes them.
postInstall = ''
( cd "$out/bin"
Expand All @@ -108,6 +108,14 @@ stdenv.mkDerivation rec {
)
'';

# Fix CMake export paths.
postFixup = ''
sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \
-e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \
-e "/Compute the installation prefix/ a set(_IMPORT_PREFIX \"$out\")" \
-e "/^get_filename_component(_IMPORT_PREFIX/ d"
'';

enableParallelBuilding = true;

meta = with stdenv.lib; {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/libqtav/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ mkDerivation rec {
homepage = "http://www.qtav.org/";
maintainers = [ maintainers.jraygauthier ];
platforms = platforms.linux;
broken = !(lib.versionOlder qtbase.version "5.13");
};
}

176 changes: 176 additions & 0 deletions pkgs/development/libraries/qt-5/5.14/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/*

# 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 `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`.
2. From the top of the Nixpkgs tree, run
`./maintainers/scripts/fetch-kde-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`.
3. Check that the new packages build correctly.
4. Commit the changes and open a pull request.

*/

{
newScope,
stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base, gtk3, dconf,
llvmPackages_5,

# options
developerBuild ? false,
decryptSslTraffic ? false,
debug ? false,
}:

with stdenv.lib;

let

qtCompatVersion = srcs.qtbase.version;

stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;

mirror = "https://download.qt.io";
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
# qtwebkit does not have an official release tarball on the qt mirror and is
# mostly maintained by the community.
qtwebkit = rec {
src = fetchFromGitHub {
owner = "qt";
repo = "qtwebkit";
rev = "v${version}";
sha256 = "0x8rng96h19xirn7qkz3lydal6v4vn00bcl0s3brz36dfs0z8wpg";
};
version = "5.212.0-alpha4";
};
};

patches = {
qtbase =
optionals stdenv.isDarwin [
./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
./qtbase.patch.d/0002-qtbase-mac.patch
]
++ [
./qtbase.patch.d/0003-qtbase-mkspecs.patch
./qtbase.patch.d/0004-qtbase-replace-libdir.patch
./qtbase.patch.d/0005-qtbase-cmake.patch
./qtbase.patch.d/0006-qtbase-gtk3.patch
./qtbase.patch.d/0007-qtbase-xcursor.patch
./qtbase.patch.d/0008-qtbase-tzdir.patch
./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
./qtbase.patch.d/0010-qtbase-assert.patch
./qtbase.patch.d/0011-fix-header_module.patch
];
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [ ./qtscript.patch ];
qtserialport = [ ./qtserialport.patch ];
qtwebengine = [ ]
++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch;
qtwebkit = [ ./qtwebkit.patch ]
++ optionals stdenv.isDarwin [
./qtwebkit-darwin-no-readline.patch
./qtwebkit-darwin-no-qos-classes.patch
];
qttools = [ ./qttools.patch ];
};

qtModule =
import ../qtModule.nix
{
inherit perl;
inherit (stdenv) lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
stdenvActual.mkDerivation;
}
{ inherit self srcs patches; };

addPackages = self: with self;
let
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
in {

mkDerivationWith =
import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };

mkDerivation = mkDerivationWith stdenvActual.mkDerivation;

qtbase = callPackage ../modules/qtbase.nix {
inherit (srcs.qtbase) src version;
patches = patches.qtbase;
inherit bison cups harfbuzz libGL;
withGtk3 = true; inherit dconf gtk3;
inherit developerBuild decryptSslTraffic;
};

qtcharts = callPackage ../modules/qtcharts.nix {};
qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
qtdoc = callPackage ../modules/qtdoc.nix {};
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
qtimageformats = callPackage ../modules/qtimageformats.nix {};
qtlocation = callPackage ../modules/qtlocation.nix {};
qtmacextras = callPackage ../modules/qtmacextras.nix {};
qtmultimedia = callPackage ../modules/qtmultimedia.nix {
inherit gstreamer gst-plugins-base;
};
qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
qtquick1 = null;
qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
qtscript = callPackage ../modules/qtscript.nix {};
qtsensors = callPackage ../modules/qtsensors.nix {};
qtserialport = callPackage ../modules/qtserialport.nix {};
qtspeech = callPackage ../modules/qtspeech.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 {};
qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
qtwebkit = callPackage ../modules/qtwebkit.nix {};
qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
qtwebview = callPackage ../modules/qtwebview.nix {};
qtx11extras = callPackage ../modules/qtx11extras.nix {};
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};

env = callPackage ../qt-env.nix {};
full = env "qt-full-${qtbase.version}" ([
qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
qtscript qtsensors qtserialport qtsvg qttools qttranslations
qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
qtwebview qtx11extras qtxmlpatterns
] ++ optional (!stdenv.isDarwin) qtwayland
++ optional (stdenv.isDarwin) qtmacextras);

qmake = makeSetupHook {
deps = [ self.qtbase.dev ];
substitutions = {
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
};
} ../hooks/qmake-hook.sh;

wrapQtAppsHook = makeSetupHook {
deps =
[ self.qtbase.dev makeWrapper ]
++ optional stdenv.isLinux self.qtwayland.dev;
} ../hooks/wrap-qt-apps-hook.sh;
};

self = makeScope newScope addPackages;

in self
1 change: 1 addition & 0 deletions pkgs/development/libraries/qt-5/5.14/fetch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ )
Loading