NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.08k forks source link

Yakuake: fails to launch when installed as user and as part of system configuration #38455

Closed fusion809 closed 5 years ago

fusion809 commented 6 years ago

Issue description

On NixOS 18.03, running Yakuake is impossible for me, at least. I'm running GNOME 3, although I have installed KDE Plasma with:

services.xserver.desktopManager.plasma5.enable = true;

in my system configuration, yet running Yakuake returns:

Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kglobalaccel was not provided by any .service files")
Segmentation fault

I get this error regardless of whether Yakuake is installed as user or as part of system configuration. Adding libsForQt5.kglobalaccel to my environment.systemPackages variable and rebuilding does not resolve the issue either, I get the same error.

Steps to reproduce

Cleanly install NixOS 18.03 with this configuration. Then execute yakuake.

Technical details

nix-shell -p nix-info --run "nix-info -m" returns:

 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.32, NixOS, 18.03.131768.a74969256b0 (Impala)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0`
 - channels(fusion809): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`
fusion809 commented 6 years ago

Well I rebooted and it now Yakuake launches fine, it didn't start after I rebooted before I added the libsForQt5.kglobalaccel to my system package (after I had added KDE to it), so is this still a valid bug report? Like maybe Yakuake should come with a libsForQt5.kglobalaccel dependency.

FRidh commented 6 years ago

~It added a dependency:~ https://cgit.kde.org/yakuake.git/commit/?h=v3.0.5&id=2c26a6c59dc5664ea6a4ed5b99fea8f813e2acb7

FRidh commented 6 years ago
$ nix-store -qR $(nix-build -A yakuake)  | grep kglobal
/nix/store/9w68r1r8670dj4imm3qxql8ql6plp74m-kglobalaccel-5.44.0
/nix/store/ygp3fbs8mz304kxickzidgdwbc9af9g8-kglobalaccel-5.44.0-bin
/nix/store/yvflvgqs68kfsfyy4s15ns4pbdfq4wlq-kglobalaccel-5.44.0-dev

shows it has a runtime dependency on kglobalaccel. What I think what you are encountering is then:

When testing applications in Nixpkgs, it is a common practice to build the package with nix-build and run it using the created symbolic link. This will not work with Qt applications, however, because they have many hard runtime requirements that can only be guaranteed if the package is actually installed. To test a Qt application, install it with nix-env or run it inside nix-shell.

https://nixos.org/nixpkgs/manual/#ssec-qt-applications

fusion809 commented 6 years ago

Ah I didn't build it with nix-build... I was working on NixOS 18.03 where I was installin' the ol' fashion way with either nix-env (which is what I did when I installed it as user), or system rebuilds (which is what I did with that configuration file I linked...). I think that's what I said I did from the start, but maybe somehow doing this is actually running nix-build in the background and that's what you're thinking?

markuskowa commented 5 years ago

I just encountered a similar problem on (NixOS 19.03, gnome3 desktop) but dbus complaining that it can not find kglobalaccel. This solved the problem:

services.dbus.packages = [ pkgs.libsForQt5.kglobalaccel ];
FRidh commented 5 years ago

Qt packaging has changed since, so I am closing this.