Skip to content

Qt: Do not require mkDerivation #71089

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

Closed

Conversation

ttuegel
Copy link
Member

@ttuegel ttuegel commented Oct 13, 2019

Motivation for this change

This removes the need to use a custom mkDerivation with Qt applications. For compatibility, it remains, but it doesn't do much besides include wrapQtAppsHook.

See also: #65399 (comment)

TODO:

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 @

Sorry, something went wrong.

@worldofpeace
Copy link
Contributor

@ttuegel By port #70691 you mean qtbase setup hook checks for the presence of wrapQtAppsHook?

@ttuegel
Copy link
Member Author

ttuegel commented Oct 14, 2019

By port #70691 you mean qtbase setup hook checks for the presence of wrapQtAppsHook?

@worldofpeace Something like that. I'm not sure what the best option is: check for presence, or include by default. I like the idea of doing the right thing by default (including wrapQtAppsHook), but I know that trying to be "magic" often makes things difficult to understand. On the other hand, it is always possible to set dontWrapQtApps to disable the magic.

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/wrapqtappshook-out-of-tree/5619/7

@periklis periklis removed their request for review February 19, 2020 18:32
@jtojnar jtojnar mentioned this pull request Mar 17, 2020
10 tasks
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/declarative-wrappers-another-idea/6661/1

@ttuegel ttuegel force-pushed the feature--staging--qt-no-mkDerivation branch from b6ac094 to f3a5148 Compare September 11, 2020 23:58
@ofborg ofborg bot requested a review from periklis September 12, 2020 01:42
@ttuegel ttuegel force-pushed the feature--staging--qt-no-mkDerivation branch from f3a5148 to fcf74db Compare September 12, 2020 12:03
@periklis periklis removed their request for review September 14, 2020 06:55
@FRidh FRidh requested a review from doronbehar October 7, 2020 15:44
@doronbehar
Copy link
Contributor

How is the debug flag related to mkDerivation?

@ttuegel
Copy link
Member Author

ttuegel commented Oct 12, 2020

How is the debug flag related to mkDerivation?

We have to set certain CFLAGS in all dependencies, based on the debug flag.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Let's try it out in staging

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Lets go to staging! 🎰

Verified

This commit was signed with the committer’s verified signature. The key has expired.
rnhmjoj Michele Guerini Rocco
The qmake hook sets its own `CONFIG+=debug` or `CONFIG+=release` depending on
how `qtbase` was built. We no longer rely on using the custom deriver for this
feature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ttuegel ttuegel force-pushed the feature--staging--qt-no-mkDerivation branch from fcf74db to c43b696 Compare January 1, 2021 01:14
@ofborg ofborg bot requested a review from periklis January 1, 2021 01:24
@ttuegel ttuegel force-pushed the feature--staging--qt-no-mkDerivation branch from c43b696 to 00a1c6b Compare January 1, 2021 02:15
@ttuegel ttuegel force-pushed the feature--staging--qt-no-mkDerivation branch from 00a1c6b to 812f779 Compare January 1, 2021 11:40
# Integration with CMake:
# Set the CMake build type corresponding to how qtbase was built.
if [ -n "@debug@" ]; then
cmakeFlags="${cmakeFlags-}${cmakeFlags:+ }-DCMAKE_BUILD_TYPE=Debug"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use cmakeBuildType instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 It is... possible that did not exist when this pull request was originally drafted. 😆

++ [
("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release"))
];

enableParallelBuilding = args.enableParallelBuilding or true;
Copy link
Member

Choose a reason for hiding this comment

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

This should be redundant as both cmake and qmake setup hooks already enable this by default.

@ttuegel
Copy link
Member Author

ttuegel commented Jan 3, 2021

I am closing this pull request because my branch is completely broken and I don't know why. I will re-open later.

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

Successfully merging this pull request may close these issues.

None yet

7 participants