FAQ/zh: Difference between revisions

FuzzyBot (talk | contribs)
Updating to match new version of source page
Ardenet (talk | contribs)
Created page with "=== 我正在开发一个新软件包,如何在不将其添加到 nixpkgs 的情况下构建它? ==="
Line 129: Line 129:
</syntaxhighlight>
</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="I&#039;m_working_on_a_new_package,_how_can_I_build_it_without_adding_it_to_nixpkgs?"></span>
=== I'm working on a new package, how can I build it without adding it to nixpkgs? ===
=== 我正在开发一个新软件包,如何在不将其添加到 nixpkgs 的情况下构建它? ===
</div>


<syntaxhighlight lang="bash">nix-build -E 'with import <nixpkgs> { }; callPackage ./mypackage.nix { }'</syntaxhighlight>
<syntaxhighlight lang="bash">nix-build -E 'with import <nixpkgs> { }; callPackage ./mypackage.nix { }'</syntaxhighlight>