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
octave: use qt-5 mkDerivation for wrapQtAppsHook #96985
octave: use qt-5 mkDerivation for wrapQtAppsHook #96985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapQtAppsHook
exists to do this for us. If you change the deriver from stdenv.mkDerivation
to mkDerivation
it will add the hook automatically. Also note, while those seem to be named exactly the same, mkDerivation
will come from the qt5
attribute set because of the callPackage function (that I believe) this package should be using. You should also condition it's adding on optionals enableQt
.
Correct. But, since octave is an interpreter, and it's build is so heavy, I'd argue we need an external wrapper derivation, so we would also be able to have a I thought I would be able to postpone this until the 6.0.0 release, which I can't wait to get a hold on for a long time now. Something modeled after diff --git i/pkgs/development/interpreters/octave/default.nix w/pkgs/development/interpreters/octave/default.nix
index 06d69ed8117..e4b527eaa6e 100644
--- i/pkgs/development/interpreters/octave/default.nix
+++ w/pkgs/development/interpreters/octave/default.nix
@@ -148,6 +148,7 @@ stdenv.mkDerivation rec {
passthru = {
inherit version;
sitePath = "share/octave/${version}/site";
+ inherit enableQt enableJIT enableJava enableReadline;
};
meta = { |
Maybe double wrapping wouldn't be that bad. I'm experimenting a fix for this on top of octave 6's release candidate. |
@doronbehar that makes sense, thanks. I'll update this PR to just use the right mkDerivation and test that, so we can either choose to merge or wait for a bigger refactoring. |
@graham33 please, if you'd test this on Darwin it'll be helpful. Something like this should work: The refactoring I'm working on are for Octave 6, and they come along other changes, so don't wait for me. I also did not find time to test the |
4c6daf1
to
ce933b2
Compare
Updated but not yet tested. |
This is to ensure QT_QPA_PLATFORM_PLUGIN_PATH is set on Darwin.
ce933b2
to
5416b2d
Compare
I've tested this briefly on Darwin (also on NixOS) and I get a working Octave. For Darwin I had to cherry-pick 8e4e38c from staging to get a working build (it hasn't made it to master yet). Just to briefly summarise the state of Octave on Darwin (at least from my brief testing, I don't use Darwin day-to-day): with the above fix the GUI works as long as you run with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
pkgs/top-level/all-packages.nix
Outdated
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 | ||
}; | ||
octaveFull = (lowPrio (libsForQt512.callPackage ../development/interpreters/octave { | ||
octaveFull = (lowPrio (libsForQt5.callPackage ../development/interpreters/octave { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove the lowPrio
along with this change. It's a leftover from quiet some time ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (not really sure if there's anything to be tested, let me know if so).
Thanks :) |
Motivation for this change
This is to ensure QT_QPA_PLATFORM_PLUGIN_PATH is set on Darwin.
Fixes #96984
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)