···
, alsa-lib, curl, libvpx, nettools, dbus, substituteAll, gsoap, zlib
# If open-watcom-bin is not passed, VirtualBox will fall back to use
# the shipped alternative sources (assembly).
8
-
, open-watcom-bin ? null
10
-
, javaBindings ? true, jdk ? null # Almost doesn't affect closure size
11
-
, pythonBindings ? false, python3 ? null
12
-
, extensionPack ? null, fakeroot ? null
13
-
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
10
+
, javaBindings ? true, jdk # Almost doesn't affect closure size
11
+
, pythonBindings ? false, python3
12
+
, extensionPack ? null, fakeroot
13
+
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
, enableHardening ? false
, enable32bitGuests ? true
···
# 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.
···
# Wrap manually because we wrap just a small number of executables.
46
-
[ acpica-tools dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL
47
-
libcap glib lvm2 alsa-lib curl libvpx pam makeself perl
48
-
libXmu libpng libopus python ]
45
+
acpica-tools dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL
46
+
libcap glib lvm2 alsa-lib curl libvpx pam makeself perl
47
+
libXmu libpng libopus python3 ]
++ optional javaBindings jdk
50
-
++ optional pythonBindings python # Python is needed even when not building bindings
49
+
++ optional pythonBindings python3 # Python is needed even when not building bindings
++ optional pulseSupport libpulseaudio
52
-
++ optionals (headless) [ libXrandr libGL ]
51
+
++ optionals headless [ libXrandr libGL ]
++ optionals (!headless) [ qtbase qtx11extras libXinerama SDL ]
54
-
++ optionals (enableWebService) [ gsoap zlib ];
53
+
++ optionals enableWebService [ gsoap zlib ];
hardeningDisable = [ "format" "fortify" "pic" "stackprotector" ];
sed -e 's@MKISOFS --version@MKISOFS -version@' \
61
-
-e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \
60
+
-e 's@PYTHONDIR=.*@PYTHONDIR=${lib.optionalString pythonBindings python3}@' \
-e 's@CXX_FLAGS="\(.*\)"@CXX_FLAGS="-std=c++11 \1"@' \
${optionalString (!headless) ''
-e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qtbase}/bin"@' \
···
PATH_QT5_X11_EXTRAS_INC := ${getDev qtx11extras}/include
TOOL_QT5_LRC := ${getDev qttools}/bin/lrelease
138
-
${optionalString (enableWebService) ''
137
+
${optionalString enableWebService ''
# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
···
${optionalString (!pulseSupport) "--disable-pulse"} \
${optionalString (!enableHardening) "--disable-hardening"} \
${optionalString (!enable32bitGuests) "--disable-vmmraw"} \
151
-
${optionalString (enableWebService) "--enable-webservice"} \
150
+
${optionalString enableWebService "--enable-webservice"} \
${optionalString (open-watcom-bin != null) "--with-ow-dir=${open-watcom-bin}"} \
sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${libIDL}/lib/pkgconfig:${glib.dev}/lib/pkgconfig ${libIDL}/bin/libIDL-config-2@' \
···
-name src -o -exec cp -avt "$libexec" {} +
178
-
for file in ${optionalString (!headless) "VirtualBox VBoxSDL rdesktop-vrdp"} ${optionalString (enableWebService) "vboxwebsrv"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do
177
+
for file in ${optionalString (!headless) "VirtualBox VBoxSDL rdesktop-vrdp"} ${optionalString enableWebService "vboxwebsrv"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do
echo "Linking $file to /bin"
ln -s "$libexec/$file" $out/bin/$file
···
${optionalString (extensionPack != null) ''
186
-
"${fakeroot}/bin/fakeroot" "${stdenv.shell}" <<EXTHELPER
185
+
"${fakeroot}/bin/fakeroot" "${stdenv.shell}" <<EOF
"$libexec/VBoxExtPackHelperApp" install \
--base-dir "$share/ExtensionPacks" \
--cert-dir "$share/ExtPackCertificates" \
--name "Oracle VM VirtualBox Extension Pack" \
--tarball "${extensionPack}" \
--sha-256 "${extensionPack.outputHash}"
${optionalString (!headless) ''