2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, python3
|
|
|
|
, zlib
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, perl
|
|
|
|
, texinfo
|
|
|
|
, libuuid
|
|
|
|
, flex
|
|
|
|
, bison
|
|
|
|
, pixman
|
|
|
|
, meson
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-07-15 17:15:38 +00:00
|
|
|
qemuName = "qemu-5.2.50";
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "aflplusplus-${qemuName}";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AFLplusplus";
|
|
|
|
repo = "qemuafl";
|
|
|
|
rev = "0569eff8a12dec73642b96757f6b5b51a618a03a";
|
|
|
|
sha256 = "sha256-nYWHyRfOH2p9znRxjxsiyw11uZuMBiuJfEc7FHM5X7M=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
python3
|
|
|
|
perl
|
|
|
|
pkg-config
|
|
|
|
flex
|
|
|
|
bison
|
|
|
|
meson
|
|
|
|
texinfo
|
|
|
|
ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
zlib
|
|
|
|
glib
|
|
|
|
pixman
|
|
|
|
libuuid
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
dontUseMesonConfigure = true; # meson's configurePhase isn't compatible with qemu build
|
|
|
|
preBuild = "cd build";
|
|
|
|
preConfigure = ''
|
|
|
|
# this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang
|
|
|
|
chmod +x ./scripts/shaderinclude.pl
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags =
|
2023-07-15 17:15:38 +00:00
|
|
|
[
|
|
|
|
"--target-list=${stdenv.hostPlatform.uname.processor}-linux-user"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--meson=meson"
|
|
|
|
"--disable-system"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--enable-linux-user"
|
2023-07-15 17:15:38 +00:00
|
|
|
"--enable-pie"
|
|
|
|
"--audio-drv-list="
|
|
|
|
"--disable-blobs"
|
|
|
|
"--disable-bochs"
|
|
|
|
"--disable-brlapi"
|
|
|
|
"--disable-bsd-user"
|
|
|
|
"--disable-bzip2"
|
|
|
|
"--disable-cap-ng"
|
|
|
|
"--disable-cloop"
|
|
|
|
"--disable-curl"
|
|
|
|
"--disable-curses"
|
|
|
|
"--disable-dmg"
|
|
|
|
"--disable-fdt"
|
|
|
|
"--disable-gcrypt"
|
|
|
|
"--disable-glusterfs"
|
|
|
|
"--disable-gnutls"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--disable-gtk"
|
2023-07-15 17:15:38 +00:00
|
|
|
"--disable-guest-agent"
|
|
|
|
"--disable-iconv"
|
|
|
|
"--disable-libiscsi"
|
|
|
|
"--disable-libnfs"
|
|
|
|
"--disable-libssh"
|
|
|
|
"--disable-libusb"
|
|
|
|
"--disable-linux-aio"
|
|
|
|
"--disable-live-block-migration"
|
|
|
|
"--disable-lzo"
|
|
|
|
"--disable-nettle"
|
|
|
|
"--disable-numa"
|
|
|
|
"--disable-opengl"
|
|
|
|
"--disable-parallels"
|
|
|
|
"--disable-plugins"
|
|
|
|
"--disable-qcow1"
|
|
|
|
"--disable-qed"
|
|
|
|
"--disable-rbd"
|
|
|
|
"--disable-rdma"
|
|
|
|
"--disable-replication"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--disable-sdl"
|
2023-07-15 17:15:38 +00:00
|
|
|
"--disable-seccomp"
|
|
|
|
"--disable-sheepdog"
|
|
|
|
"--disable-smartcard"
|
|
|
|
"--disable-snappy"
|
|
|
|
"--disable-spice"
|
|
|
|
"--disable-system"
|
|
|
|
"--disable-tools"
|
|
|
|
"--disable-tpm"
|
|
|
|
"--disable-usb-redir"
|
|
|
|
"--disable-vde"
|
|
|
|
"--disable-vdi"
|
|
|
|
"--disable-vhost-crypto"
|
|
|
|
"--disable-vhost-kernel"
|
|
|
|
"--disable-vhost-net"
|
|
|
|
"--disable-vhost-scsi"
|
|
|
|
"--disable-vhost-user"
|
|
|
|
"--disable-vhost-vdpa"
|
|
|
|
"--disable-vhost-vsock"
|
|
|
|
"--disable-virglrenderer"
|
|
|
|
"--disable-virtfs"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--disable-vnc"
|
2023-07-15 17:15:38 +00:00
|
|
|
"--disable-vnc-jpeg"
|
|
|
|
"--disable-vnc-png"
|
|
|
|
"--disable-vnc-sasl"
|
|
|
|
"--disable-vte"
|
|
|
|
"--disable-vvfat"
|
|
|
|
"--disable-xen"
|
|
|
|
"--disable-xen-pci-passthrough"
|
|
|
|
"--disable-xfsctl"
|
|
|
|
"--without-default-devices"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/AFLplusplus/qemuafl";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fork of QEMU with AFL++ instrumentation support";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|