blob: 5134cb7a8f6faecc450a46b72d86dfc2d5cff77c [file] [log] [blame]
Tim Windelschmidt98000a52025-03-06 14:22:15 +01001{ pkgs }: with pkgs;
2
3let
4 qemuMinimal = qemu_kvm.override (old: {
5 hostCpuOnly = true;
6 vncSupport = true;
7
8 # Disable everything we don't need.
9 enableDocs = false;
10 ncursesSupport = false;
11 seccompSupport = false;
12 numaSupport = false;
13 alsaSupport = false;
14 pulseSupport = false;
15 pipewireSupport = false;
16 sdlSupport = false;
17 jackSupport = false;
18 gtkSupport = false;
19 smartcardSupport = false;
20 spiceSupport = false;
21 usbredirSupport = false;
22 xenSupport = false;
23 cephSupport = false;
24 glusterfsSupport = false;
25 openGLSupport = false;
26 rutabagaSupport = false;
27 virglSupport = false;
28 libiscsiSupport = false;
29 smbdSupport = false;
30 uringSupport = false;
31 canokeySupport = false;
32 capstoneSupport = false;
33 });
34in
35qemuMinimal.overrideAttrs (old: {
36 # Static build patch
37 # Based on https://github.com/NixOS/nixpkgs/pull/333923
38
39 patches = (old.patches ++ [
40 ./static_build_crc32c_duplicate_definition.patch
41 ]);
42
43 configureFlags = (builtins.filter (v: v != "--static") old.configureFlags) ++ [ "--disable-libcbor" ];
44 strictDeps = true;
45 # a private dependency of PAM which is not linked explicitly in static builds
46 buildInputs = old.buildInputs ++ [ pkgs.audit ];
47 env.NIX_LDFLAGS = " -laudit ";
48})