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

Build failure: adding xdg-desktop-portal-gtk conflicts with GNOME's implementation #345733

Closed
freelock opened this issue Oct 1, 2024 · 9 comments · Fixed by #345979
Closed

Build failure: adding xdg-desktop-portal-gtk conflicts with GNOME's implementation #345733

freelock opened this issue Oct 1, 2024 · 9 comments · Fixed by #345979
Labels
0.kind: build failure A package fails to build

Comments

@freelock
Copy link

freelock commented Oct 1, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. Set the following options:
  services.displayManager.sddm.enable = true;
  services.desktopManager.plasma6.enable = true;
  services.xserver.desktopManager.gnome.enable = true;

Build log

building the system configuration...
error: builder for '/nix/store/bywyrsnljzzln4csq9gk6585zhifcshy-user-units.drv' failed with exit code 1;
       last 1 log lines:
       > ln: failed to create symbolic link '/nix/store/jk674blqjdyjzbq3c2gwczapawxalz3m-user-units/xdg-desktop-portal-gtk.service': File exists
       For full logs, run 'nix log /nix/store/bywyrsnljzzln4csq9gk6585zhifcshy-user-units.drv'.
error: 1 dependencies of derivation '/nix/store/jyq18m9bv9y2gyjn57y6pcj513azmnsc-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1xwqgshgpjns6fh4f5v540nqkg55h5zv-nixos-system-valhalla-24.11.20240929.06cf0e1.drv' failed to build

Additional context

It looks like xdg-desktop-portal-gtk was added in c4c3b41

... I think Gnome modifies this package somehow, creating the conflict. This only breaks if you try to install both Gnome and Plasma6 simultaneously.

Notify maintainers

@K900

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
  /nix/store/jvr4c9nb6xzw365px5gxh34sk88fqa7w-nix-info
copying path '/nix/store/jvr4c9nb6xzw365px5gxh34sk88fqa7w-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.52, NixOS, 24.11 (Vicuna), 24.11.20240929.06cf0e1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/home/john/.nix-defexpr/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

@freelock freelock added the 0.kind: build failure A package fails to build label Oct 1, 2024
@K900
Copy link
Contributor

K900 commented Oct 1, 2024

This is kind of normal, GNOME uses a different build of xdg-desktop-portal-gtk, so there's not much we can do here really. If you really want to have both, maybe run them in specializations.

@freelock
Copy link
Author

freelock commented Oct 1, 2024

I'm not really using Gnome very often, but rebuilding without it, I've lost a bunch of fonts in GTK apps... any suggestions?

@K900
Copy link
Contributor

K900 commented Oct 1, 2024

Install whatever fonts you need?

@JohnRTitor JohnRTitor changed the title Build failure: plasma6 conflict with Gnome in xdg-desktop-portal-gtk Build failure: adding xdg-desktop-portal-gtk conflicts with GNOME's implementation Oct 2, 2024
@JohnRTitor
Copy link
Contributor

JohnRTitor commented Oct 2, 2024

Causes issue if sway, hyprland, other Wayland compositors are enabled with GNOME since we are adding the portal there. #342646 (comment) CC @jtojnar

@JohnRTitor JohnRTitor added this to GNOME Oct 2, 2024
@jtojnar
Copy link
Member

jtojnar commented Oct 2, 2024

I think it should be fine to just enable all the portals in x-d-p-gtk unconditionally, now that the portal selection is configurable.

@Frontear
Copy link
Member

Frontear commented Oct 2, 2024

I have been thinking of an alternative implementation:

  1. Create a new options.xdg.portal.gtk.{enable, package}
  2. Enable it in all relevant locations rather than directly adding

Benefits here would be overall deduplication, though in cases of GNOME/standalone compositor it WILL favor gnome. Honestly thats not something I can reasonably think of a fix for that doesnt include manually checking every single module possible.

If the implementation above suffices I will submit a new PR shortly. Just want community feedback.

@jtojnar
Copy link
Member

jtojnar commented Oct 2, 2024

I am not a fan of package options in general. And if we stop disabling the duplicate portals on GNOME, there should be no need for it anyway, the conflict will just disappear.

@Frontear
Copy link
Member

Frontear commented Oct 2, 2024

The main reason I added the .package option was for GNOME/Cinnamon/Deepin, all of which override the default xdg-desktop-portal-gtk derivation

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/ln-failed-to-create-symbolic-link-nix-store-user-units-xdg-desktop-portal-gtk-service-file-exists/53876/4

@github-project-automation github-project-automation bot moved this to Done in GNOME Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants