From 5c1ef28b433fc64c53ee806d1af0683a97b154ec Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Thu, 5 Oct 2023 23:44:47 +0800 Subject: [PATCH] feat: callpackage --- docs/nixpkgs/callpackage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/nixpkgs/callpackage.md b/docs/nixpkgs/callpackage.md index 8135064..d48bb1c 100644 --- a/docs/nixpkgs/callpackage.md +++ b/docs/nixpkgs/callpackage.md @@ -92,7 +92,7 @@ In the previous example without `pkgs.callPackage`, we directly passed `pkgs` as # ...... ``` -In essence, `pkgs.callPackage` is used as `pkgs.callPackage fn args`, where `fn` is a Nix file or function, and `args` is an attribute set. Here's how it works: +In essence, `pkgs.callPackage` is used as `pkgs.callPackage fn args`, where the place holder `fn` is a Nix file or function, and `args` is an attribute set. Here's how it works: 1. `pkgs.callPackge fn args` first checks if `fn` is a function or a file. If it's a file, it imports the function defined within. 1. After this step, you have a function, typically with parameters like `lib`, `stdenv`, `fetchurl`, and possibly some custom parameters.