With 5.19 kernels now being EoL and my laptop demanding at least 5.17 to
function, I want to get ahead of the curve and add support for 6.0
kernels. The 2.1.6 tag was cut so late that it support 6.0 but isn’t as
well tested according to the conversations I read. There aren’t many
commits in the `2.1.7-staging` at this point, but this will help keep my
system afloat until the real `2.1.7` release. I’ve booted my laptop into
this and everything appears to be functioning normally.
Using `with` in such a high up scope makes it very easy to
accidentally forget to update function arguments and introduce typos
because of the lack of any editor support and static analysis.
It's better to explicitly inherit the small number of things we need
from `lib` into scope so that editors can know of scoped variables.
Fix the following error when running `nix run .#zfs`:
error: unable to execute '/nix/store/ns6rifm17r0lp17w8gb4qr5db4cwbkj9-zfs-user-2.1.1/bin/zfs-user': No such file or directory
We cannot have trace output if the package is marked broken, because
ofborg will consider the evaluation failed if there is any output. Hence
if there is any unsupported kernel version in nixpkgs, the trace will
show up and ofborg will complain.
In https://github.com/openzfs/zfs/commit/658fb802 OpenZFS introduced a
new compatibility feature. This is accompanied by some default profiles
which are located in the $out output of the Nix derivation. However,
these compatibility profiles are used by both the zpool executable
located in $out and the libzfs library located in $lib. This
inadvertently creates a cycle, because zpool refers to $lib to link
against libzfs but libzfs refers back to $out for the compatibility
profiles.
There are two possible routes to rectify this problem:
1. Patch the zpool source code to not read the compatibility profiles
and adjust the build system to put them into the $lib output.
2. Simply remove the $out/$lib split.
Since no other derivation in nixpkgs refers to the $lib output
explicitly we opt for the latter, because this is also in accordance
with upstream.