lvm2: fix static compilation

This should avoid a infinity recursion issue during static compilation,
by making util-linux not a dependency of the `fix-blkdeactivate.patch`.

+7 -6
+7 -6
pkgs/os-specific/linux/lvm2/common.nix
··· 4 4 , fetchpatch 5 5 , fetchurl 6 6 , pkg-config 7 - , util-linux 8 7 , coreutils 9 8 , libuuid 10 9 , libaio 11 10 , substituteAll 12 11 , enableCmdlib ? false 13 12 , enableDmeventd ? false 14 - , udevSupport ? !stdenv.hostPlatform.isStatic, udev ? null 13 + , udevSupport ? !stdenv.hostPlatform.isStatic, udev 15 14 , onlyLib ? stdenv.hostPlatform.isStatic 16 - , enableVDO ? false, vdo ? null 17 - , enableMdadm ? false, mdadm ? null 18 - , enableMultipath ? false, multipath-tools ? null 15 + # Otherwise we have a infinity recursion during static compilation 16 + , enableUtilLinux ? !stdenv.hostPlatform.isStatic, util-linux 17 + , enableVDO ? false, vdo 18 + , enableMdadm ? false, mdadm 19 + , enableMultipath ? false, multipath-tools 19 20 , nixosTests 20 21 }: 21 22 ··· 102 103 in { 103 104 src = ./fix-blkdeactivate.patch; 104 105 inherit coreutils; 105 - util_linux = util-linux; 106 + util_linux = optionalTool enableUtilLinux util-linux; 106 107 mdadm = optionalTool enableMdadm mdadm; 107 108 multipath_tools = optionalTool enableMultipath multipath-tools; 108 109 vdo = optionalTool enableVDO vdo;