From 9e2b80d4de1dcd0aae81df33216666e1dc9e5cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Sun, 2 Jun 2024 18:42:02 -0400 Subject: [PATCH 1/2] quickemu: format with nixfmt-rfc-style --- pkgs/by-name/qu/quickemu/package.nix | 71 +++++++++++++++------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/pkgs/by-name/qu/quickemu/package.nix b/pkgs/by-name/qu/quickemu/package.nix index 9280eaa99007..664da83ba62b 100644 --- a/pkgs/by-name/qu/quickemu/package.nix +++ b/pkgs/by-name/qu/quickemu/package.nix @@ -1,32 +1,33 @@ -{ lib -, fetchFromGitHub -, stdenv -, makeWrapper -, cdrtools -, curl -, gawk -, gnugrep -, gnused -, jq -, ncurses -, pciutils -, procps -, python3 -, qemu -, socat -, spice-gtk -, swtpm -, usbutils -, util-linux -, unzip -, xdg-user-dirs -, xrandr -, zsync -, OVMF -, OVMFFull -, quickemu -, testers -, installShellFiles +{ + lib, + fetchFromGitHub, + stdenv, + makeWrapper, + cdrtools, + curl, + gawk, + gnugrep, + gnused, + jq, + ncurses, + pciutils, + procps, + python3, + qemu, + socat, + spice-gtk, + swtpm, + usbutils, + util-linux, + unzip, + xdg-user-dirs, + xrandr, + zsync, + OVMF, + OVMFFull, + quickemu, + testers, + installShellFiles, }: let runtimePaths = [ @@ -52,7 +53,7 @@ let ]; in -stdenv.mkDerivation (finalAttrs : { +stdenv.mkDerivation (finalAttrs: { pname = "quickemu"; version = "4.9.4"; @@ -72,7 +73,10 @@ stdenv.mkDerivation (finalAttrs : { quickemu ''; - nativeBuildInputs = [ makeWrapper installShellFiles ]; + nativeBuildInputs = [ + makeWrapper + installShellFiles + ]; installPhase = '' runHook preInstall @@ -98,6 +102,9 @@ stdenv.mkDerivation (finalAttrs : { homepage = "https://github.com/quickemu-project/quickemu"; mainProgram = "quickemu"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ fedx-sudo flexiondotorg ]; + maintainers = with lib.maintainers; [ + fedx-sudo + flexiondotorg + ]; }; }) From 1fe0639a8bf30c22f2ca2e33a77576e4055b5231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Sun, 2 Jun 2024 18:45:43 -0400 Subject: [PATCH 2/2] quickemu: decrease windows ram requirements --- pkgs/by-name/qu/quickemu/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/qu/quickemu/package.nix b/pkgs/by-name/qu/quickemu/package.nix index 664da83ba62b..b650ef91f88e 100644 --- a/pkgs/by-name/qu/quickemu/package.nix +++ b/pkgs/by-name/qu/quickemu/package.nix @@ -28,6 +28,7 @@ quickemu, testers, installShellFiles, + fetchpatch2, }: let runtimePaths = [ @@ -73,6 +74,16 @@ stdenv.mkDerivation (finalAttrs: { quickemu ''; + patches = [ + # reduces windows vm ram requirements to 4G, to match microsoft recommendations + # TODO: remove on next release + (fetchpatch2 { + name = "decrease-windows-ram-requirements.patch"; + url = "https://github.com/quickemu-project/quickemu/commit/f51697593a4650c5486661292e2febe1d16f8c71.patch"; + hash = "sha256-J5hIvQGtkufOcjk2FZN65iox/W2zkLlg+Veg9TF11Fs="; + }) + ]; + nativeBuildInputs = [ makeWrapper installShellFiles