Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 388ed4e09f3b
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 16fd4233de22
Choose a head ref
  • 16 commits
  • 24 files changed
  • 8 contributors

Commits on Dec 16, 2020

  1. Copy the full SHA
    4ec0946 View commit details

Commits on Dec 21, 2020

  1. asciidoctor: add revealjs support

    This allows creating HTML presentations with
    `asciidoctor-revealjs presentation.adoc`.
    
    NOTE: The generated HTML file implicitly depend on reveal.js (and I see
    no good way to bundle it with Nix). Either provide reveal.js in a local
    path next to the generated HTML file[1], or override the revealjsdir
    attribute, for example by pointing to an URL (can also be a path):
    
      asciidoctor-revealjs -a revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@3.9.2 presentation.adoc
    
    Implementation details:
    1. Added "gem 'asciidoctor-revealjs'" to the Gemfile.
    2. Ran "nix-shell -p bundler --run 'bundle lock --update'"
       from pkgs/tools/typesetting/asciidoctor/.
    3. Hand edited Gemfile.lock to remove all but the asciidoctor-revealjs
       changes. (Rationale: allow backporting to release-20.09.)
    4. Finish off with "nix-shell -p bundix --run 'bundix'".
    
    [1] Of course Nix can help with _that_, but that's external to the
    asciidoctor-revealjs program.
    
    (cherry picked from commit 8f13d3c)
    bjornfor committed Dec 21, 2020
    Copy the full SHA
    79c739c View commit details

Commits on Dec 27, 2020

  1. qt-5: 5.15.0 -> 5.15.2

    This is a maintenance release of the Qt 5.15 release series. It focuses on
    bug and security fixes. The feature that made me update this package was
    the broken u2f support in QtWebEngine when used together with
    Qutebrowser. It previously (on older Qt versions) used to work but
    stopped working with the switch to 5.15.
    
    As the changelog is rather extensive the reader is advised to inspect
    [0] to checkout the changes to each of the components of their
    interest.
    
    This also fixes a security issue with QtWebEngine based browsers that
    could be crashed by visiting a website that invokes certain WebRTC
    features [1].
    
    [0] https://wiki.qt.io/Qt_5.15.2_Change_Files
    [1] https://bugreports.qt.io/browse/QTBUG-86752
    
    (cherry picked from commit dd6446e)
    andir authored and ttuegel committed Dec 27, 2020
    Copy the full SHA
    175634d View commit details
  2. kdeFrameworks.kpurpose: add patch required with Qt5 5.15.2

    Qt 5.15 carried a change that renamed a getter for the socket error. In
    a later relase that change was reverted (to be less ambiguous) thus now
     those that had picked up the change in API had to change their code.
     This has now been reverted [0] and thus the consumers also have to
     revert their changes…
    
    [0] https://codereview.qt-project.org/c/qt/qtbase/+/289693
    
    (cherry picked from commit 5af26a1)
    andir authored and ttuegel committed Dec 27, 2020
    Copy the full SHA
    6bea8bc View commit details
  3. pyqt: 5.15.1 -> 5.15.2

    This keeps the PyQt5 version in sync with the Qt release. While it is
    apparently not strictly required it is probably not the worst idea to do
    this.
    
    (cherry picked from commit a15b4c6)
    andir authored and ttuegel committed Dec 27, 2020
    Copy the full SHA
    7d2fdb4 View commit details
  4. qt515: fix on darwin after bump to 5.15.2

    (cherry picked from commit 2a46e71)
    veprbl authored and ttuegel committed Dec 27, 2020
    Copy the full SHA
    1d0c87b View commit details
  5. freecad: patch for Qt 5.15

    ttuegel committed Dec 27, 2020
    Copy the full SHA
    31e4005 View commit details
  6. kaddressbook: patch for Qt 5.15.2

    (cherry picked from commit 3ade461)
    ttuegel committed Dec 27, 2020
    Copy the full SHA
    019af76 View commit details
  7. calendarsupport: patch for Qt 5.15.2

    (cherry picked from commit 672e363)
    ttuegel committed Dec 27, 2020
    Copy the full SHA
    2624a17 View commit details
  8. kompare: fix build with patch

    Obsolete methods were still in use when 20.08 was released.
    This patch ports away from them.
    
    (cherry picked from commit cd8b364)
    FRidh authored and ttuegel committed Dec 27, 2020
    Copy the full SHA
    b926fa4 View commit details
  9. Revert "freecad: patch for Qt 5.15"

    This reverts commit 8652352.
    ttuegel committed Dec 27, 2020
    Copy the full SHA
    64ebb54 View commit details
  10. Merge pull request #106981 from lsix/fix-gdb-crash

    [20.09] gdb: Fix crash when exiting TUI with gdb -tui
    lsix authored Dec 27, 2020
    Copy the full SHA
    5bcf142 View commit details
  11. Merge pull request #107713 from ttuegel/staging-20.09--qt-5.15.2

    [20.09] Qt 5.15.2
    ttuegel authored Dec 27, 2020
    Copy the full SHA
    4cd4cfc View commit details

Commits on Jan 1, 2021

  1. nss_latest: 3.59 -> 3.60

    (cherry-picked from 22cd16f, basically)
    Firefox 84.0.1 will require >= 3.59.1
    vcunat committed Jan 1, 2021
    Copy the full SHA
    c5524d6 View commit details
  2. Merge #107603: firefox*: 84.0 -> 84.0.1

    (cherry picked from commit 85c8f75)
    vcunat committed Jan 1, 2021
    Copy the full SHA
    dfc86e4 View commit details
  3. Copy the full SHA
    16fd423 View commit details
Showing with 1,525 additions and 960 deletions.
  1. +8 −1 pkgs/applications/kde/calendarsupport.nix
  2. +8 −1 pkgs/applications/kde/kaddressbook.nix
  3. +12 −1 pkgs/applications/kde/kompare.nix
  4. +385 −385 pkgs/applications/networking/browsers/firefox-bin/beta_sources.nix
  5. +385 −385 pkgs/applications/networking/browsers/firefox-bin/release_sources.nix
  6. +2 −2 pkgs/applications/networking/browsers/firefox/packages.nix
  7. +8 −1 pkgs/development/libraries/kde-frameworks/purpose.nix
  8. +2 −2 pkgs/development/libraries/nss/latest.nix
  9. +7 −11 pkgs/development/libraries/qt-5/5.15/default.nix
  10. +1 −1 pkgs/development/libraries/qt-5/5.15/fetch.sh
  11. +47 −0 ...15/qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch
  12. +40 −0 ...15/qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch
  13. +27 −0 ...15/qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch
  14. +192 −0 ...15/qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch
  15. +26 −0 ...qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch
  16. +77 −0 ...15/qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch
  17. +168 −168 pkgs/development/libraries/qt-5/5.15/srcs.nix
  18. +2 −2 pkgs/development/python-modules/pyqt/5.x.nix
  19. +4 −0 pkgs/development/tools/misc/gdb/default.nix
  20. +71 −0 pkgs/development/tools/misc/gdb/fix_crash_when_exiting_TUI_with_gdb_-tui.patch
  21. +1 −0 pkgs/tools/typesetting/asciidoctor/Gemfile
  22. +9 −0 pkgs/tools/typesetting/asciidoctor/Gemfile.lock
  23. +1 −0 pkgs/tools/typesetting/asciidoctor/default.nix
  24. +42 −0 pkgs/tools/typesetting/asciidoctor/gemset.nix
9 changes: 8 additions & 1 deletion pkgs/applications/kde/calendarsupport.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
mkDerivation, lib, kdepimTeam,
mkDerivation, lib, kdepimTeam, fetchpatch,
extra-cmake-modules, kdoctools,
akonadi, akonadi-calendar, akonadi-mime, akonadi-notes, kcalutils, kdepim-apps-libs,
kholidays, kidentitymanagement, kmime, pimcommon, qttools,
@@ -11,6 +11,13 @@ mkDerivation {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = kdepimTeam;
};
patches = [
# Patch for Qt 5.15.2 until version 20.12.0
(fetchpatch {
url = "https://invent.kde.org/pim/calendarsupport/-/commit/b4193facb223bd5b73a65318dec8ced51b66adf7.patch";
sha256 = "sha256:1da11rqbxxrl06ld3avc41p064arz4n6w5nxq8r008v8ws3s64dy";
})
];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
akonadi akonadi-mime akonadi-notes kcalutils kdepim-apps-libs kholidays pimcommon qttools
9 changes: 8 additions & 1 deletion pkgs/applications/kde/kaddressbook.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
mkDerivation, lib, kdepimTeam,
mkDerivation, lib, kdepimTeam, fetchpatch,
extra-cmake-modules, kdoctools,
akonadi, akonadi-search, grantlee, grantleetheme, kcmutils, kcompletion,
kcrash, kdbusaddons, kdepim-apps-libs, ki18n, kontactinterface, kparts,
@@ -13,6 +13,13 @@ mkDerivation {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = kdepimTeam;
};
patches = [
# Patch for Qt 5.15.2 until version 20.12.0
(fetchpatch {
url = "https://invent.kde.org/pim/kaddressbook/-/commit/8aee8d40ae2a1c920d3520163d550d3b49720226.patch";
sha256 = "sha256:0dsy119cd5w9khiwgk6fb7xnjzmj94rfphf327k331lf15zq4853";
})
];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
akonadi akonadi-search grantlee grantleetheme kcmutils kcompletion kcrash
13 changes: 12 additions & 1 deletion pkgs/applications/kde/kompare.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
mkDerivation, lib,
extra-cmake-modules, kdoctools,
kiconthemes, kparts, ktexteditor, kwidgetsaddons, libkomparediff2
kiconthemes, kparts, ktexteditor, kwidgetsaddons, libkomparediff2,
fetchpatch
}:

mkDerivation {
@@ -11,5 +12,15 @@ mkDerivation {
buildInputs = [
kiconthemes kparts ktexteditor kwidgetsaddons libkomparediff2
];

patches = [
(fetchpatch {
# Portaway from Obsolete methods of QPrinter
# Part of v20.12.0
url = "https://invent.kde.org/sdk/kompare/-/commit/68d3eee36c48a2f44ccfd3f9e5a36311b829104b.patch";
sha256 = "B2i5n5cUDjCqTEF0OyTb1+LhPa5yWCnFycwijf35kwU=";
})
];

outputs = [ "out" "dev" ];
}
770 changes: 385 additions & 385 deletions pkgs/applications/networking/browsers/firefox-bin/beta_sources.nix

Large diffs are not rendered by default.

770 changes: 385 additions & 385 deletions pkgs/applications/networking/browsers/firefox-bin/release_sources.nix

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/firefox/packages.nix
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ in
rec {
firefox = common rec {
pname = "firefox";
ffversion = "84.0";
ffversion = "84.0.1";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "37d5hc2wv1b6il4flgsw5g7ihw2jx3qrrmgm4cjg3lmk91q8k7908sy79z24na6529y7jxpj4m05l6yb850wnnwjhyc4c3vxqbldnba";
sha512 = "0sl93h7pjiznabv6865pdbal08nlqncnv3g40l02mgwbphjh5iqrr1bz14khaf58h4v1la090cj7z0gmd0c10xfrx6z7wngm152zz75";
};

meta = {
9 changes: 8 additions & 1 deletion pkgs/development/libraries/kde-frameworks/purpose.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{
mkDerivation, lib, extra-cmake-modules, qtbase
, qtdeclarative, kconfig, kcoreaddons, ki18n, kio, kirigami2
, fetchpatch
}:

mkDerivation {
name = "purpose";
meta = { maintainers = [ lib.maintainers.bkchr ]; };
nativeBuildInputs = [ extra-cmake-modules ];
patches = [
(fetchpatch {
url = "https://github.com/KDE/purpose/commit/b3842a0941858792e997bb35b679a3fdf3ef54ca.patch";
sha256 = "14brpryrrfrli1amk4flpnd03wr4zyycpiirndn9sjz0krqlgf3j";
})
];
buildInputs = [
qtbase qtdeclarative kconfig kcoreaddons
qtbase qtdeclarative kconfig kcoreaddons
ki18n kio kirigami2
];
}
4 changes: 2 additions & 2 deletions pkgs/development/libraries/nss/latest.nix
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ let
url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz";
sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw";
};
version = "3.59";
version = "3.60";
underscoreVersion = builtins.replaceStrings ["."] ["_"] version;

in stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ in stdenv.mkDerivation rec {

src = fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
sha256 = "096fs3z21r171q24ca3rq53p1389xmvqz1f2rpm7nlm8r9s82ag6";
sha256 = "0ggyj3ax3kal65sl1vl4nfhx2s08blg4dg8iwlxcax5qb9bxbaw4";
};

depsBuildBuild = [ buildPackages.stdenv.cc ];
18 changes: 7 additions & 11 deletions pkgs/development/libraries/qt-5/5.15/default.nix
Original file line number Diff line number Diff line change
@@ -57,6 +57,12 @@ let

# Downgrade minimal required SDK to 10.12
./qtbase.patch.d/0013-define-kiosurfacesuccess.patch
./qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch
./qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch
./qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch
./qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch
./qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch
./qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch
./qtbase.patch.d/qtbase-sdk-10.12-mac.patch
]
++ [
@@ -73,17 +79,7 @@ let
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [ ./qtscript.patch ];
qtserialport = [ ./qtserialport.patch ];
qtwebengine = [
# Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599
(fetchpatch {
name = "qtwebengine-bison-3.7-build.patch";
url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599";
sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy";
stripLen = 1;
extraPrefix = "src/3rdparty/";
})
]
++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch;
qtwebengine = optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch;
qtwebkit = [
(fetchpatch {
name = "qtwebkit-bison-3.7-build.patch";
2 changes: 1 addition & 1 deletion pkgs/development/libraries/qt-5/5.15/fetch.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.0/submodules/ )
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ )
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From f156c35975e7844d2369ec5a6633ee40ec56f17a Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Mon, 7 Dec 2020 12:32:29 -0500
Subject: [PATCH 1/6] Revert "QCocoaDrag - set image only on the first drag
item"

This reverts commit 7ee9bfc158a290776f622f62d0202220c6d159bc.
---
src/plugins/platforms/cocoa/qcocoadrag.mm | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
index 4bd1b129bd..a506126c72 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.mm
+++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
@@ -217,18 +217,13 @@ bool QCocoaDrag::maybeDragMultipleItems()
// 0. We start from URLs, which can be actually in a list (thus technically
// only ONE item in the pasteboard. The fact it's only one does not help, we are
// still getting an exception because of the number of items/images mismatch ...
- // We only set the image for the first item and nil for the rest, the image already
- // contains a combined picture for all urls we drag.
- auto imageOrNil = dragImage;
for (const auto &qtUrl : qtUrls) {
NSURL *nsUrl = qtUrl.toNSURL();
auto *newItem = [[[NSDraggingItem alloc] initWithPasteboardWriter:nsUrl] autorelease];
const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y,
dragImage.size.width,
dragImage.size.height);
-
- [newItem setDraggingFrame:itemFrame contents:imageOrNil];
- imageOrNil = nil;
+ [newItem setDraggingFrame:itemFrame contents:dragImage];
[dragItems addObject:newItem];
}
// 1. Repeat for non-url items, if any:
@@ -237,7 +232,7 @@ bool QCocoaDrag::maybeDragMultipleItems()
const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y,
dragImage.size.width,
dragImage.size.height);
- [newItem setDraggingFrame:itemFrame contents:imageOrNil];
+ [newItem setDraggingFrame:itemFrame contents:dragImage];
[dragItems addObject:newItem];
}

--
2.21.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 9aaac67e3c3bf40ef3efc3b07b1655f72c8c54aa Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Mon, 7 Dec 2020 12:32:31 -0500
Subject: [PATCH 2/6] Revert "QCocoaDrag::drag - make sure clipboard is ours
and populated"

This reverts commit 720e2e0c92ca6635c5f05f318770a70cf653c1c7.
---
src/plugins/platforms/cocoa/qcocoadrag.mm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
index a506126c72..c6ee4323ce 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.mm
+++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
@@ -131,10 +131,6 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
m_drag = o;
m_executed_drop_action = Qt::IgnoreAction;

- QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND);
- m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy"));
- dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest);
-
if (maybeDragMultipleItems())
return m_executed_drop_action;

@@ -143,6 +139,10 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
NSImage *dragImage = [NSImage imageFromQImage:pm.toImage()];
Q_ASSERT(dragImage);

+ QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND);
+ m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy"));
+ dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest);
+
NSPoint event_location = [m_lastEvent locationInWindow];
NSWindow *theWindow = [m_lastEvent window];
Q_ASSERT(theWindow);
--
2.21.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From d1626c55d10537274c6f365855342a1c619a4c3a Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Mon, 7 Dec 2020 12:32:32 -0500
Subject: [PATCH 3/6] Revert "QCocoaDrag::maybeDragMultipleItems - fix
erroneous size check"

This reverts commit b8a03411784803c07ecc1f769860756d6fdc04cd.
---
src/plugins/platforms/cocoa/qcocoadrag.mm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
index c6ee4323ce..ab6863a432 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.mm
+++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
@@ -187,7 +187,7 @@ bool QCocoaDrag::maybeDragMultipleItems()
const auto &qtUrls = m_drag->mimeData()->urls();
NSPasteboard *dragBoard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag];

- if (qtUrls.size() <= 1) {
+ if (int(dragBoard.pasteboardItems.count) == 1 && qtUrls.size() <= 1) {
// Good old -dragImage: works perfectly for this ...
return false;
}
--
2.21.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
From d5c155a9f3ff38e28ac073f6df43175724ebc290 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Mon, 7 Dec 2020 12:32:34 -0500
Subject: [PATCH 4/6] Revert "QCocoaDrag - avoid using the deprecated API if
possible"

This reverts commit 8481a9fc974a1f1dd44a9f82decb18fe2290689f.
---
src/plugins/platforms/cocoa/qcocoadrag.h | 6 --
src/plugins/platforms/cocoa/qcocoadrag.mm | 90 -------------------
.../platforms/cocoa/qnsview_dragging.mm | 9 +-
3 files changed, 1 insertion(+), 104 deletions(-)

diff --git a/src/plugins/platforms/cocoa/qcocoadrag.h b/src/plugins/platforms/cocoa/qcocoadrag.h
index 975741c270..5a5b985c6e 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.h
+++ b/src/plugins/platforms/cocoa/qcocoadrag.h
@@ -48,8 +48,6 @@
#include <QtGui/private/qdnd_p.h>
#include <QtGui/private/qinternalmimedata_p.h>

-#include <QtCore/qeventloop.h>
-
QT_BEGIN_NAMESPACE

class QCocoaDrag : public QPlatformDrag
@@ -71,15 +69,11 @@ public:
void setLastMouseEvent(NSEvent *event, NSView *view);

void setAcceptedAction(Qt::DropAction act);
- void exitDragLoop();
private:
QDrag *m_drag;
NSEvent *m_lastEvent;
NSView *m_lastView;
Qt::DropAction m_executed_drop_action;
- QEventLoop internalDragLoop;
-
- bool maybeDragMultipleItems();

QPixmap dragPixmap(QDrag *drag, QPoint &hotSpot) const;
};
diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm
index ab6863a432..b4a16ab912 100644
--- a/src/plugins/platforms/cocoa/qcocoadrag.mm
+++ b/src/plugins/platforms/cocoa/qcocoadrag.mm
@@ -44,9 +44,6 @@
#include <QtWidgets/qwidget.h>
#endif
#include <QtGui/private/qcoregraphics_p.h>
-#include <QtCore/qsysinfo.h>
-
-#include <vector>

QT_BEGIN_NAMESPACE

@@ -131,9 +128,6 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
m_drag = o;
m_executed_drop_action = Qt::IgnoreAction;

- if (maybeDragMultipleItems())
- return m_executed_drop_action;
-
QPoint hotSpot = m_drag->hotSpot();
QPixmap pm = dragPixmap(m_drag, hotSpot);
NSImage *dragImage = [NSImage imageFromQImage:pm.toImage()];
@@ -164,95 +158,11 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o)
return m_executed_drop_action;
}

-bool QCocoaDrag::maybeDragMultipleItems()
-{
- Q_ASSERT(m_drag && m_drag->mimeData());
- Q_ASSERT(m_executed_drop_action == Qt::IgnoreAction);
-
- if (QOperatingSystemVersion::current() < QOperatingSystemVersion::MacOSMojave) {
- // -dragImage: stopped working in 10.14 first.
- return false;
- }
-
- const QMacAutoReleasePool pool;
-
- NSWindow *theWindow = [m_lastEvent window];
- Q_ASSERT(theWindow);
-
- if (![theWindow.contentView respondsToSelector:@selector(draggingSession:sourceOperationMaskForDraggingContext:)])
- return false;
-
- auto *sourceView = static_cast<NSView<NSDraggingSource>*>(theWindow.contentView);
-
- const auto &qtUrls = m_drag->mimeData()->urls();
- NSPasteboard *dragBoard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag];
-
- if (int(dragBoard.pasteboardItems.count) == 1 && qtUrls.size() <= 1) {
- // Good old -dragImage: works perfectly for this ...
- return false;
- }
-
- std::vector<NSPasteboardItem *> nonUrls;
- for (NSPasteboardItem *item in dragBoard.pasteboardItems) {
- bool isUrl = false;
- for (NSPasteboardType type in item.types) {
- using NSStringRef = NSString *;
- if ([type isEqualToString:NSStringRef(kUTTypeFileURL)]) {
- isUrl = true;
- break;
- }
- }
-
- if (!isUrl)
- nonUrls.push_back(item);
- }
-
- QPoint hotSpot = m_drag->hotSpot();
- const auto pixmap = dragPixmap(m_drag, hotSpot);
- NSImage *dragImage = [NSImage imageFromQImage:pixmap.toImage()];
- Q_ASSERT(dragImage);
-
- NSMutableArray<NSDraggingItem *> *dragItems = [[[NSMutableArray alloc] init] autorelease];
- const NSPoint itemLocation = m_drag->hotSpot().toCGPoint();
- // 0. We start from URLs, which can be actually in a list (thus technically
- // only ONE item in the pasteboard. The fact it's only one does not help, we are
- // still getting an exception because of the number of items/images mismatch ...
- for (const auto &qtUrl : qtUrls) {
- NSURL *nsUrl = qtUrl.toNSURL();
- auto *newItem = [[[NSDraggingItem alloc] initWithPasteboardWriter:nsUrl] autorelease];
- const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y,
- dragImage.size.width,
- dragImage.size.height);
- [newItem setDraggingFrame:itemFrame contents:dragImage];
- [dragItems addObject:newItem];
- }
- // 1. Repeat for non-url items, if any:
- for (auto *pbItem : nonUrls) {
- auto *newItem = [[[NSDraggingItem alloc] initWithPasteboardWriter:pbItem] autorelease];
- const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y,
- dragImage.size.width,
- dragImage.size.height);
- [newItem setDraggingFrame:itemFrame contents:dragImage];
- [dragItems addObject:newItem];
- }
-
- [sourceView beginDraggingSessionWithItems:dragItems event:m_lastEvent source:sourceView];
- internalDragLoop.exec();
- return true;
-}
-
void QCocoaDrag::setAcceptedAction(Qt::DropAction act)
{
m_executed_drop_action = act;
}

-void QCocoaDrag::exitDragLoop()
-{
- if (internalDragLoop.isRunning())
- internalDragLoop.exit();
-}
-
-
QPixmap QCocoaDrag::dragPixmap(QDrag *drag, QPoint &hotSpot) const
{
const QMimeData* data = drag->mimeData();
diff --git a/src/plugins/platforms/cocoa/qnsview_dragging.mm b/src/plugins/platforms/cocoa/qnsview_dragging.mm
index 978d73f7d9..463e3c5579 100644
--- a/src/plugins/platforms/cocoa/qnsview_dragging.mm
+++ b/src/plugins/platforms/cocoa/qnsview_dragging.mm
@@ -232,10 +232,6 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
if (!target)
return;

- auto *nativeDrag = QCocoaIntegration::instance()->drag();
- Q_ASSERT(nativeDrag);
- nativeDrag->exitDragLoop();
-
QPoint windowPoint = QPointF::fromCGPoint([self convertPoint:sender.draggingLocation fromView:nil]).toPoint();

qCDebug(lcQpaMouse) << QEvent::DragLeave << self << "at" << windowPoint;
@@ -294,10 +290,7 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
if (!target)
return;

- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
- Q_ASSERT(nativeDrag);
- nativeDrag->exitDragLoop();
- nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation));
+ QCocoaIntegration::instance()->drag();

// Qt starts drag-and-drop on a mouse button press event. Cococa in
// this case won't send the matching release event, so we have to
--
2.21.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From e55ca5d08b29e67b699dc217abcb65e4a7655f72 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Mon, 7 Dec 2020 12:32:37 -0500
Subject: [PATCH 5/6] Revert "macOS: Fix use of deprecated NSOffState"

This reverts commit 6a0995525d306a1fa224adcbcb9f0ae1fc7d01bd.
---
src/plugins/styles/mac/qmacstyle_mac.mm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index d1febd81d4..b5e6e60ec0 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -3955,7 +3955,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
pbCell = static_cast<NSPopUpButtonCell *>(pb.cell);
oldPosition = pbCell.arrowPosition;
pbCell.arrowPosition = NSPopUpNoArrow;
- if (pb.state == NSControlStateValueOff) {
+ if (pb.state == NSOffState) {
// NSPopUpButton in this state is smaller.
rAdjusted.origin.x -= 3;
rAdjusted.size.width += 6;
--
2.21.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
From 3ce5e752c66307f905fdf732b102a396d9248fbb Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Mon, 7 Dec 2020 13:22:02 -0500
Subject: [PATCH 6/6] git checkout v5.15.0 --
src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm

---
.../cocoa/qcocoacolordialoghelper.mm | 50 +++++++++----------
1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
index 5ad1f9d7bb..c9fa035d87 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
@@ -180,34 +180,34 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSColorPanelDelegate);

- (void)updateQtColor
{
- // Discard the color space and pass the color components to QColor. This
- // is a good option as long as QColor is color-unmanaged: we preserve the
- // exact RGB value from the color picker, which is predictable. Further,
- // painting with the color will reproduce the same color on-screen, as
- // long as the the same screen is used for selecting the color.
- NSColor *componentColor = [[mColorPanel color] colorUsingType:NSColorTypeComponentBased];
- switch (componentColor.colorSpace.colorSpaceModel)
- {
- case NSColorSpaceModelGray: {
- CGFloat white = 0, alpha = 0;
- [componentColor getWhite:&white alpha:&alpha];
- mQtColor.setRgbF(white, white, white, alpha);
- } break;
- case NSColorSpaceModelRGB: {
- CGFloat red = 0, green = 0, blue = 0, alpha = 0;
- [componentColor getRed:&red green:&green blue:&blue alpha:&alpha];
- mQtColor.setRgbF(red, green, blue, alpha);
- } break;
- case NSColorSpaceModelCMYK: {
+ NSColor *color = [mColorPanel color];
+ NSString *colorSpaceName = [color colorSpaceName];
+ if (colorSpaceName == NSDeviceCMYKColorSpace) {
CGFloat cyan = 0, magenta = 0, yellow = 0, black = 0, alpha = 0;
- [componentColor getCyan:&cyan magenta:&magenta yellow:&yellow black:&black alpha:&alpha];
+ [color getCyan:&cyan magenta:&magenta yellow:&yellow black:&black alpha:&alpha];
mQtColor.setCmykF(cyan, magenta, yellow, black, alpha);
- } break;
- default:
- qWarning("QNSColorPanelDelegate: Unsupported color space model");
- break;
+ } else if (colorSpaceName == NSCalibratedRGBColorSpace || colorSpaceName == NSDeviceRGBColorSpace) {
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0;
+ [color getRed:&red green:&green blue:&blue alpha:&alpha];
+ mQtColor.setRgbF(red, green, blue, alpha);
+ } else if (colorSpaceName == NSNamedColorSpace) {
+ NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0;
+ [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha];
+ mQtColor.setRgbF(red, green, blue, alpha);
+ } else {
+ NSColorSpace *colorSpace = [color colorSpace];
+ if ([colorSpace colorSpaceModel] == NSCMYKColorSpaceModel && [color numberOfComponents] == 5){
+ CGFloat components[5];
+ [color getComponents:components];
+ mQtColor.setCmykF(components[0], components[1], components[2], components[3], components[4]);
+ } else {
+ NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
+ CGFloat red = 0, green = 0, blue = 0, alpha = 0;
+ [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha];
+ mQtColor.setRgbF(red, green, blue, alpha);
+ }
}
-
if (mHelper)
emit mHelper->currentColorChanged(mQtColor);
}
--
2.21.0

336 changes: 168 additions & 168 deletions pkgs/development/libraries/qt-5/5.15/srcs.nix

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyqt/5.x.nix
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@ let

in buildPythonPackage rec {
pname = "PyQt5";
version = "5.15.1";
version = "5.15.2";
format = "other";

src = pythonPackages.fetchPypi {
inherit pname version;
sha256 = "18grs2p698ihjgi8agksv6sajakciywyr29ihslqvl260a2np9yr";
sha256 = "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp";
};

outputs = [ "out" "dev" ];
4 changes: 4 additions & 0 deletions pkgs/development/tools/misc/gdb/default.nix
Original file line number Diff line number Diff line change
@@ -40,6 +40,10 @@ stdenv.mkDerivation rec {

patches = [
./debug-info-from-env.patch

# backport of a350efd4fb368a35ada608f6bc26ccd3bed0ae6b from upstream
# to fix https://github.com/NixOS/nixpkgs/issues/106868
./fix_crash_when_exiting_TUI_with_gdb_-tui.patch
] ++ stdenv.lib.optionals stdenv.isDarwin [
./darwin-target-match.patch
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
diff -ur gdb-9.2.orig/gdb/tui/tui.c gdb-9.2/gdb/tui/tui.c
--- gdb-9.2.orig/gdb/tui/tui.c 2020-12-15 21:17:41.571078984 +0000
+++ gdb-9.2/gdb/tui/tui.c 2020-12-15 21:27:54.953799136 +0000
@@ -324,8 +324,14 @@
/* Initialize readline and configure the keymap for the switching
key shortcut. */
void
-tui_initialize_readline (void)
+tui_ensure_readline_initialized (void)
{
+ static bool initialized;
+
+ if (initialized)
+ return;
+ initialized = true;
+
int i;
Keymap tui_ctlx_keymap;

@@ -381,6 +387,9 @@
rl_bind_key_in_map ('q', tui_rl_next_keymap, tui_keymap);
rl_bind_key_in_map ('s', tui_rl_next_keymap, emacs_ctlx_keymap);
rl_bind_key_in_map ('s', tui_rl_next_keymap, tui_ctlx_keymap);
+
+ /* Initialize readline after the above. */
+ rl_initialize ();
}

/* Return the TERM variable from the environment, or "<unset>"
diff -ur gdb-9.2.orig/gdb/tui/tui.h gdb-9.2/gdb/tui/tui.h
--- gdb-9.2.orig/gdb/tui/tui.h 2020-12-15 21:17:41.571078984 +0000
+++ gdb-9.2/gdb/tui/tui.h 2020-12-15 21:22:03.354662356 +0000
@@ -52,9 +52,9 @@
extern int tui_get_command_dimension (unsigned int *width,
unsigned int *height);

-/* Initialize readline and configure the keymap for the switching
- key shortcut. */
-extern void tui_initialize_readline (void);
+/* Initialize readline and configure the keymap for the switching key
+ shortcut. May be called more than once without issue. */
+extern void tui_ensure_readline_initialized (void);

/* Enter in the tui mode (curses). */
extern void tui_enable (void);
diff -ur gdb-9.2.orig/gdb/tui/tui-interp.c gdb-9.2/gdb/tui/tui-interp.c
--- gdb-9.2.orig/gdb/tui/tui-interp.c 2020-12-15 21:17:41.571078984 +0000
+++ gdb-9.2/gdb/tui/tui-interp.c 2020-12-15 21:18:49.771490624 +0000
@@ -244,7 +244,7 @@
tui_initialize_io ();
tui_initialize_win ();
if (ui_file_isatty (gdb_stdout))
- tui_initialize_readline ();
+ tui_ensure_readline_initialized ();
}

void
diff -ur gdb-9.2.orig/gdb/tui/tui-io.c gdb-9.2/gdb/tui/tui-io.c
--- gdb-9.2.orig/gdb/tui/tui-io.c 2020-12-15 21:17:41.571078984 +0000
+++ gdb-9.2/gdb/tui/tui-io.c 2020-12-15 21:19:34.994763950 +0000
@@ -769,6 +769,10 @@

if (mode)
{
+ /* Ensure that readline has been initialized before saving any
+ of its variables. */
+ tui_ensure_readline_initialized ();
+
/* Redirect readline to TUI. */
tui_old_rl_redisplay_function = rl_redisplay_function;
tui_old_rl_deprep_terminal = rl_deprep_term_function;
1 change: 1 addition & 0 deletions pkgs/tools/typesetting/asciidoctor/Gemfile
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ gem 'asciidoctor-diagram'
gem 'asciidoctor-pdf'
gem 'asciidoctor-epub3'
gem 'asciidoctor-mathematical'
gem 'asciidoctor-revealjs'
gem 'coderay'
gem 'pygments.rb'
gem 'rouge'
9 changes: 9 additions & 0 deletions pkgs/tools/typesetting/asciidoctor/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -28,6 +28,11 @@ GEM
safe_yaml (~> 1.0.0)
thread_safe (~> 0.3.0)
treetop (~> 1.5.0)
asciidoctor-revealjs (4.0.1)
asciidoctor (>= 2.0.0, < 3.0.0)
concurrent-ruby (~> 1.0)
thread_safe (~> 0.3.5)
asciimath (2.0.1)
coderay (1.1.2)
concurrent-ruby (1.1.5)
css_parser (1.7.0)
@@ -40,6 +45,9 @@ GEM
concurrent-ruby (~> 1.0)
mathematical (1.6.12)
ruby-enum (~> 0.4)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.1104)
mini_portile2 (2.4.0)
multi_json (1.13.1)
nokogiri (1.10.3)
@@ -88,6 +96,7 @@ DEPENDENCIES
asciidoctor-epub3
asciidoctor-mathematical
asciidoctor-pdf
asciidoctor-revealjs
coderay
pygments.rb
rouge
1 change: 1 addition & 0 deletions pkgs/tools/typesetting/asciidoctor/default.nix
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ let
"asciidoctor-pdf"
"asciidoctor-safe"
"asciidoctor-epub3"
"asciidoctor-revealjs"
];

buildInputs = [ makeWrapper ];
42 changes: 42 additions & 0 deletions pkgs/tools/typesetting/asciidoctor/gemset.nix
Original file line number Diff line number Diff line change
@@ -84,6 +84,27 @@
};
version = "1.5.0.alpha.18";
};
asciidoctor-revealjs = {
dependencies = ["asciidoctor" "concurrent-ruby" "thread_safe"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "084aq9frv4irzgd9ab3xad9i0ml9lb58w0wvg76gnwwr51plbpp4";
type = "gem";
};
version = "4.0.1";
};
asciimath = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1aapydwwkydbwgz07n7ma3a5jy9n3v0shy6q6j8mi4wr3crhx45a";
type = "gem";
};
version = "2.0.1";
};
coderay = {
groups = ["default"];
platforms = [];
@@ -158,6 +179,27 @@
};
version = "1.6.12";
};
mime-types = {
dependencies = ["mime-types-data"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh";
type = "gem";
};
version = "3.3.1";
};
mime-types-data = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0ipjyfwn9nlvpcl8knq3jk4g5f12cflwdbaiqxcq1s7vwfwfxcag";
type = "gem";
};
version = "3.2020.1104";
};
mini_portile2 = {
groups = ["default"];
platforms = [];