Flakes/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "<code>devShell</code> 是定义在 flake 中由 Nix 提供的开发环境。它允许您声明一个可复用的 Shell 环境,其中将包含开发特定项目所需的工具、库和环境变量。这相当于在 flake 中定义一个 <code>nix-shell</code>。"
Tags: Mobile edit Mobile web edit
Weijia (talk | contribs)
Created page with "<syntaxhighlight lang="nix"> { description = "带有 devShell 的示例 flake";"
Line 112: Line 112:
<code>devShell</code> 是定义在 flake 中由 Nix 提供的[[Development_environment_with_nix-shell#nix develop|开发环境]]。它允许您声明一个可复用的 Shell 环境,其中将包含开发特定项目所需的工具、库和环境变量。这相当于在 flake 中定义一个 <code>nix-shell</code>。
<code>devShell</code> 是定义在 flake 中由 Nix 提供的[[Development_environment_with_nix-shell#nix develop|开发环境]]。它允许您声明一个可复用的 Shell 环境,其中将包含开发特定项目所需的工具、库和环境变量。这相当于在 flake 中定义一个 <code>nix-shell</code>。


<div lang="en" dir="ltr" class="mw-content-ltr">
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
{
{
   description = "Example flake with a devShell";
   description = "带有 devShell 的示例 flake";
</div>


   <div lang="en" dir="ltr" class="mw-content-ltr">
   <div lang="en" dir="ltr" class="mw-content-ltr">