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

deepin: use qt5.mkDerivation where needed, cleanup wrappers #65248

Merged
merged 4 commits into from Aug 4, 2019

Conversation

worldofpeace
Copy link
Contributor

@worldofpeace worldofpeace commented Jul 22, 2019

Commit Message

This switches a majority of the applications to using qt5.mkDerivation
which automatically adds wrapQtAppsHook.

In certain places, where GLib and gtk intersect with Qt, we
also needed to use wrapGAppsHook . In these cases there will be
multiple wrappers.

Motivation for this change

Something we should be doing.

It would be best to test this with #63813, and I also believe it will make
the lightdm-deepin-greeter module function as expected.

Edit: lightdm-deepin-greeter appears to work as expected with this.

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.

This switches a majority of the applications to using qt5.mkDerivation
which automatically adds wrapQtAppsHook.

In certain places, where GLib and gtk intersect with Qt, we
also needed to use wrapGAppsHook. In these cases there will
be multiple wrappers.
@@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, qttools,
{ stdenv, mkDerivation, fetchFromGitHub, pkgconfig, cmake, qttools,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe I'm a bit late here, but why is it called mkDerivation? I'd prefer mkQtDerivation, to make name distinguishable from stock mkDerivation

Copy link
Contributor

Choose a reason for hiding this comment

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

I have same concern about env name, which really-really should be called qtEnv, but this out of scope of this PR.
cc @ttuegel

Copy link
Member

Choose a reason for hiding this comment

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

These names do not exist outside of the scope of Qt packages, so I judge there is little risk of collision. There is a precedent for mkDerivation in particular; haskellPackages does the same thing.

@ttuegel
Copy link
Member

ttuegel commented Jul 22, 2019

In these cases there will be multiple wrappers.

For those cases, could we use wrapProgram manually? That seems like a better choice. Or, set dontWrapQtApps and include qtWrapperArgs into gappsWrapperArgs.

@worldofpeace
Copy link
Contributor Author

I thought of this as well, I've been doing similar with wrapGAppsHook and wrapPython.

Though it's still not that great since it's a manual step.

@worldofpeace worldofpeace merged commit c0a57b7 into NixOS:master Aug 4, 2019
@worldofpeace worldofpeace deleted the mkDerivation/deepin branch August 4, 2019 14:24
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

3 participants