zfs: Remove top-level with
from expression
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.
This commit is contained in:
parent
9097ed78c0
commit
ac74ab0236
1 changed files with 6 additions and 5 deletions
|
@ -19,8 +19,9 @@
|
||||||
, linuxPackages_5_15 ? pkgs.linuxKernel.packages.linux_5_15
|
, linuxPackages_5_15 ? pkgs.linuxKernel.packages.linux_5_15
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) any optionalString optionals optional makeBinPath;
|
||||||
|
|
||||||
smartmon = smartmontools.override { inherit enableMail; };
|
smartmon = smartmontools.override { inherit enableMail; };
|
||||||
|
|
||||||
buildKernel = any (n: n == configFile) [ "kernel" "all" ];
|
buildKernel = any (n: n == configFile) [ "kernel" "all" ];
|
||||||
|
@ -113,7 +114,7 @@ let
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-config=${configFile}"
|
"--with-config=${configFile}"
|
||||||
"--with-tirpc=1"
|
"--with-tirpc=1"
|
||||||
(withFeatureAs (buildUser && enablePython) "python" python3.interpreter)
|
(lib.withFeatureAs (buildUser && enablePython) "python" python3.interpreter)
|
||||||
] ++ optionals buildUser [
|
] ++ optionals buildUser [
|
||||||
"--with-dracutdir=$(out)/lib/dracut"
|
"--with-dracutdir=$(out)/lib/dracut"
|
||||||
"--with-udevdir=$(out)/lib/udev"
|
"--with-udevdir=$(out)/lib/udev"
|
||||||
|
@ -200,9 +201,9 @@ let
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/openzfs/zfs";
|
homepage = "https://github.com/openzfs/zfs";
|
||||||
changelog = "https://github.com/openzfs/zfs/releases/tag/zfs-${version}";
|
changelog = "https://github.com/openzfs/zfs/releases/tag/zfs-${version}";
|
||||||
license = licenses.cddl;
|
license = lib.licenses.cddl;
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
maintainers = with maintainers; [ hmenke jcumming jonringer wizeman fpletz globin ];
|
maintainers = with lib.maintainers; [ hmenke jcumming jonringer wizeman fpletz globin ];
|
||||||
mainProgram = "zfs";
|
mainProgram = "zfs";
|
||||||
# If your Linux kernel version is not yet supported by zfs, try zfsUnstable.
|
# If your Linux kernel version is not yet supported by zfs, try zfsUnstable.
|
||||||
# On NixOS set the option boot.zfs.enableUnstable.
|
# On NixOS set the option boot.zfs.enableUnstable.
|
||||||
|
|
Loading…
Reference in a new issue