From 7d8b42a553f3fa2f76e1b754b424d1c3c23bd7d0 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 9 Mar 2023 20:56:47 +0200 Subject: [PATCH 1/2] qt5: inherit from __splicedPackages to fix cross --- pkgs/top-level/all-packages.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4fbad823ba93f..738e2a75fccae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23058,12 +23058,11 @@ with pkgs; qt5 = recurseIntoAttrs (makeOverridable (import ../development/libraries/qt-5/5.15) { - inherit newScope; - inherit lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper; - inherit bison cups dconf harfbuzz libGL perl gtk3 python3; - inherit (gst_all_1) gstreamer gst-plugins-base; - inherit darwin; - inherit buildPackages; + inherit (__splicedPackages) + makeScopeWithSplicing generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper + bison cups dconf harfbuzz libGL perl gtk3 python3 + darwin buildPackages; + inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }); From 2cbbef006b5b48dc9428d3caa99f853fedc6bfe7 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 9 Mar 2023 20:57:06 +0200 Subject: [PATCH 2/2] qt5: use makeScopeWithSplicing if there is more than one qt5 attr and this file is copied then the arg to generateSplicesForMkScope should be changed --- nixos/modules/config/no-x-libs.nix | 2 +- pkgs/development/libraries/qt-5/5.15/default.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index 763c2038f6d4f..3ebe2fa9f1647 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -61,7 +61,7 @@ with lib; pinentry = super.pinentry.override { enabledFlavors = [ "curses" "tty" "emacs" ]; withLibsecret = false; }; qemu = super.qemu.override { gtkSupport = false; spiceSupport = false; sdlSupport = false; }; qrencode = super.qrencode.overrideAttrs (_: { doCheck = false; }); - qt5 = super.qt5.overrideScope' (const (super': { + qt5 = super.qt5.overrideScope (const (super': { qtbase = super'.qtbase.override { withGtk3 = false; }; })); stoken = super.stoken.override { withGTK3 = false; }; diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 31de73b25edcf..8560779b8d030 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -7,7 +7,7 @@ Check for any minor version changes. */ -{ newScope +{ makeScopeWithSplicing, generateSplicesForMkScope , lib, stdenv, fetchurl, fetchgit, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper , bison, cups ? null, harfbuzz, libGL, perl, python3 , gstreamer, gst-plugins-base, gtk3, dconf @@ -119,6 +119,9 @@ let callPackage = self.newScope { inherit qtCompatVersion qtModule srcs stdenv; }; in { + # remove before 23.11 + overrideScope' = lib.warn "qt5 now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\"." self.overrideScope; + inherit callPackage qtCompatVersion qtModule srcs; mkDerivationWith = @@ -225,4 +228,4 @@ let } ../hooks/wrap-qt-apps-hook.sh; }; -in lib.makeScope newScope addPackages +in makeScopeWithSplicing (generateSplicesForMkScope "qt5") (_: {}) (_: {}) addPackages diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 738e2a75fccae..ac6ef5664f7ca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23072,7 +23072,7 @@ with pkgs; # TODO: remove once no package needs this anymore or together with OpenSSL 1.1 # Current users: mumble, murmur - qt5_openssl_1_1 = qt5.overrideScope' (_: super: { + qt5_openssl_1_1 = qt5.overrideScope (_: super: { qtbase = super.qtbase.override { openssl = openssl_1_1; libmysqlclient = libmysqlclient.override {