nixos/sd-image: explicit reference to the gawk package
The `awk` command is not installed in the standard env. So this command fails if the `awk` command is not installed by some external module.
commitaa38540423e82e819b048f932eefc78ac6e6a0c2
authorMatej Urbas <matej.urbas@gmail.com>
dateSat 12 Dec 2020, 15:23 (6 years ago)
parente9158ec
nixos/modules/installer/cd-dvd/sd-image.nix+1−1
@@ -223,7 +223,7 @@ in
223223 # Figure out device names for the boot device and root filesystem.
224224 rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /)
225225 bootDevice=$(lsblk -npo PKNAME $rootPart)
226− partNum=$(lsblk -npo MAJ:MIN $rootPart | awk -F: '{print $2}')
226+ partNum=$(lsblk -npo MAJ:MIN $rootPart | ${pkgs.gawk}/bin/awk -F: '{print $2}')
227227
228228 # Resize the root partition and the filesystem to fit the disk
229229 echo ",+," | sfdisk -N$partNum --no-reread $bootDevice