Merge pull request #109029 from Atemu/zfs-meta.broken-instead-of-abort
zfs: use meta.broken instead of throw when incompatible with kernel
This commit is contained in:
commit
22ac0b9087
@ -27,14 +27,8 @@ let
|
||||
, rev ? "zfs-${version}"
|
||||
, isUnstable ? false
|
||||
, incompatibleKernelVersion ? null }:
|
||||
if buildKernel &&
|
||||
(incompatibleKernelVersion != null) &&
|
||||
versionAtLeast kernel.version incompatibleKernelVersion then
|
||||
throw ''
|
||||
Linux v${kernel.version} is not yet supported by zfsonlinux v${version}.
|
||||
${lib.optionalString (!isUnstable) "Try zfsUnstable or set the NixOS option boot.zfs.enableUnstable."}
|
||||
''
|
||||
else stdenv.mkDerivation {
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@ -174,6 +168,13 @@ let
|
||||
license = licenses.cddl;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ hmenke jcumming jonringer wizeman fpletz globin mic92 ];
|
||||
broken = if
|
||||
buildKernel && (incompatibleKernelVersion != null) && versionAtLeast kernel.version incompatibleKernelVersion
|
||||
then builtins.trace ''
|
||||
Linux v${kernel.version} is not yet supported by zfsonlinux v${version}.
|
||||
${lib.optionalString (!isUnstable) "Try zfsUnstable or set the NixOS option boot.zfs.enableUnstable."}
|
||||
'' true
|
||||
else false;
|
||||
};
|
||||
};
|
||||
in {
|
||||
|
Loading…
Reference in New Issue
Block a user