mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
qemu: wrap GTK binaries
Applications using a different GTK version than the user session don't work well, and people often run NixOS VM tests on different channels. Wrapping these GTK binaries is a common way to fix this. Fixes #69158
This commit is contained in:
parent
89fda74df5
commit
c7eb16cec3
@ -8,7 +8,7 @@
|
||||
, seccompSupport ? stdenv.isLinux, libseccomp
|
||||
, pulseSupport ? !stdenv.isDarwin, libpulseaudio
|
||||
, sdlSupport ? !stdenv.isDarwin, SDL2
|
||||
, gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, vte
|
||||
, gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, vte, wrapGAppsHook
|
||||
, vncSupport ? true, libjpeg, libpng
|
||||
, smartcardSupport ? true, libcacard
|
||||
, spiceSupport ? !stdenv.isDarwin, spice, spice-protocol
|
||||
@ -46,7 +46,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1gczv8hn3wqci86css3mhzrppp3z8vppxw25l08j589k6bvz7x1w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ];
|
||||
nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ]
|
||||
++ optionals gtkSupport [ wrapGAppsHook ];
|
||||
buildInputs =
|
||||
[ zlib glib ncurses perl pixman
|
||||
vde2 texinfo makeWrapper lzo snappy
|
||||
@ -165,12 +166,17 @@ stdenv.mkDerivation rec {
|
||||
++ optional smbdSupport "--smbd=${samba}/bin/smbd";
|
||||
|
||||
doCheck = false; # tries to access /dev
|
||||
dontWrapGApps = true;
|
||||
|
||||
postFixup =
|
||||
''
|
||||
postFixup = ''
|
||||
# copy qemu-ga (guest agent) to separate output
|
||||
mkdir -p $ga/bin
|
||||
cp $out/bin/qemu-ga $ga/bin/
|
||||
'' + optionalString gtkSupport ''
|
||||
# wrap GTK Binaries
|
||||
for f in $out/bin/qemu-system-*; do
|
||||
wrapGApp $f
|
||||
done
|
||||
'';
|
||||
|
||||
# Add a ‘qemu-kvm’ wrapper for compatibility/convenience.
|
||||
|
Loading…
Reference in New Issue
Block a user