2021-10-19 00:53:44 +02:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, makeWrapper
|
|
|
|
, qemu
|
|
|
|
, gnugrep
|
|
|
|
, lsb-release
|
|
|
|
, jq
|
|
|
|
, procps
|
|
|
|
, python3
|
|
|
|
, cdrtools
|
|
|
|
, usbutils
|
|
|
|
, util-linux
|
2022-05-02 21:47:10 +02:00
|
|
|
, spice-gtk
|
2021-10-19 00:53:44 +02:00
|
|
|
, swtpm
|
|
|
|
, wget
|
|
|
|
, xdg-user-dirs
|
|
|
|
, xrandr
|
|
|
|
, zsync
|
2021-12-07 12:49:40 +01:00
|
|
|
, OVMF
|
|
|
|
, quickemu
|
2022-04-20 16:40:48 +02:00
|
|
|
, testers
|
2021-10-19 00:53:44 +02:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
runtimePaths = [
|
|
|
|
qemu
|
|
|
|
gnugrep
|
|
|
|
jq
|
|
|
|
lsb-release
|
|
|
|
procps
|
|
|
|
python3
|
|
|
|
cdrtools
|
|
|
|
usbutils
|
|
|
|
util-linux
|
2022-05-02 21:47:10 +02:00
|
|
|
spice-gtk
|
2021-10-19 00:53:44 +02:00
|
|
|
swtpm
|
|
|
|
wget
|
|
|
|
xdg-user-dirs
|
|
|
|
xrandr
|
|
|
|
zsync
|
|
|
|
];
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "quickemu";
|
2022-04-26 00:21:15 +02:00
|
|
|
version = "3.15";
|
2021-10-19 00:53:44 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-12-07 12:49:40 +01:00
|
|
|
owner = "quickemu-project";
|
|
|
|
repo = "quickemu";
|
2021-10-19 00:53:44 +02:00
|
|
|
rev = version;
|
2022-04-26 00:21:15 +02:00
|
|
|
sha256="sha256-ako/eh8cMWKvdrgm9VTgSH67nA2igKUlJZtBeH1bu4Y=";
|
2021-10-19 00:53:44 +02:00
|
|
|
};
|
|
|
|
|
2021-12-07 12:49:40 +01:00
|
|
|
patches = [
|
|
|
|
./input_overrides.patch
|
|
|
|
];
|
|
|
|
|
2021-10-19 00:53:44 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 -t "$out/bin" quickemu quickget macrecovery
|
|
|
|
|
2021-12-07 12:49:40 +01:00
|
|
|
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"
|
|
|
|
done
|
2021-10-19 00:53:44 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-04-20 16:40:48 +02:00
|
|
|
passthru.tests = testers.testVersion { package = quickemu; };
|
2021-12-07 12:49:40 +01:00
|
|
|
|
2021-10-19 00:53:44 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Quickly create and run optimised Windows, macOS and Linux desktop virtual machines";
|
2021-12-07 12:49:40 +01:00
|
|
|
homepage = "https://github.com/quickemu-project/quickemu";
|
2021-10-19 00:53:44 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fedx-sudo ];
|
|
|
|
};
|
|
|
|
}
|