From ce80359d9ff0e1578169d7263b2af8482be7c4ad Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Fri, 3 Nov 2023 15:38:12 -0700 Subject: [PATCH] deviceTree: ensure file symlinks are included in applyOverlays output When using a custom `hardware.deviceTree.dtbSource`, we cannot assume that all DTBs in this directory are regular files. This change allows for file symlinks to be present as well, which fixes the issue where only file (a symlink) is present in `dtbSource` and the copy fails with `cp: missing file operand`. --- pkgs/os-specific/linux/device-tree/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/device-tree/default.nix b/pkgs/os-specific/linux/device-tree/default.nix index 1a50d799b4b1..a15a9e32137c 100644 --- a/pkgs/os-specific/linux/device-tree/default.nix +++ b/pkgs/os-specific/linux/device-tree/default.nix @@ -32,7 +32,7 @@ with lib; { in '' mkdir -p $out cd "${base}" - find . -type f -name '*.dtb' -print0 \ + find -L . -type f -name '*.dtb' -print0 \ | xargs -0 cp -v --no-preserve=mode --target-directory "$out" --parents for dtb in $(find "$out" -type f -name '*.dtb'); do