From 781b44b39d1738e544ca0acfe391beda22408c22 Mon Sep 17 00:00:00 2001 From: nicoo Date: Thu, 28 Nov 2024 16:36:29 +0000 Subject: [PATCH] lib.packagesFromDirectoryRecursive: document inputs better Cut out redundant boilerplate, explain what the `callPackage` parameter is. Co-authored-by: Valentin Gagarin --- lib/filesystem.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/filesystem.nix b/lib/filesystem.nix index 2f43792017f9..17ca23606f8b 100644 --- a/lib/filesystem.nix +++ b/lib/filesystem.nix @@ -318,18 +318,12 @@ in # Inputs - Structured function argument + `callPackage` + : The function used to convert a Nix file's path into a leaf of the attribute set. + It is typically the `callPackage` function, taken from either `pkgs` or a new scope corresponding to the `directory`. - : Attribute set containing the following attributes. - Additional attributes are ignored. - - `callPackage` - - : `pkgs.callPackage` - - `directory` - - : The directory to read package files from + `directory` + : The directory to read package files from. # Examples