callPackage
Reading through a tutorial on T383838callPackage:
I've been creating T383838default.nix and T383838whatever.nix files.
I put something like the following in T383838default.nix:
T282828
Tff7b72let
Ta5d6ffpkgs Tff7b72= Tffa657import Ta5d6ff<nixpkgs> Tb4b4b4{ Tb4b4b4}Tb4b4b4;
Tff7b72in
Ta5d6ffwhatever Tff7b72= pkgsTff7b72.callPackage Ta5d6ff./whatever.nix Tb4b4b4{ Tb4b4b4}
The T383838whatever.nix contains more nix expressions, usually in the form of stuff that builds a derivation (T383838mkDerivation) or package.
Then I use T383838nix-build -A whatever. I assumed the T383838default.nix was a sort of mapping of names to values and that anything named after the T383838in could be called with T383838nix-build -A and that's not incorrect. The T383838A stands for attribute, and what I've been doing is cherry picking which attribute to build.
Tags: nix
Tags
Navigation