Update aider (#375634)
[NixPkgs.git] / pkgs / tools / security / aflplusplus / qemu.nix
blob950e4eb85cbaa40936784340e1e79d150ebdfff7
2   lib,
3   stdenv,
4   python3,
5   zlib,
6   pkg-config,
7   glib,
8   perl,
9   texinfo,
10   libuuid,
11   flex,
12   bison,
13   pixman,
14   meson,
15   fetchFromGitHub,
16   ninja,
19 let
20   qemuName = "qemu-5.2.50";
22 stdenv.mkDerivation {
23   name = "aflplusplus-${qemuName}";
25   src = fetchFromGitHub {
26     owner = "AFLplusplus";
27     repo = "qemuafl";
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;
32   };
34   nativeBuildInputs = [
35     python3
36     perl
37     pkg-config
38     flex
39     bison
40     meson
41     texinfo
42     ninja
43   ];
45   buildInputs = [
46     zlib
47     glib
48     pixman
49     libuuid
50   ];
52   enableParallelBuilding = true;
54   dontUseMesonConfigure = true; # meson's configurePhase isn't compatible with qemu build
55   preBuild = "cd build";
56   preConfigure = ''
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
59     patchShebangs .
60   '';
62   configureFlags = [
63     "--target-list=${stdenv.hostPlatform.uname.processor}-linux-user"
64     "--sysconfdir=/etc"
65     "--localstatedir=/var"
66     "--meson=meson"
67     "--disable-system"
68     "--enable-linux-user"
69     "--enable-pie"
70     "--audio-drv-list="
71     "--disable-blobs"
72     "--disable-bochs"
73     "--disable-brlapi"
74     "--disable-bsd-user"
75     "--disable-bzip2"
76     "--disable-cap-ng"
77     "--disable-cloop"
78     "--disable-curl"
79     "--disable-curses"
80     "--disable-dmg"
81     "--disable-fdt"
82     "--disable-gcrypt"
83     "--disable-glusterfs"
84     "--disable-gnutls"
85     "--disable-gtk"
86     "--disable-guest-agent"
87     "--disable-iconv"
88     "--disable-libiscsi"
89     "--disable-libnfs"
90     "--disable-libssh"
91     "--disable-libusb"
92     "--disable-linux-aio"
93     "--disable-live-block-migration"
94     "--disable-lzo"
95     "--disable-nettle"
96     "--disable-numa"
97     "--disable-opengl"
98     "--disable-parallels"
99     "--disable-plugins"
100     "--disable-qcow1"
101     "--disable-qed"
102     "--disable-rbd"
103     "--disable-rdma"
104     "--disable-replication"
105     "--disable-sdl"
106     "--disable-seccomp"
107     "--disable-sheepdog"
108     "--disable-smartcard"
109     "--disable-snappy"
110     "--disable-spice"
111     "--disable-system"
112     "--disable-tools"
113     "--disable-tpm"
114     "--disable-usb-redir"
115     "--disable-vde"
116     "--disable-vdi"
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"
125     "--disable-virtfs"
126     "--disable-vnc"
127     "--disable-vnc-jpeg"
128     "--disable-vnc-png"
129     "--disable-vnc-sasl"
130     "--disable-vte"
131     "--disable-vvfat"
132     "--disable-xen"
133     "--disable-xen-pci-passthrough"
134     "--disable-xfsctl"
135     "--without-default-devices"
136   ];
138   meta = {
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;
144   };