Merge pull request #300234 from SuperSandro2000/partition-plasma6

nixos/partition-manager: use qt6 when plasma6 is activated p
This commit is contained in:
K900 2024-03-30 17:27:49 +03:00 committed by GitHub
commit ff964811c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 11 deletions

View File

@ -1,19 +1,21 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.partition-manager;
in {
meta.maintainers = [ lib.maintainers.oxalica ];
{
meta.maintainers = [ maintainers.oxalica ];
###### interface
options = {
programs.partition-manager.enable = mkEnableOption (lib.mdDoc "KDE Partition Manager");
programs.partition-manager = {
enable = lib.mkEnableOption (lib.mdDoc "KDE Partition Manager");
package = lib.mkPackageOption pkgs [ "libsForQt5" "partitionmanager" ] { };
};
};
###### implementation
config = mkIf config.programs.partition-manager.enable {
services.dbus.packages = [ pkgs.libsForQt5.kpmcore ];
config = lib.mkIf config.programs.partition-manager.enable {
services.dbus.packages = [ cfg.package.kpmcore ];
# `kpmcore` need to be installed to pull in polkit actions.
environment.systemPackages = [ pkgs.libsForQt5.kpmcore pkgs.libsForQt5.partitionmanager ];
environment.systemPackages = [ cfg.package.kpmcore cfg.package ];
};
}

View File

@ -286,6 +286,7 @@ in {
};
programs.kdeconnect.package = kdePackages.kdeconnect-kde;
programs.partition-manager.package = kdePackages.partitionmanager;
# FIXME: ugly hack. See #292632 for details.
system.userActivationScripts.rebuildSycoca = activationScript;

View File

@ -1,5 +1,4 @@
{ mkDerivation
, fetchurl
, lib
, extra-cmake-modules
, kdoctools
@ -80,6 +79,10 @@ mkDerivation {
)
'';
passthru = {
inherit kpmcore;
};
meta = with lib; {
description = "KDE Partition Manager";
longDescription = ''

View File

@ -6,5 +6,10 @@ mkKdeDerivation {
pname = "partitionmanager";
propagatedUserEnvPkgs = [kpmcore];
passthru = {
inherit kpmcore;
};
meta.mainProgram = "partitionmanager";
}