From b209617ff0a8f26ea1d1fe3716a7fa717a50dd95 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 11 Dec 2020 19:52:16 +0100 Subject: [PATCH] plasma5Packages: alias to the libsForQt5 used to build the plasma5 desktop For in NixOS it is beneficial if both plasma5 and pam use the same Qt5 version. Because the plasma5 desktop may use a different version as the default Qt5 version, we introduce plasma5Packages. --- nixos/modules/i18n/input-method/ibus.nix | 2 +- nixos/modules/security/pam.nix | 8 ++++---- .../modules/services/x11/desktop-managers/plasma5.nix | 10 +++++----- nixos/modules/system/boot/plymouth.nix | 2 +- .../networking/browsers/firefox/wrapper.nix | 4 ++-- pkgs/top-level/aliases.nix | 10 +++++----- pkgs/top-level/all-packages.nix | 11 ++++------- 7 files changed, 22 insertions(+), 25 deletions(-) diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix index cf24ecf5863..1aaa5a952be 100644 --- a/nixos/modules/i18n/input-method/ibus.nix +++ b/nixos/modules/i18n/input-method/ibus.nix @@ -48,7 +48,7 @@ in panel = mkOption { type = with types; nullOr path; default = null; - example = literalExample "''${pkgs.plasma5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"; + example = literalExample "''${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"; description = "Replace the IBus panel with another panel."; }; }; diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index 1522111dbdd..103cf205012 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -430,8 +430,8 @@ let ${optionalString cfg.pamMount "auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so"} ${optionalString cfg.enableKwallet - ("auth optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" + - " kwalletd=${pkgs.kdeFrameworks.kwallet.bin}/bin/kwalletd5")} + ("auth optional ${pkgs.plasma5Packages.kwallet-pam}/lib/security/pam_kwallet5.so" + + " kwalletd=${pkgs.plasma5Packages.kwallet.bin}/bin/kwalletd5")} ${optionalString cfg.enableGnomeKeyring "auth optional ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so"} ${optionalString cfg.gnupg.enable @@ -509,8 +509,8 @@ let ${optionalString (cfg.enableAppArmor && config.security.apparmor.enable) "session optional ${pkgs.apparmor-pam}/lib/security/pam_apparmor.so order=user,group,default debug"} ${optionalString (cfg.enableKwallet) - ("session optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" + - " kwalletd=${pkgs.kdeFrameworks.kwallet.bin}/bin/kwalletd5")} + ("session optional ${pkgs.plasma5Packages.kwallet-pam}/lib/security/pam_kwallet5.so" + + " kwalletd=${pkgs.plasma5Packages.kwallet.bin}/bin/kwalletd5")} ${optionalString (cfg.enableGnomeKeyring) "session optional ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start"} ${optionalString cfg.gnupg.enable diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 5f1c099c283..d6cf86d3a2e 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -7,8 +7,8 @@ let xcfg = config.services.xserver; cfg = xcfg.desktopManager.plasma5; - inherit (pkgs) kdeApplications kdeFrameworks plasma5; - inherit (pkgs) qt5 libsForQt5; + libsForQt5 = pkgs.plasma5Packages; + inherit (libsForQt5) kdeApplications kdeFrameworks plasma5; inherit (pkgs) writeText; pulseaudio = config.hardware.pulseaudio; @@ -198,8 +198,8 @@ in }; security.wrappers = { - kcheckpass.source = "${lib.getBin plasma5.kscreenlocker}/libexec/kcheckpass"; - start_kdeinit.source = "${lib.getBin pkgs.kdeFrameworks.kinit}/libexec/kf5/start_kdeinit"; + kcheckpass.source = "${lib.getBin libsForQt5.kscreenlocker}/libexec/kcheckpass"; + start_kdeinit.source = "${lib.getBin libsForQt5.kinit}/libexec/kf5/start_kdeinit"; kwin_wayland = { source = "${lib.getBin plasma5.kwin}/bin/kwin_wayland"; capabilities = "cap_sys_nice+ep"; @@ -213,7 +213,7 @@ in ''; environment.systemPackages = - with qt5; with libsForQt5; + with libsForQt5; with plasma5; with kdeApplications; with kdeFrameworks; [ frameworkintegration diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index ddf5ef8a0a6..662576888fc 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -9,7 +9,7 @@ let cfg = config.boot.plymouth; - nixosBreezePlymouth = pkgs.plasma5.breeze-plymouth.override { + nixosBreezePlymouth = pkgs.plasma5Packages.breeze-plymouth.override { logoFile = cfg.logo; logoName = "nixos"; osName = "NixOS"; diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 88fb6af4b01..907f3e495d4 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -5,7 +5,7 @@ , flashplayer, hal-flash , ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd , gnome3/*.gnome-shell*/ -, browserpass, chrome-gnome-shell, uget-integrator, plasma5, bukubrow +, browserpass, chrome-gnome-shell, uget-integrator, plasma5Packages, bukubrow , tridactyl-native , fx_cast_bridge , udev @@ -76,7 +76,7 @@ let ++ lib.optional (cfg.enableTridactylNative or false) tridactyl-native ++ lib.optional (cfg.enableGnomeExtensions or false) chrome-gnome-shell ++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator - ++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma5.plasma-browser-integration + ++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma5Packages.plasma-browser-integration ++ lib.optional (cfg.enableFXCastBridge or false) fx_cast_bridge ++ extraNativeMessagingHosts ); diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7cd8397112a..960cd7a5bee 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -251,7 +251,7 @@ mapAliases ({ k9copy = throw "k9copy has been removed from nixpkgs, as there is no upstream activity"; # 2020-11-06 julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15 julia_11 = throw "julia_11 is deprecated in favor of latest Julia version"; # added 2020-09-15 - kdeconnect = kdeApplications.kdeconnect-kde; # added 2020-10-28 + kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28 kdiff3-qt5 = kdiff3; # added 2017-02-18 keepass-keefox = keepass-keepassrpc; # backwards compatibility alias, added 2018-02 keepassx-community = keepassxc; # added 2017-11 @@ -808,8 +808,8 @@ mapAliases ({ between mixed versions of qt. See: https://github.com/NixOS/nixpkgs/pull/101369 */ - inherit (kdeFrameworks) breeze-icons oxygen-icons5; - inherit (kdeApplications) + inherit (plasma5Packages) breeze-icons oxygen-icons5; + inherit (plasma5Packages) akonadi akregator ark bomber bovo dolphin dragon @@ -841,7 +841,7 @@ mapAliases ({ spectacle yakuake ; - inherit (plasma5) + inherit (plasma5Packages) bluedevil breeze-gtk breeze-qt5 breeze-grub breeze-plymouth discover kactivitymanagerd kde-cli-tools kde-gtk-config kdeplasma-addons kgamma5 kinfocenter kmenuedit kscreen kscreenlocker ksshaskpass ksysguard @@ -850,7 +850,7 @@ mapAliases ({ plasma-workspace-wallpapers polkit-kde-agent powerdevil sddm-kcm systemsettings xdg-desktop-portal-kde ; - inherit (plasma5.thirdParty) + inherit (plasma5Packages.thirdParty) plasma-applet-caffeine-plus kwin-dynamic-workspaces kwin-tiling diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1bb890768e..9cd1c79dbe9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11510,7 +11510,7 @@ in }; # Does not actually depend on Qt 5 - inherit (kdeFrameworks) extra-cmake-modules; + inherit (plasma5Packages) extra-cmake-modules; coccinelle = callPackage ../development/tools/misc/coccinelle { ocamlPackages = ocaml-ng.ocamlPackages_4_05; @@ -13920,8 +13920,6 @@ in judy = callPackage ../development/libraries/judy { }; - inherit (libsForQt5) kdeFrameworks; - keybinder = callPackage ../development/libraries/keybinder { automake = automake111x; lua = lua5_1; @@ -15836,6 +15834,9 @@ in qt5 = if stdenv.hostPlatform.isDarwin then qt512 else qt515; libsForQt5 = if stdenv.hostPlatform.isDarwin then libsForQt512 else libsForQt515; + # plasma5Packages maps to the Qt5 packages set that is used to build the plasma5 desktop + plasma5Packages = libsForQt515; + qt5ct = libsForQt5.callPackage ../tools/misc/qt5ct { }; qtEnv = qt5.env; @@ -22444,8 +22445,6 @@ in kapow = libsForQt5.callPackage ../applications/misc/kapow { }; - inherit (libsForQt514) kdeApplications; - okteta = libsForQt5.callPackage ../applications/editors/okteta { }; k4dirstat = libsForQt5.callPackage ../applications/misc/k4dirstat { }; @@ -26732,8 +26731,6 @@ in pantheon = recurseIntoAttrs (callPackage ../desktops/pantheon { }); - inherit (libsForQt5) plasma5; - plasma-applet-volumewin7mixer = libsForQt5.callPackage ../applications/misc/plasma-applet-volumewin7mixer { }; inherit (callPackages ../applications/misc/redshift {