diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 776bb7553186..2f79a2b5dcb1 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch, python, zlib, pkg-config, glib , perl, pixman, vde2, alsaLib, texinfo, flex , bison, lzo, snappy, libaio, gnutls, nettle, curl, ninja, meson -, makeWrapper, autoPatchelfHook +, makeWrapper, autoPatchelfHook, runtimeShell , attr, libcap, libcap_ng , CoreServices, Cocoa, Hypervisor, rez, setfile , numaSupport ? stdenv.isLinux && !stdenv.isAarch32, numactl @@ -233,10 +233,13 @@ stdenv.mkDerivation rec { # Add a ‘qemu-kvm’ wrapper for compatibility/convenience. postInstall = '' + cp -- $emitKvmWarningsPath $out/libexec/emit-kvm-warnings + chmod a+x -- $out/libexec/emit-kvm-warnings if [ -x $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} ]; then makeWrapper $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} \ $out/bin/qemu-kvm \ - --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)" + --run $out/libexec/emit-kvm-warnings \ + --add-flags "\$([ -r /dev/kvm -a -w /dev/kvm ] && echo -enable-kvm)" fi ''; @@ -247,6 +250,26 @@ stdenv.mkDerivation rec { # Builds in ~3h with 2 cores, and ~20m with a big-parallel builder. requiredSystemFeatures = [ "big-parallel" ]; + emitKvmWarnings = '' + #!${runtimeShell} + WARNCOL='\033[1;35m' + NEUTRALCOL='\033[0m' + WARNING="''${WARNCOL}warning:''${NEUTRALCOL}" + if [ ! -e /dev/kvm ]; then + echo -e "''${WARNING} KVM is not available - execution will be slow" >&2 + echo "Consider installing KVM for hardware-accelerated execution." >&2 + echo "If KVM is already installed make sure the kernel module is loaded." >&2 + elif [ ! -r /dev/kvm -o ! -w /dev/kvm ]; then + echo -e "''${WARNING} /dev/kvm is not read-/writable - execution will be slow" >&2 + echo "/dev/kvm needs to be read-/writable by the user executing QEMU." >&2 + echo "" >&2 + echo "For hardware-acceleration inside the nix build sandbox /dev/kvm" >&2 + echo "must be world-read-/writable (rw-rw-rw-)." >&2 + fi + ''; + + passAsFile = [ "emitKvmWarnings" ]; + meta = with lib; { homepage = "http://www.qemu.org/"; description = "A generic and open source machine emulator and virtualizer"; diff --git a/pkgs/games/steam/runtime.nix b/pkgs/games/steam/runtime.nix index fc38c2eab99f..8f2398255a41 100644 --- a/pkgs/games/steam/runtime.nix +++ b/pkgs/games/steam/runtime.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "steam-runtime"; # from https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/VERSION.txt - version = "0.20210906.1"; + version = "0.20211102.0"; src = fetchurl { url = "https://repo.steampowered.com/steamrt-images-scout/snapshots/${version}/steam-runtime.tar.xz"; - sha256 = "1dkynar5y4q0pi32ihdhl7r81v9jxsb7lhc91mqhy43f6462qz1h"; + sha256 = "sha256-/ve4oVxKQ4uTaTiTg8Qc0Kyb4GRJKGZ5SQVLIyeJSpI="; name = "scout-runtime-${version}.tar.gz"; }; diff --git a/pkgs/servers/nextcloud/default.nix b/pkgs/servers/nextcloud/default.nix index 881a1a391c4e..dfe7c3e0bf37 100644 --- a/pkgs/servers/nextcloud/default.nix +++ b/pkgs/servers/nextcloud/default.nix @@ -60,8 +60,8 @@ in { }; nextcloud21 = generic { - version = "21.0.5"; - sha256 = "1q46h480kn97k7h3xm7r5gsa8l3f0kfiicapi46sh0p39pbjbyhv"; + version = "21.0.7"; + sha256 = "sha256-WZMhWW613q5c6grR/dzVSCKJKru7XPtRoxgBhi8VE7c="; }; nextcloud22 = generic { diff --git a/pkgs/tools/misc/yt-dlp/default.nix b/pkgs/tools/misc/yt-dlp/default.nix index 6a6a019dcbee..e694e1561365 100644 --- a/pkgs/tools/misc/yt-dlp/default.nix +++ b/pkgs/tools/misc/yt-dlp/default.nix @@ -20,12 +20,12 @@ buildPythonPackage rec { # The websites yt-dlp deals with are a very moving target. That means that # downloads break constantly. Because of that, updates should always be backported # to the latest stable release. - version = "2021.11.10.1"; + version = "2021.12.1"; src = fetchPypi { inherit pname; version = builtins.replaceStrings [ ".0" ] [ "." ] version; - sha256 = "f0ad6ae2e2838b608df2fd125f2a777a7ad832d3e757ee6d4583b84b21e44388"; + sha256 = "sha256-WNpbltSDT+gTDJYLnf1nDNLQ5TtlDNkuXEOBckFRuA8="; }; propagatedBuildInputs = [ websockets mutagen ]