Shell scripts/zh: Difference between revisions

Ardenet (talk | contribs)
Created page with "* [$1 创造一个无源 derivation] * [$2 Nix Pills: 第 7 章. 制作 Derivation]"
Ardenet (talk | contribs)
Created page with "函数 <code>writeShellScript</code> 可用于向 Nix 表达式中添加 Shell 脚本。"
Tags: Mobile edit Mobile web edit
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>


<div lang="en" dir="ltr" class="mw-content-ltr">
函数 <code>writeShellScript</code> 可用于向 Nix 表达式中添加 Shell 脚本。
The package <code>writeShellScript</code> can be used to add shell scripts to Nix expressions.
</div>


<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
Line 20: Line 18:
</syntaxHighlight>
</syntaxHighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="External_builder.sh_script"></span>
== External builder.sh script ==
== 外部 builder.sh 脚本 ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
较长的 Bash 脚本通常会保存为外部脚本文件,并在 Nix 中调用:
Longer Bash scripts are usually stored as external script files, and called from Nix:
</div>


{{file|default.nix|nix|3=
{{file|default.nix|nix|3=
Line 49: Line 44:
}}
}}


<div lang="en" dir="ltr" class="mw-content-ltr">
另见:
See also:
</div>


* [https://github.com/NixOS/nixpkgs/issues/23099 创造一个无源 derivation]
* [https://github.com/NixOS/nixpkgs/issues/23099 创造一个无源 derivation]