git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #89328 from flokli/qemu-wrap

qemu: wrap GTK binaries

commitaad06c8ff537210c222a9465f5a75242e7e34d99 authorFlorian Klink <flokli@flokli.de> dateWed 3 Jun 2020, 22:29 (6 years ago) parentb084cf2c7eb16c
1 file changed+10−4
pkgs/applications/virtualization/qemu/default.nix+10−4
pkgs/applications/virtualization/qemu/default.nix+10−4
@@ -8,7 +8,7 @@
88, seccompSupport ? stdenv.isLinux, libseccomp
99, pulseSupport ? !stdenv.isDarwin, libpulseaudio
1010, sdlSupport ? !stdenv.isDarwin, SDL2
11−, gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, vte
11+, gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, vte, wrapGAppsHook
1212, vncSupport ? true, libjpeg, libpng
1313, smartcardSupport ? true, libcacard
1414, spiceSupport ? !stdenv.isDarwin, spice, spice-protocol
@@ -46,7 +46,8 @@ stdenv.mkDerivation rec {
4646 sha256 = "1gczv8hn3wqci86css3mhzrppp3z8vppxw25l08j589k6bvz7x1w";
4747 };
4848
49− nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ];
49+ nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ]
50+ ++ optionals gtkSupport [ wrapGAppsHook ];
5051 buildInputs =
5152 [ zlib glib ncurses perl pixman
5253 vde2 texinfo makeWrapper lzo snappy
@@ -165,12 +166,17 @@ stdenv.mkDerivation rec {
165166 ++ optional smbdSupport "--smbd=${samba}/bin/smbd";
166167
167168 doCheck = false; # tries to access /dev
169+ dontWrapGApps = true;
168170
169− postFixup =
170− ''
171+ postFixup = ''
171172 # copy qemu-ga (guest agent) to separate output
172173 mkdir -p $ga/bin
173174 cp $out/bin/qemu-ga $ga/bin/
175+ '' + optionalString gtkSupport ''
176+ # wrap GTK Binaries
177+ for f in $out/bin/qemu-system-*; do
178+ wrapGApp $f
179+ done
174180 '';
175181
176182 # Add a ‘qemu-kvm’ wrapper for compatibility/convenience.