From 9692e965c64ab57aabb90285028e3e2e73430f9f Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 4 Mar 2023 11:10:37 +0300 Subject: [PATCH] virtualbox: 6.1.40 -> 7.0.6 - bump versions - add new dependencies - lrelease is an unconditional dependency now - more Qt path hackery - remove rdesktop-vrdp (removed upstream) --- .../virtualization/virtualbox/default.nix | 16 ++++++++++------ .../virtualization/virtualbox/extpack.nix | 2 +- .../virtualbox/guest-additions/default.nix | 2 +- ...x11extras.patch => qt-dependency-paths.patch} | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) rename pkgs/applications/virtualization/virtualbox/{qtx11extras.patch => qt-dependency-paths.patch} (78%) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index d65f101b3774..fc3303baf339 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -3,6 +3,7 @@ , libpng, glib, lvm2, libXrandr, libXinerama, libopus, qtbase, qtx11extras , qttools, qtsvg, qtwayland, pkg-config, which, docbook_xsl, docbook_xml_dtd_43 , alsa-lib, curl, libvpx, nettools, dbus, substituteAll, gsoap, zlib +, yasm, glslang # If open-watcom-bin is not passed, VirtualBox will fall back to use # the shipped alternative sources (assembly). , open-watcom-bin @@ -23,19 +24,19 @@ let buildType = "release"; # Use maintainers/scripts/update.nix to update the version and all related hashes or # change the hashes in extpack.nix and guest-additions/default.nix as well manually. - version = "6.1.40"; + version = "7.0.6"; in stdenv.mkDerivation { pname = "virtualbox"; inherit version; src = fetchurl { url = "https://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"; - sha256 = "bc857555d3e836ad9350a8f7b03bb54d2fdc04dddb2043d09813f4634bca4814"; + sha256 = "f146d9a86a35af0abb010e628636fd800cb476cc2ce82f95b0c0ca876e1756ff"; }; outputs = [ "out" "modsrc" ]; - nativeBuildInputs = [ pkg-config which docbook_xsl docbook_xml_dtd_43 ] + nativeBuildInputs = [ pkg-config which docbook_xsl docbook_xml_dtd_43 yasm glslang ] ++ optional (!headless) wrapQtAppsHook; # Wrap manually because we wrap just a small number of executables. @@ -94,7 +95,7 @@ in stdenv.mkDerivation { qtPluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtsvg.bin}/${qtbase.qtPluginPrefix}:${qtwayland.bin}/${qtbase.qtPluginPrefix}"; }) ++ [ - ./qtx11extras.patch + ./qt-dependency-paths.patch # https://github.com/NixOS/nixpkgs/issues/123851 ./fix-audio-driver-loading.patch ]; @@ -130,14 +131,17 @@ in stdenv.mkDerivation { VBOX_JAVA_HOME := ${jdk} ''} ${optionalString (!headless) '' + VBOX_WITH_VBOXSDL := 1 PATH_QT5_X11_EXTRAS_LIB := ${getLib qtx11extras}/lib PATH_QT5_X11_EXTRAS_INC := ${getDev qtx11extras}/include - TOOL_QT5_LRC := ${getDev qttools}/bin/lrelease + PATH_QT5_TOOLS_LIB := ${getLib qttools}/lib + PATH_QT5_TOOLS_INC := ${getDev qttools}/include ''} ${optionalString enableWebService '' # fix gsoap missing zlib include and produce errors with --as-needed VBOX_GSOAP_CXX_LIBS := gsoapssl++ z ''} + TOOL_QT5_LRC := ${getDev qttools}/bin/lrelease LOCAL_CONFIG ./configure \ @@ -174,7 +178,7 @@ in stdenv.mkDerivation { -name src -o -exec cp -avt "$libexec" {} + mkdir -p $out/bin - for file in ${optionalString (!headless) "VirtualBox VBoxSDL rdesktop-vrdp"} ${optionalString enableWebService "vboxwebsrv"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do + for file in ${optionalString (!headless) "VirtualBox VBoxSDL"} ${optionalString enableWebService "vboxwebsrv"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do echo "Linking $file to /bin" test -x "$libexec/$file" ln -s "$libexec/$file" $out/bin/$file diff --git a/pkgs/applications/virtualization/virtualbox/extpack.nix b/pkgs/applications/virtualization/virtualbox/extpack.nix index 7092ffb33dee..7e27e79d5dd7 100644 --- a/pkgs/applications/virtualization/virtualbox/extpack.nix +++ b/pkgs/applications/virtualization/virtualbox/extpack.nix @@ -12,7 +12,7 @@ fetchurl rec { # Manually sha256sum the extensionPack file, must be hex! # Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`. # Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS - let value = "29cf8410e2514ea4393f63f5e955b8311787873679fc23ae9a897fb70ef3f84a"; + let value = "292961aa8723b54f96f89f6d8abf7d8e29259d94b7de831dbffb9ae15d346434"; in assert (builtins.stringLength value) == 64; value; meta = { diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 1ff7f0abebaa..0601aa3e44a2 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -23,7 +23,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso"; - sha256 = "d456c559926f1a8fdd7259056e0a50f12339fd494122cf30db7736e2032970c6"; + sha256 = "21e0f407d2a4f5c286084a70718aa20235ea75969eca0cab6cfab43a3499a010"; }; KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; diff --git a/pkgs/applications/virtualization/virtualbox/qtx11extras.patch b/pkgs/applications/virtualization/virtualbox/qt-dependency-paths.patch similarity index 78% rename from pkgs/applications/virtualization/virtualbox/qtx11extras.patch rename to pkgs/applications/virtualization/virtualbox/qt-dependency-paths.patch index a3aa98b081d1..ae5493a327d6 100644 --- a/pkgs/applications/virtualization/virtualbox/qtx11extras.patch +++ b/pkgs/applications/virtualization/virtualbox/qt-dependency-paths.patch @@ -7,10 +7,10 @@ index 71b96a3..73391f0 100644 endif else - $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT5_LIB)/lib$(qt_prefix)Qt5$(module)$(qt_infix)$(SUFF_DLL)) ) -+ $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(if $(filter X11Extras,$(module)),$(PATH_QT5_X11_EXTRAS_LIB),$(PATH_SDK_QT5_LIB))/lib$(qt_prefix)Qt5$(module)$(qt_infix)$(SUFF_DLL)) ) ++ $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(if $(filter Help,$(module)),$(PATH_QT5_TOOLS_LIB),$(if $(filter X11Extras,$(module)),$(PATH_QT5_X11_EXTRAS_LIB),$(PATH_SDK_QT5_LIB)))/lib$(qt_prefix)Qt5$(module)$(qt_infix)$(SUFF_DLL)) ) endif - $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT5_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT5_INC) ) -+ $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT5_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT5_INC) $(PATH_QT5_X11_EXTRAS_INC)/QtX11Extras ) ++ $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT5_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT5_INC) $(PATH_QT5_X11_EXTRAS_INC)/QtX11Extras $(PATH_QT5_TOOLS_INC)) endif $(eval $(target)_DEFS += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )