Skip to content

Commit

Permalink
nixos/sd-image: explicit reference to the gawk package
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
urbas committed Dec 12, 2020
1 parent e9158ec commit aa38540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/installer/cd-dvd/sd-image.nix
Expand Up @@ -223,7 +223,7 @@ in
# Figure out device names for the boot device and root filesystem.
rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /)
bootDevice=$(lsblk -npo PKNAME $rootPart)
partNum=$(lsblk -npo MAJ:MIN $rootPart | awk -F: '{print $2}')
partNum=$(lsblk -npo MAJ:MIN $rootPart | ${pkgs.gawk}/bin/awk -F: '{print $2}')
# Resize the root partition and the filesystem to fit the disk
echo ",+," | sfdisk -N$partNum --no-reread $bootDevice
Expand Down

0 comments on commit aa38540

Please sign in to comment.