NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.5k stars 12.99k forks source link

dwarf-fortress-full, nixos.qt5.full, and qtquickcontrols conflict #51989

Open arafangion opened 5 years ago

arafangion commented 5 years ago

Issue description

Installing multiple packages that use Qt tend to conflict.

Eg, as follows:

> nix-env -i qtquickcontrols
installing 'qtquickcontrols-5.11.1'
building '/nix/store/4m8zagapydrnq4ysnw5hib4znvkyr9p9-user-environment.drv'...
error: packages '/nix/store/cz50vrb5f6f1vpw10gx6kj2p5gil5b8z-qt-full-5.11.1/lib/qt-5.11/qml/QtQuick/PrivateWidgets/plugins.qmltypes' and '/nix/store/c25b88nw7a2r3sl16nxxcpfyxdv8341m-qtquickcontrols-5.11.1/lib/qt-5.11/qml/QtQuick/PrivateWidgets/plugins.qmltypes' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)
builder for '/nix/store/4m8zagapydrnq4ysnw5hib4znvkyr9p9-user-environment.drv' failed with exit code 1
error: build of '/nix/store/4m8zagapydrnq4ysnw5hib4znvkyr9p9-user-environment.drv' failed

Steps to reproduce

nix-env -i dwarf-fortress-full nix-env -i nixos.qt5.full nix-env -i qtquickcontrols

Technical details

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

 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.76, NixOS, 18.09.1446.db561c90ef3 (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.1.3`
 - channels(root): `"nixos-18.09.1446.db561c90ef3"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Ekleog commented 5 years ago

cc @ttuegel

This sounds like a widespread Qt packaging issue to me, is there a reason why the whole /lib/qt5-11 directory is duplicated? (the conflict was also reported to trigger between dwarf-fortress-full and qtdeclarative on IRC, so the issue is not just installing qt5.full)

matthewbauer commented 5 years ago

Can you try this patch:

diff --git a/pkgs/development/libraries/qt-5/qt-env.nix b/pkgs/development/libraries/qt-5/qt-env.nix
index 49585f601d1..60fa977fe2d 100644
--- a/pkgs/development/libraries/qt-5/qt-env.nix
+++ b/pkgs/development/libraries/qt-5/qt-env.nix
@@ -18,4 +18,6 @@ buildEnv {
     Documentation = ${qtbase.qtDocPrefix}
     EOF
   '';
+
+  meta.priority = 10;
 }

?

arafangion commented 5 years ago

Hello @matthewbauer: That patch might work, I ended up setting up the priority explicitly for the packages I was using.

However, for which of dwarf-fortress-full, nixos.qt5.full, and qtquickcontrols would it resolve, or wouldn't it set the meta.priority to 10 for all of them, bringing us back to square one?

ttuegel commented 5 years ago

Installing qt5.full and qtquickcontrols is expected to conflict. I can't say yet why dwarf-fortress-full would be involved, I will have to look at that more.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.