Skip to content

Clarify the description of "callPackage" #23

@WayneSherman

Description

@WayneSherman

With reference to:

nix-1p/README.md

Lines 578 to 580 in 1cf10d3

The `callPackage` function looks at the expected arguments (via
`builtins.functionArgs`) and passes the appropriate keys from the set in which
it is defined as the values for each corresponding argument.

Looking specifically at the phrase "the set in which it is defined" it isn't clear:

  1. What is "it"? (the callpackage function?)

  2. Which set is being described?

The callpackage function does not appear to be defined as part of a set in this example:

nix-1p/README.md

Lines 572 to 575 in 1cf10d3

{ pkgs ? import <nixpkgs> {} }:
let my-funky-program = pkgs.callPackage ./my-funky-program.nix {};
in # ... something happens with my-funky-program

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions