File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,23 @@ hello = callPackage ../applications/misc/hello/ex-1 { };
105105hello = callPackage ../applications/misc/hello/ex-1 { stdenv = myStdenv; };
106106</programlisting >
107107
108- </para ></note >
108+ </para >
109+
110+ <para >A useful way to use the callPackage function would be to
111+ change the name of the above <filename >default.nix</filename >
112+ to <filename >hello.nix</filename > and create a new
113+ <filename >default.nix</filename > as follows:</para >
114+
115+ <programlisting >
116+ (import <nixpkgs > {}).callPackage ./hello.nix {}
117+ </programlisting >
118+
119+ <para >This infrastructure allows you to build it as a local
120+ package simply by running <literal >nix-build</literal > or drop
121+ into a build environment shell with
122+ <literal >nix-shell</literal ></para >
123+
124+ </note >
109125
110126 </callout >
111127
@@ -118,4 +134,4 @@ hello = callPackage ../applications/misc/hello/ex-1 { stdenv = myStdenv; };
118134
119135</calloutlist >
120136
121- </section >
137+ </section >
You can’t perform that action at this time.
0 commit comments