Skip to content

Commit

Permalink
quickemu: 4.0 -> 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
linsui committed Sep 22, 2022
1 parent 7c37d78 commit 584a111
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 48 deletions.
31 changes: 20 additions & 11 deletions pkgs/development/quickemu/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,41 @@
, makeWrapper
, qemu
, gnugrep
, gnused
, lsb-release
, jq
, procps
, python3
, cdrtools
, usbutils
, util-linux
, socat
, spice-gtk
, swtpm
, unzip
, wget
, xdg-user-dirs
, xrandr
, zsync
, OVMF
, OVMFFull
, quickemu
, testers
}:
let
runtimePaths = [
qemu
gnugrep
gnused
jq
lsb-release
procps
python3
cdrtools
usbutils
util-linux
unzip
socat
spice-gtk
swtpm
wget
Expand All @@ -43,31 +50,33 @@ in

stdenv.mkDerivation rec {
pname = "quickemu";
version = "4.0";
version = "4.3";

src = fetchFromGitHub {
owner = "quickemu-project";
repo = "quickemu";
rev = version;
sha256 = "sha256-CiCQg1UsSAwlEnZEmzU2ynn2RZ+wXPv9FV1b9GVkc00=";
hash = "sha256-+ksv1DBNby3bJx2ylnDkqlQfsFIDRS/hZvsJn2+bcz8=";
};

patches = [
./input_overrides.patch
];
postPatch = ''
sed -i \
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.fd}/FV/OVMF_CODE.fd","${OVMFFull.fd}/FV/OVMF_VARS.fd" |' \
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.fd}/FV/OVMF_CODE.fd","${OVMF.fd}/FV/OVMF_VARS.fd" |' \
-e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
-e 's/Icon=.*qemu.svg/Icon=qemu/' \
quickemu
'';

nativeBuildInputs = [ makeWrapper ];

installPhase = ''
runHook preInstall
install -Dm755 -t "$out/bin" quickemu quickget macrecovery
install -Dm755 -t "$out/bin" macrecovery quickemu quickget windowskey
for f in quickget macrecovery quickemu; do
wrapProgram $out/bin/$f \
--prefix PATH : "${lib.makeBinPath runtimePaths}" \
--set ENV_EFI_CODE "${OVMF.fd}/FV/OVMF_CODE.fd" \
--set ENV_EFI_VARS "${OVMF.fd}/FV/OVMF_VARS.fd"
for f in macrecovery quickget quickemu windowskey; do
wrapProgram $out/bin/$f --prefix PATH : "${lib.makeBinPath runtimePaths}"
done
runHook postInstall
Expand Down
37 changes: 0 additions & 37 deletions pkgs/development/quickemu/input_overrides.patch

This file was deleted.

0 comments on commit 584a111

Please sign in to comment.