Our `standard-*` packages are set up to be null on the Python versions
that still include the corresponding module in the standard library.
However, since mobi depends on standard-imghdr unconditionally, using
the package on versions of Python that still have imghdr in the standard
library fails to build due to the following sequence of steps:
1. Something calls `python312Packages.mobi`.
2. `standard-imghdr` in the dependencies resolves to `null`, since
`imghdr` is still in the standard library on Python 3.12 and we have
the `standard-imghdr` package set to be null on versions of Python
where `imghdr` is in the standard library.
3. `pythonRuntimeDepsCheck` runs.
4. `pythonRuntimeDepsCheck` sees `Requires-Dist: standard-imghdr` in
mobi's distinfo metadata and checks whether the package is installed.
5. It is not, so the runtime deps check fails the build.
We solve this issue by removing `standard-imghdr` from the list of
dependencies on versions of Python where the package is set to `null`
(those versions that have `imghdr` in the standard library). The package
continues to work because it will transparently import the standard
library version of `imghdr`.
Reverts #481473, fixes#509254
Turns out this breaks scripted networking with systemd stage 1. Even
if we assumed that systemd stage 1 wasn't now the default, I still
think that makes this worthy of a revert, in the absence of a fix. But
now that systemd stage 1 is the default, this is also a channel
blocker.
The problem is that wantedBy = [ "foo.device" ]; doesn't work as
hoped. If the device appears in stage 1, then the systemd device unit
becomes active in stage 1 without pulling in any dependency for
configuring it (because that only exists in stage 2). When we
transition to stage 2, systemd maintains its information about unit
state between stages and remembers that the device units were already
active. They do not become reactivated, and consequently their new
stage 2 dependencies do not get pulled in.
The fix is probably to do this with SYSTEMD_WANTS= in udev rules,
rather than with wantedBy. The udev rules will re-fire during stage 2,
though I'm not 100% clear on exactly which events that includes
(e.g. if we'll get new add events or if we need to look for a
different ACTION or anything like that). This is going to require some
experimentation and testing that I don't have time for today.
Given that this is addressing a channel blocker, I think this revert
should be merged if a fix can't be merged instead before the next
unstable-small eval. In either case, staging-nixos should be merged to
master right after.
The full `functionaltest` fails for various reasons.
We dont have to run all of it but we can try enabling some of it,
starting with the treesitter tests.
Right now removing the treesitter parsers trigger no error so it's easy
to either not see an error in their installation of a version mismatch.
Running the tests should help mitigate this shortcoming.