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

quassel: use wrapQtAppsHook for the client #66550

Closed
wants to merge 1 commit into from

Conversation

Shados
Copy link
Member

@Shados Shados commented Aug 13, 2019

Motivation for this change

#65399

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @Phreedom @ttuegel

@peterhoeg
Copy link
Member

Since we are calling it with libsForQt5.callPackage, you don't have to manually use wrapQtAppsHook. The qt provided mkDerivation will do the trick (instead stdenv.mkDerivation).

@Shados
Copy link
Member Author

Shados commented Aug 13, 2019

@peterhoeg Does the core actually need wrapping...? I'll go find out, I guess.

@@ -4,7 +4,7 @@
, tag ? "-kf5" # tag added to the package name
, static ? false # link statically

, stdenv, fetchFromGitHub, cmake, makeWrapper, dconf
, stdenv, fetchFromGitHub, cmake, makeWrapper, dconf, wrapQtAppsHook
Copy link
Member

Choose a reason for hiding this comment

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

Because the dependency on Qt is unconditional, it is preferred to import mkDerivation and use that below instead of stdenv.mkDerivation.

@worldofpeace
Copy link
Contributor

I'm pretty sure you should wrap the core as well.

@Shados
Copy link
Member Author

Shados commented Aug 15, 2019

@ttuegel @worldofpeace I tested, quasselcore runs fine without wrapping. It does still use Qt, but it appears that all its Qt dependencies are compile-time -- there's apparently no run-time dependency on any plugins, and obviously not on any style engines or other GUI components.

@ttuegel
Copy link
Member

ttuegel commented Aug 15, 2019

It does still use Qt, but it appears that all its Qt dependencies are compile-time -- there's apparently no run-time dependency on any plugins, and obviously not on any style engines or other GUI components.

IIRC, it doesn't link libQt5Gui.so, so this sounds good.

@samueldr
Copy link
Member

Oh, dang, I didn't think of searching before writing a fix... #67746 solves the issue by using mkDerivation as given by callPackage, and removes the dangerous with stdenv;. Should we prefer using the right mkDerivation over re-implementing the patch logic?

Though, I guess this becomes an issue with quasselCore. Well, it does work fine when wrapped, so maybe it's a non-issue?

@Shados
Copy link
Member Author

Shados commented Aug 30, 2019

Though, I guess this becomes an issue with quasselCore. Well, it does work fine when wrapped, so maybe it's a non-issue?

Doesn't that mean quasselCore will end up pulling in extra runtime dependencies...?

@samueldr
Copy link
Member

Doesn't that mean quasselCore will end up pulling in extra runtime dependencies...?

I guess it's possible, then switching which mkDerivation to use on whether it needs Qt is probably the better option in that case. I just pushed that change. The core does start when using stdenv.mkDerivation (as expected). In my case everything else was a no-op compared to the state before the change.

@Shados
Copy link
Member Author

Shados commented Aug 30, 2019

@samueldr That seems a lot less clear as to what it is actually doing, though, because the difference between mkDerivation and stdenv.mkDerivation is not apparent to someone reading the derivation expression. Even assuming they're familiar with libsForQt5.mkDerivation, they still need to either check the call site or make the assumption that libsForQt5.callPackage was used there.

Actually, I guess that's more of an issue with the 'use a custom deriver' approach in general.

@worldofpeace
Copy link
Contributor

#67746 superseded this.

@Shados
Copy link
Member Author

Shados commented Oct 1, 2019

OK. I am feeling a little disappointed at the course of events here. I do not think that both PRs should have remained open; I believe that ideally either @samueldr should have closed theirs, or they or another maintainer should have asked me to close this one, in order to to ensure that further discussion and work continued in a single place rather than being confusingly fragmented.

@worldofpeace
Copy link
Contributor

OK. I am feeling a little disappointed at the course of events here. I do not think that both PRs should have remained open; I believe that ideally either @samueldr should have closed theirs, or they or another maintainer should have asked me to close this one, in order to to ensure that further discussion and work continued in a single place rather than being confusingly fragmented.

Indeed it did get a little messy.
From my perspective, as an integrator, neither of the changes purposed actually moved along with the changes that needed to happen for me to integrate them. So when I got the time today I finished c52b5b8 (why it says co-authored). In the end the same goal was achieved, it's not broken, but I do understand the means to this weren't optimal. @Shados In the future I'll take extra measure to give direction to changes with competing PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants