From 5ffd49e6a155342a977735a7b4456537d2e1d6ea Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 1 Dec 2024 09:42:16 +0000 Subject: [PATCH] fixup! lib.packagesFromDirectoryRecursive: Warn of limitation when used with scope(s) --- doc/redirects.json | 3 +++ lib/filesystem.nix | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/redirects.json b/doc/redirects.json index 311ca1ff4af774..d8cd46d04ee828 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -134,6 +134,9 @@ "sec-functions-library-filesystem": [ "index.html#sec-functions-library-filesystem" ], + "sec-functions-library-filesystem-packagesFromDirectoryRecursive-example-scope": [ + "index.html#sec-functions-library-filesystem-packagesFromDirectoryRecursive-example-scope" + ], "sec-functions-library-fileset": [ "index.html#sec-functions-library-fileset" ], diff --git a/lib/filesystem.nix b/lib/filesystem.nix index ae913499c826f7..e842ea878fc501 100644 --- a/lib/filesystem.nix +++ b/lib/filesystem.nix @@ -343,7 +343,7 @@ in ::: :::{.example} - ## Create a scope for the nix files found in a directory {#lib-filesystem-packagesFromDirectoryRecursive-example-scope} + ## Create a scope for the nix files found in a directory {#sec-functions-library-filesystem-packagesFromDirectoryRecursive-example-scope} ```nix lib.makeScope pkgs.newScope ( self: packagesFromDirectoryRecursive { @@ -377,7 +377,7 @@ in files or directories in the `directory`, but not to those in the same directory, nor those in a parent directory. (except for the root `directory` passed to `packagesFromDirectoryRecursive`) - [creating a scope]: #lib-filesystem-packagesFromDirectoryRecursive-example-scope + [creating a scope]: #sec-functions-library-filesystem-packagesFromDirectoryRecursive-example-scope ::: */ packagesFromDirectoryRecursive =