Merge pull request #66222 from worldofpeace/fix-virtualbox

virtualbox: use wrapQtAppsHook

authored by worldofpeace and committed by GitHub 9f82497e dd7de2d0

+19 -11
+18 -10
pkgs/applications/virtualization/virtualbox/default.nix
··· 1 - { config, stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2 2 - , libX11, xorgproto, libXext, libXcursor, libXmu, qt5, libIDL, SDL, libcap, libGL 3 - , libpng, glib, lvm2, libXrandr, libXinerama, libopus 4 - , pkgconfig, which, docbook_xsl, docbook_xml_dtd_43 5 , alsaLib, curl, libvpx, nettools, dbus 6 , makeself, perl 7 , javaBindings ? true, jdk ? null # Almost doesn't affect closure size ··· 33 34 outputs = [ "out" "modsrc" ]; 35 36 - nativeBuildInputs = [ pkgconfig which docbook_xsl docbook_xml_dtd_43 patchelfUnstable ]; 37 38 buildInputs = 39 [ iasl dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL ··· 43 ++ optional pythonBindings python # Python is needed even when not building bindings 44 ++ optional pulseSupport libpulseaudio 45 ++ optionals (headless) [ libXrandr libGL ] 46 - ++ optionals (!headless) [ qt5.qtbase qt5.qtx11extras libXinerama SDL ]; 47 48 hardeningDisable = [ "format" "fortify" "pic" "stackprotector" ]; 49 ··· 53 -e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \ 54 -e 's@CXX_FLAGS="\(.*\)"@CXX_FLAGS="-std=c++11 \1"@' \ 55 ${optionalString (!headless) '' 56 - -e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qt5.qtbase}/bin"@' \ 57 ''} -i configure 58 ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 59 ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 ··· 105 VBOX_JAVA_HOME := ${jdk} 106 ''} 107 ${optionalString (!headless) '' 108 - PATH_QT5_X11_EXTRAS_LIB := ${getLib qt5.qtx11extras}/lib 109 - PATH_QT5_X11_EXTRAS_INC := ${getDev qt5.qtx11extras}/include 110 - TOOL_QT5_LRC := ${getDev qt5.qttools}/bin/lrelease 111 ''} 112 LOCAL_CONFIG 113 ··· 175 ''} 176 177 cp -rv out/linux.*/${buildType}/bin/src "$modsrc" 178 ''; 179 180 passthru = {
··· 1 + { config, stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2, wrapQtAppsHook 2 + , libX11, xorgproto, libXext, libXcursor, libXmu, libIDL, SDL, libcap, libGL 3 + , libpng, glib, lvm2, libXrandr, libXinerama, libopus, qtbase, qtx11extras 4 + , qttools, pkgconfig, which, docbook_xsl, docbook_xml_dtd_43 5 , alsaLib, curl, libvpx, nettools, dbus 6 , makeself, perl 7 , javaBindings ? true, jdk ? null # Almost doesn't affect closure size ··· 33 34 outputs = [ "out" "modsrc" ]; 35 36 + nativeBuildInputs = [ pkgconfig which docbook_xsl docbook_xml_dtd_43 patchelfUnstable ] 37 + ++ optional (!headless) wrapQtAppsHook; 38 + 39 + # Wrap manually because we just need to wrap one executable 40 + dontWrapQtApps = true; 41 42 buildInputs = 43 [ iasl dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL ··· 47 ++ optional pythonBindings python # Python is needed even when not building bindings 48 ++ optional pulseSupport libpulseaudio 49 ++ optionals (headless) [ libXrandr libGL ] 50 + ++ optionals (!headless) [ qtbase qtx11extras libXinerama SDL ]; 51 52 hardeningDisable = [ "format" "fortify" "pic" "stackprotector" ]; 53 ··· 57 -e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \ 58 -e 's@CXX_FLAGS="\(.*\)"@CXX_FLAGS="-std=c++11 \1"@' \ 59 ${optionalString (!headless) '' 60 + -e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qtbase}/bin"@' \ 61 ''} -i configure 62 ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 63 ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 ··· 109 VBOX_JAVA_HOME := ${jdk} 110 ''} 111 ${optionalString (!headless) '' 112 + PATH_QT5_X11_EXTRAS_LIB := ${getLib qtx11extras}/lib 113 + PATH_QT5_X11_EXTRAS_INC := ${getDev qtx11extras}/include 114 + TOOL_QT5_LRC := ${getDev qttools}/bin/lrelease 115 ''} 116 LOCAL_CONFIG 117 ··· 179 ''} 180 181 cp -rv out/linux.*/${buildType}/bin/src "$modsrc" 182 + ''; 183 + 184 + preFixup = optionalString (!headless) '' 185 + wrapQtApp $out/bin/VirtualBox 186 ''; 187 188 passthru = {
+1 -1
pkgs/top-level/all-packages.nix
··· 20977 20978 virtscreen = callPackage ../tools/admin/virtscreen {}; 20979 20980 - virtualbox = callPackage ../applications/virtualization/virtualbox { 20981 stdenv = stdenv_32bit; 20982 inherit (gnome2) libIDL; 20983 };
··· 20977 20978 virtscreen = callPackage ../tools/admin/virtscreen {}; 20979 20980 + virtualbox = libsForQt5.callPackage ../applications/virtualization/virtualbox { 20981 stdenv = stdenv_32bit; 20982 inherit (gnome2) libIDL; 20983 };