Account for all `with*` options causing their respective unit files to
not be built, just like the current code `withCryptsetup` already does.
This fixes build errors like the following:
```
missing /nix/store/5fafsfms64fn3ywv274ky7arhm9yq2if-systemd-250.4/example/systemd/system/systemd-importd.service
error: builder for '/nix/store/67rdli5q5akzwmqgf8q0a1yp76jgr0px-system-units.drv' failed with exit code 1
```
Found by using a customised systemd package as follows:
```
systemd.package = pkgs.systemd-small;
nixpkgs.config.packageOverrides = pkgs: {
"systemd-small" = pkgs.systemd.override {
withImportd = false;
withMachined = false;
...
};
};
```
Without the change build fails on upstream gcc-10 as:
ld: modmap.o:/build/source/src/directvnc.h:45: multiple definition of
`buffer'; main.o:/build/source/src/directvnc.h:45: first defined here
Without the change the build fails on -fno-common toolchains like gcc-10 as:
$ nix build --impure --expr 'with import ./. {}; g15daemon.override { stdenv = clang13Stdenv; }'
ld: g15daemon.h:218: multiple definition of `lcdlist_mutex'; utility_funcs.o:g15daemon.h:218: first defined here
ld: g15daemon.h:203: multiple definition of `lcdnode_s'; utility_funcs.o:g15daemon.h:203: first defined here
This update is supposed to give us support for the 5.17 kernel according to the
2.7.0 release notes here: https://github.com/amzn/amzn-drivers/releases/tag/ena_linux_2.7.0
Unfortunately, in practice, it does not build with `linuxPackages_5_17`,
so I left that marked as broken.
It does work for 5.15 though, so we can use that, woo!
Without the change build fails on toolchains like clang-13 which
switch to -fno-common by default:
$ nix build -L --impure --expr 'with import ./. {}; read-edid.override { stdenv = clang13Stdenv; }'
...
read-edid> ld: CMakeFiles/get-edid.dir/classic.c.o:(.bss+0x0):
multiple definition of `quiet'; CMakeFiles/get-edid.dir/get-edid.c.o:(.bss+0x0): first defined here
read-edid> ld: CMakeFiles/get-edid.dir/i2c.c.o:(.bss+0x0):
multiple definition of `quiet'; CMakeFiles/get-edid.dir/get-edid.c.o:(.bss+0x0): first defined here