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