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
Fix virt-manager on non-gnome systems #64627
Conversation
@GrahamcOfBorg eval |
@@ -87,10 +87,13 @@ stdenv.mkDerivation rec { | |||
vala | |||
]; | |||
|
|||
propagatedBuildInputs = [ | |||
gst_all_1.gst-plugins-base |
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 don't see a reason why this needed to be propagated. Perchance explain?
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.
When SpiceGtkClient is loaded via GI it also needs GStreamer and cannot find it because needed paths are not in GI_TYPELIB_PATH
. I was able to see the cause only after patching virtManager/details/viewer.py
to show all exceptions.
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.
Isn't this only required if spice is enabled? I thin it ahould the same as here, at least applying that change worked for me:
] ++ optionals spiceSupport [ |
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.
Ahh nevermind, I can see that you patched spice-gtk directly, so should we remove these additional dependencies also in virt-viewer
?
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.
Yeah, gst-plugins-base
could be removed, though there's also gst-plugins-good
.
I'll add a commit after checking if it is needed.
Oh, thanks, missed that one. |
Can confirm that fixes the issue, thanks! |
I think we're preferring, in this case, to make the typelibs available within it by hardcoding them with |
I'm not sure if this is possible given GObject Introspection dynamic nature, any ideas how it should be done? |
I use
Thank you for this fix :) |
@@ -25,7 +26,7 @@ python3Packages.buildPythonApplication rec { | |||
|
|||
buildInputs = [ | |||
libvirt-glib vte dconf gtk-vnc gnome3.adwaita-icon-theme avahi | |||
gsettings-desktop-schemas libosinfo gtk3 | |||
gsettings-desktop-schemas libosinfo gtk3 gtksourceview4 librsvg |
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.
Do we really need librsvg
here?
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.
Actually yes, it would make more sense to remove it and move wrapGAppsHook
to buildInputs
as it already propagates librsvg
.
The problem is that virtmanager tries to update icon cache in the setup.py
.
I'm not sure how to pass a flag to disable this behavior to self.distribution
in the setup.py
.
I can move gtk3
to nativeBuildInputs
to make it work, but first want to try doing this via the setup.py
flag.
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.
All you need to do here is
setupPyBuildFlags = [
"--no-update-icon-cache"
];
We also should be able to drop the bit about compiling schemas below since that's done in setup.py
.
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.
Unfortunately that would not work as it passes flags to build_ext
while virtmanager's setup.py
checks self.distribution
.
I've managed to make it work via custom buildPhase
:
buildPhase = ''
runHook preBuild
cp ${setuppy} nix_run_setup
${python3Packages.python.pythonForBuild.interpreter} nix_run_setup --no-update-icon-cache build_ext bdist_wheel
runHook postBuild
'';
Maybe we need to add a new setupPyDistFlags
and modify build phases to include
... nix_run_setup ${(lib.concatStringsSep " " setupPyDistFlags)} ... build_ext ...
@FRidh What do you think about this? I can make a PR if it's an acceptable change. Would incur mass rebuild though.
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.
Sounds good to me @aske, I noticed that shortly after commenting this.
Note: there is no sound without gst-plugins-good.
Custom buildPhase should be removed once there is support for setupPyDistFlags (not a final name).
Schemas are now compiled in the setup.py.
I think this PR is ready for now. I've added a custom Also added Funnily enough while testing I forgot to add |
Looks good to me, thanks for all the effort @aske :) |
Yeah, I'll make a PR, though we have some time before it's merged into master from staging. |
Ok, yea i can see now it's for staging, fine then :) |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)