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

WIP: Add plasma-phone package #58370

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions nixos/modules/services/x11/desktop-managers/plasma5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ in
'';
};

mobile.enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable support for running the Plasma Mobile shell.
'';
};
};

};
Expand Down Expand Up @@ -168,6 +175,7 @@ in
]

++ lib.optionals cfg.enableQt4Support [ pkgs.phonon-backend-gstreamer ]
++ lib.optional cfg.mobile.enable plasma-phone

# Optional hardware support features
++ lib.optional config.hardware.bluetooth.enable bluedevil
Expand Down
1 change: 1 addition & 0 deletions pkgs/desktops/plasma-5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ let
milou = callPackage ./milou.nix {};
oxygen = callPackage ./oxygen.nix {};
plasma-browser-integration = callPackage ./plasma-browser-integration.nix {};
plasma-phone = callPackage ./plasma-phone {};
plasma-desktop = callPackage ./plasma-desktop {};
plasma-integration = callPackage ./plasma-integration {};
plasma-nm = callPackage ./plasma-nm {};
Expand Down
48 changes: 48 additions & 0 deletions pkgs/desktops/plasma-5/plasma-phone/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
mkDerivation, lib,

extra-cmake-modules, kdoctools,

coreutils, dbus, gnugrep, gnused, libdbusmenu, pam, wayland, appstream,

kdeclarative, kdelibs4support, kpeople, kconfig, krunner, kinit, kwayland, kwin,
plasma-framework, telepathy, libphonenumber, protobuf,

qtwayland, qttools
}:

let inherit (lib) getBin getLib; in

mkDerivation {
name = "plasma-phone";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upstream project is named plasma-phone-components, not plasma-phone. We should give our package the same name unless we have a good reason not to.


nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
appstream libdbusmenu pam wayland
kdeclarative kdelibs4support kpeople kconfig krunner kinit kwayland kwin
plasma-framework telepathy libphonenumber protobuf
];
outputs = [ "bin" "dev" "out" ];

cmakeFlags = [
"-DNIXPKGS_MKDIR=${getBin coreutils}/bin/mkdir"
"-DNIXPKGS_ID=${getBin coreutils}/bin/id"
"-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT=${getBin dbus}/bin/dbus-update-activation-environment"
"-DNIXPKGS_START_KDEINIT_WRAPPER=${getLib kinit}/lib/libexec/kf5/start_kdeinit_wrapper"
"-DNIXPKGS_QDBUS=${getBin qttools}/bin/qdbus"
"-DNIXPKGS_KWRAPPER5=${getBin kinit}/bin/kwrapper5"
"-DNIXPKGS_KREADCONFIG5=${getBin kconfig}/bin/kreadconfig5"
"-DNIXPKGS_GREP=${getBin gnugrep}/bin/grep"
"-DNIXPKGS_KDEINIT5_SHUTDOWN=${getBin kinit}/bin/kdeinit5_shutdown"
"-DNIXPKGS_SED=${getBin gnused}/bin/sed"
];

#preConfigure = ''
# NIX_CFLAGS_COMPILE+=" -DNIXPKGS_KDOSTARTUPCONFIG5=\"''${!outputBin}/bin/kdostartupconfig5\""
# cmakeFlags+=" -DNIXPKGS_STARTPLASMA=''${!outputBin}/lib/libexec/startplasma"
#'';

postInstall = ''
moveToOutput lib/libexec/startplasma ''${!outputBin}
'';
}
8 changes: 8 additions & 0 deletions pkgs/desktops/plasma-5/srcs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@
name = "plasma-browser-integration-5.14.5.tar.xz";
};
};
# TODO: Change to use "${mirror}" once available
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plasma-phone-components has releases in stable since 5.18, so now that #84542 is merged, you don't need to add anything to srcs.nix.

plasma-phone = {
version = "5.14.5";
src = fetchurl {
url = "https://invent.kde.org/kde/plasma-phone-components/-/archive/master/plasma-phone-components-master.tar.gz";
sha256 = "0jmw0c2pj4dmak1w49r4lwwg3c4zvgn5d3h3ihrzksh23ni7kb3b";
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Nothing to do right now, but to be done eventually before merging.)

Their invent platform is a GitLab server, fetchFromGitLab should be used to fetch their tarballs since revision tarballs, from most repo hosting systems, might eventually change as they are generated, making the sha256 unstable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the process of getting this on a mirror to match all the other packages in srcs.nix?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit

Ends up using either of:

Depending of where exactly it would go (among other srcs.nix handled by that script). So basically whenever kde/plasma publishes a released source for that.

};
plasma-desktop = {
version = "5.14.5";
src = fetchurl {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21562,8 +21562,8 @@ in
kactivitymanagerd kde-cli-tools kde-gtk-config kdeplasma-addons kgamma5
kinfocenter kmenuedit kscreen kscreenlocker ksshaskpass ksysguard
kwallet-pam kwayland-integration kwin kwrited milou oxygen plasma-browser-integration
plasma-desktop plasma-integration plasma-nm plasma-pa plasma-vault plasma-workspace
plasma-workspace-wallpapers polkit-kde-agent powerdevil sddm-kcm
plasma-desktop plasma-phone plasma-integration plasma-nm plasma-pa plasma-vault
plasma-workspace plasma-workspace-wallpapers polkit-kde-agent powerdevil sddm-kcm
systemsettings user-manager xdg-desktop-portal-kde;

### SCIENCE
Expand Down