Jump to content

Translations:Flakes/103/zh: Difference between revisions

From Official NixOS Wiki
Weijia (talk | contribs)
Created page with "运行 <code>nix build</code> 将在 <code>legacyPackages</code> 和 <code>packages</code> 输出属性中查找相应的 derivation,然后基于您的系统架构构建默认输出项。如果您想在 flake 仓库中指定构建属性,可以运行 <code>nix build .#<attr></code>。在上面的示例中,如果您想构建 <code>packages.x86_64-linux.hello</code> 属性,请运行:"
 
Ardenet (talk | contribs)
No edit summary
 
Line 1: Line 1:
运行 <code>nix build</code> 将在 <code>legacyPackages</code> 和 <code>packages</code> 输出属性中查找相应的 [[derivation|derivation]],然后基于您的系统架构构建默认输出项。如果您想在 flake 仓库中指定构建属性,可以运行 <code>nix build .#<attr></code>。在上面的示例中,如果您想构建 <code>packages.x86_64-linux.hello</code> 属性,请运行:
运行 <code>nix build</code> 将在 <code>legacyPackages</code> 和 <code>packages</code> 输出属性中查找相应的 [[derivations|derivation]],然后基于您的系统架构构建默认输出项。如果您想在 flake 仓库中指定构建属性,可以运行 <code>nix build .#<attr></code>。在上面的示例中,如果您想构建 <code>packages.x86_64-linux.hello</code> 属性,请运行:

Latest revision as of 15:41, 3 March 2026

Message definition (Flakes)
Running <code>nix build</code> will look in the <code>legacyPackages</code> and <code>packages</code> output attributes for the corresponding [[derivations|derivation]] and then your system architecture and build the default output. If you want to specify a build attribute in a flake repository, you can run <code>nix build .#<attr></code>. In the example above, if you wanted to build the <code>packages.x86_64-linux.hello</code> attribute, run:

运行 nix build 将在 legacyPackagespackages 输出属性中查找相应的 derivation,然后基于您的系统架构构建默认输出项。如果您想在 flake 仓库中指定构建属性,可以运行 nix build .#<attr>。在上面的示例中,如果您想构建 packages.x86_64-linux.hello 属性,请运行: