User contributions for Weijia
Appearance
28 August 2025
- 19:2719:27, 28 August 2025 diff hist −59 Flakes/zh Created page with "它有 4 个顶级属性:"
- 19:2719:27, 28 August 2025 diff hist +27 N Translations:Flakes/29/zh Created page with "它有 4 个顶级属性:" current
- 19:2719:27, 28 August 2025 diff hist −44 Flakes/zh Created page with "<code>flake.nix</code> 文件是一个具有特殊限制的 Nix 文件(稍后会详细介绍)。"
- 19:2619:26, 28 August 2025 diff hist +100 N Translations:Flakes/28/zh Created page with "<code>flake.nix</code> 文件是一个具有特殊限制的 Nix 文件(稍后会详细介绍)。" current
- 19:2619:26, 28 August 2025 diff hist −24 Flakes/zh Created page with "== Flake 规范 ==" Tags: Mobile edit Mobile web edit
- 19:2619:26, 28 August 2025 diff hist +18 N Translations:Flakes/27/zh Created page with "== Flake 规范 ==" current
- 19:2619:26, 28 August 2025 diff hist −47 Flakes/zh Created page with "同样,您可以给 <code>run</code> 命令:<code>nix run .#hello</code> 和 <code>develop</code>命令:<code>nix develop .#hello</code>指定属性。"
- 19:2619:26, 28 August 2025 diff hist +157 N Translations:Flakes/205/zh Created page with "同样,您可以给 <code>run</code> 命令:<code>nix run .#hello</code> 和 <code>develop</code>命令:<code>nix develop .#hello</code>指定属性。" current
- 19:2619:26, 28 August 2025 diff hist −56 Flakes/zh Created page with "<syntaxHighlight lang=console> $ nix build .#hello </syntaxHighlight>"
- 19:2619:26, 28 August 2025 diff hist +69 N Translations:Flakes/204/zh Created page with "<syntaxHighlight lang=console> $ nix build .#hello </syntaxHighlight>" current
- 19:2619:26, 28 August 2025 diff hist −83 Flakes/zh 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> 属性,请运行:"
- 19:2619:26, 28 August 2025 diff hist +408 N Translations:Flakes/103/zh 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> 属性,请运行:"
- 19:2619:26, 28 August 2025 diff hist +1 Flakes/zh Created page with "==== 在 flake 仓库中构建特定属性 ===="
- 19:2619:26, 28 August 2025 diff hist +47 N Translations:Flakes/102/zh Created page with "==== 在 flake 仓库中构建特定属性 ====" current
- 19:2619:26, 28 August 2025 diff hist −83 Flakes/zh Created page with "{{note|使用 nix develop 命令进入开发 shell 无需定义 devShell。 如果未定义 devShell,nix develop 命令会将您带入一个包含 flake 默认构建依赖项(如果有)的环境。}}"
- 19:2619:26, 28 August 2025 diff hist +205 N Translations:Flakes/203/zh Created page with "{{note|使用 nix develop 命令进入开发 shell 无需定义 devShell。 如果未定义 devShell,nix develop 命令会将您带入一个包含 flake 默认构建依赖项(如果有)的环境。}}" current
- 19:2619:26, 28 August 2025 diff hist −56 Flakes/zh Created page with "<syntaxhighlight lang="console"> $ nix develop </syntaxhighlight>" Tags: Mobile edit Mobile web edit
- 19:2619:26, 28 August 2025 diff hist +65 N Translations:Flakes/202/zh Created page with "<syntaxhighlight lang="console"> $ nix develop </syntaxhighlight>" current
- 19:2619:26, 28 August 2025 diff hist −72 Flakes/zh Created page with "进入开发环境 Shell:" Tags: Mobile edit Mobile web edit
- 19:2619:26, 28 August 2025 diff hist +27 N Translations:Flakes/201/zh Created page with "进入开发环境 Shell:" current
- 19:2619:26, 28 August 2025 diff hist −58 Flakes/zh Created page with "outputs = { self, nixpkgs}: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; in { devShells.x86_64-linux.default = pkgs.mkShell { buildInputs = with pkgs; [ hello ]; shellHook = '' echo "欢迎进入 devShell!" ''; }; }; } </syntaxhighlight>" Tags: Mobile edit Mobile web edit
- 19:2619:26, 28 August 2025 diff hist +352 N Translations:Flakes/200/zh Created page with "outputs = { self, nixpkgs}: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; in { devShells.x86_64-linux.default = pkgs.mkShell { buildInputs = with pkgs; [ hello ]; shellHook = '' echo "欢迎进入 devShell!" ''; }; }; } </syntaxhighlight>" current
- 19:2619:26, 28 August 2025 diff hist −56 Flakes/zh Created page with "inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";"
- 19:2619:26, 28 August 2025 diff hist +63 N Translations:Flakes/199/zh Created page with "inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";" current
- 19:2619:26, 28 August 2025 diff hist −54 Flakes/zh Created page with "<syntaxhighlight lang="nix"> { description = "带有 devShell 的示例 flake";"
- 19:2619:26, 28 August 2025 diff hist +81 N Translations:Flakes/198/zh Created page with "<syntaxhighlight lang="nix"> { description = "带有 devShell 的示例 flake";" current
- 19:2619:26, 28 August 2025 diff hist −103 Flakes/zh Created page with "<code>devShell</code> 是定义在 flake 中由 Nix 提供的开发环境。它允许您声明一个可复用的 Shell 环境,其中将包含开发特定项目所需的工具、库和环境变量。这相当于在 flake 中定义一个 <code>nix-shell</code>。" Tags: Mobile edit Mobile web edit
- 19:2619:26, 28 August 2025 diff hist +318 N Translations:Flakes/197/zh Created page with "<code>devShell</code> 是定义在 flake 中由 Nix 提供的开发环境。它允许您声明一个可复用的 Shell 环境,其中将包含开发特定项目所需的工具、库和环境变量。这相当于在 flake 中定义一个 <code>nix-shell</code>。" current
- 19:2519:25, 28 August 2025 diff hist −18 Flakes/zh Created page with "==== 开发环境 Shell ===="
- 19:2519:25, 28 August 2025 diff hist +28 N Translations:Flakes/196/zh Created page with "==== 开发环境 Shell ====" current
- 19:2519:25, 28 August 2025 diff hist −56 Flakes/zh Created page with "<syntaxhighlight lang="console"> $ nix flake show └───packages └───x86_64-linux ├───default: package 'hello-2.12.2' └───hello: package 'hello-2.12.2' </syntaxhighlight>" Tags: Mobile edit Mobile web edit
- 19:2519:25, 28 August 2025 diff hist +220 N Translations:Flakes/195/zh Created page with "<syntaxhighlight lang="console"> $ nix flake show └───packages └───x86_64-linux ├───default: package 'hello-2.12.2' └───hello: package 'hello-2.12.2' </syntaxhighlight>" current
- 19:2519:25, 28 August 2025 diff hist −33 Flakes/zh Created page with "此 flake 生成一个单 Flake 输出 <code>packages</code>。其中,<code>x86_64-linux</code> 是系统特定的属性集。其中包含两个软件包的 Derivations(派生/定义):<code>default</code> 和 <code>hello</code>。您可以使用 {{Nix Manual|name=show 命令|anchor=command-ref/new-cli/nix3-flake-show}} 给出某 flake 的输出,如下所示:"
- 19:2519:25, 28 August 2025 diff hist +388 N Translations:Flakes/194/zh Created page with "此 flake 生成一个单 Flake 输出 <code>packages</code>。其中,<code>x86_64-linux</code> 是系统特定的属性集。其中包含两个软件包的 Derivations(派生/定义):<code>default</code> 和 <code>hello</code>。您可以使用 {{Nix Manual|name=show 命令|anchor=command-ref/new-cli/nix3-flake-show}} 给出某 flake 的输出,如下所示:" current
- 19:2519:25, 28 August 2025 diff hist −68 Flakes/zh Created page with "{{ic|nix flake}} 的子命令在 {{Nix Manual|name=Nix 手册命令参考页面|anchor=command-ref/new-cli/nix3-flake}} 中被描述。"
- 19:2519:25, 28 August 2025 diff hist +135 N Translations:Flakes/65/zh Created page with "{{ic|nix flake}} 的子命令在 {{Nix Manual|name=Nix 手册命令参考页面|anchor=command-ref/new-cli/nix3-flake}} 中被描述。" current
- 19:2519:25, 28 August 2025 diff hist −61 Flakes/zh Created page with "=== Nix Flakes 命令 === {{Main|Nix (command)}}" Tags: Mobile edit Mobile web edit
- 19:2519:25, 28 August 2025 diff hist +48 N Translations:Flakes/64/zh Created page with "=== Nix Flakes 命令 === {{Main|Nix (command)}}"
- 19:2519:25, 28 August 2025 diff hist −41 Flakes/zh Created page with "因此,如果您使用 <code>git</code> 管理您的 flake,请确保在首次创建之后使用 <code>git add</code>添加所有项目文件。}}"
- 19:2519:25, 28 August 2025 diff hist +149 N Translations:Flakes/22/zh Created page with "因此,如果您使用 <code>git</code> 管理您的 flake,请确保在首次创建之后使用 <code>git add</code>添加所有项目文件。}}" current
- 19:2519:25, 28 August 2025 diff hist −56 Flakes/zh Created page with "{{Note | 对于 Git 仓库中的 flakes,只有工作区中的文件才会被复制到 Store 中。" Tags: Mobile edit Mobile web edit
- 19:2519:25, 28 August 2025 diff hist +104 N Translations:Flakes/146/zh Created page with "{{Note | 对于 Git 仓库中的 flakes,只有工作区中的文件才会被复制到 Store 中。" current
- 19:2519:25, 28 August 2025 diff hist −45 Flakes/zh Created page with "{{Warning | 由于 flake 文件的内容会被复制到全局可读的 Nix Store 目录下,所以请不要在 flake 文件中写入任何未加密的秘密信息。您应该改用 秘密管理方案。}}"
- 19:2519:25, 28 August 2025 diff hist +281 N Translations:Flakes/20/zh Created page with "{{Warning | 由于 flake 文件的内容会被复制到全局可读的 Nix Store 目录下,所以请不要在 flake 文件中写入任何未加密的秘密信息。您应该改用 秘密管理方案。}}" current
- 19:2519:25, 28 August 2025 diff hist −30 Flakes/zh Created page with "== 用法 =="
- 19:2519:25, 28 August 2025 diff hist +12 N Translations:Flakes/17/zh Created page with "== 用法 ==" current
- 19:2519:25, 28 August 2025 diff hist −54 Flakes/zh Created page with "添加如下内容至 <code>~/.config/nix/nix.conf</code> 或 <code>/etc/nix/nix.conf</code>:"
- 19:2519:25, 28 August 2025 diff hist +93 N Translations:Flakes/15/zh Created page with "添加如下内容至 <code>~/.config/nix/nix.conf</code> 或 <code>/etc/nix/nix.conf</code>:" current
- 19:2519:25, 28 August 2025 diff hist −20 Flakes/zh Created page with "====Nix 独立程序===="
- 19:2519:25, 28 August 2025 diff hist +24 N Translations:Flakes/13/zh Created page with "====Nix 独立程序====" current