diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-08-26 08:39:01 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-08-26 08:39:01 +0200 |
commit | f6286dea8881e446f33a9b2faca8db43ec55aa45 (patch) | |
tree | 448b8bd479420c4ffd17c4aad81225f5c67cca46 /nixos/modules/system/boot/stage-1.nix | |
parent | ff926743b682aeaea47b1062803a685b34836c3c (diff) | |
download | nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.tar nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.tar.gz nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.tar.bz2 nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.tar.lz nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.tar.xz nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.tar.zst nixpkgs-f6286dea8881e446f33a9b2faca8db43ec55aa45.zip |
extra-utils: build a full lvm2 without udev support, fixes #96197
dmsetup was missing symbols. https://github.com/NixOS/nixpkgs/pull/96290#issuecomment-680252830
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index eee510d2c95..fe10972b2af 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -87,7 +87,9 @@ let # copy what we need. Instead of using statically linked binaries, # we just copy what we need from Glibc and use patchelf to make it # work. - extraUtils = pkgs.runCommandCC "extra-utils" + extraUtils = let + # Use lvm2 without udev support, which is the same lvm2 we already have in the closure anyways + lvm2 = pkgs.lvm2.override { udev = null; }; in pkgs.runCommandCC "extra-utils" { nativeBuildInputs = [pkgs.buildPackages.nukeReferences]; allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd } @@ -111,8 +113,8 @@ let copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid # Copy dmsetup and lvm. - copy_bin_and_libs ${getBin pkgs.lvm2}/bin/dmsetup - copy_bin_and_libs ${getBin pkgs.lvm2}/bin/lvm + copy_bin_and_libs ${getBin lvm2}/bin/dmsetup + copy_bin_and_libs ${getBin lvm2}/bin/lvm # Add RAID mdadm tool. copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm |