20 qemuName = "qemu-5.2.50";
23 name = "aflplusplus-${qemuName}";
25 src = fetchFromGitHub {
26 owner = "AFLplusplus";
28 # rev origin: https://github.com/AFLplusplus/AFLplusplus/blob/v4.21c/qemu_mode/QEMUAFL_VERSION
29 rev = "a6f0632a65e101e680dd72643a6128dd180dff72";
30 sha256 = "sha256-4kaQA5KDUqkK+fbjHg47lxZHRN8JrfSC2zdjrbMbDPo=";
31 fetchSubmodules = true;
52 enableParallelBuilding = true;
54 dontUseMesonConfigure = true; # meson's configurePhase isn't compatible with qemu build
55 preBuild = "cd build";
57 # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang
58 chmod +x ./scripts/shaderinclude.pl
63 "--target-list=${stdenv.hostPlatform.uname.processor}-linux-user"
65 "--localstatedir=/var"
86 "--disable-guest-agent"
93 "--disable-live-block-migration"
104 "--disable-replication"
108 "--disable-smartcard"
114 "--disable-usb-redir"
117 "--disable-vhost-crypto"
118 "--disable-vhost-kernel"
119 "--disable-vhost-net"
120 "--disable-vhost-scsi"
121 "--disable-vhost-user"
122 "--disable-vhost-vdpa"
123 "--disable-vhost-vsock"
124 "--disable-virglrenderer"
133 "--disable-xen-pci-passthrough"
135 "--without-default-devices"
139 homepage = "https://github.com/AFLplusplus/qemuafl";
140 description = "Fork of QEMU with AFL++ instrumentation support";
141 license = lib.licenses.gpl2Plus;
142 maintainers = with lib.maintainers; [ ris ];
143 platforms = lib.platforms.linux;