FAQ/zh: Difference between revisions

Ardenet (talk | contribs)
Created page with "有关更多信息,请参阅 nix-store 和 nix-instantiate 的手册。"
Ardenet (talk | contribs)
Created page with "要使用 -Og 和 -g 参数构建软件包,且不去除调试符号,请使用:"
 
(6 intermediate revisions by the same user not shown)
Line 60: Line 60:
<syntaxhighlight lang="bash">nix-store -qR ~/.nix-profile | xargs nix-store -r</syntaxhighlight>
<syntaxhighlight lang="bash">nix-store -qR ~/.nix-profile | xargs nix-store -r</syntaxhighlight>


对于列在/nix/var/nix/profiles/或其子目录中的配置文件,可以忽略此警告。
对于列在 ''/nix/var/nix/profiles/'' 或其子目录中的配置文件,可以忽略此警告。


有关更多信息,请参阅 nix-store 和 nix-instantiate 的手册。
有关更多信息,请参阅 nix-store 和 nix-instantiate 的手册。
Line 73: Line 73:
此外,由于开头部分长度一致,查看一系列软件包列表时在视觉上也更容易解析。
此外,由于开头部分长度一致,查看一系列软件包列表时在视觉上也更容易解析。


<div lang="en" dir="ltr" class="mw-content-ltr">
如果你仍然想知道原因,请在 shell 中运行 <code>ls -1 /nix/store | sort -R -t - -k 2 | less</code> 命令。''(? 不清楚)''
If you still wonder why, run <code>ls -1 /nix/store | sort -R -t - -k 2 | less</code> in your shell. ''(? unclear)''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
如果你不经常进行垃圾回收,或者正在测试编译变体,可能会发生这种情况:
This is what might happen if you don't garbage collect frequently, or if you are testing compilation variants:
</div>


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 145: Line 141:
=== 我如何使用 nix-env 管理软件,就像使用 configuration.nix 一样?===
=== 我如何使用 nix-env 管理软件,就像使用 configuration.nix 一样?===


<div lang="en" dir="ltr" class="mw-content-ltr">
有很多方法,其中一种如下:
There are many ways, one is the following:
</div>


<ol style="list-style-type: decimal;">
<ol style="list-style-type: decimal;">
Line 395: Line 389:
</syntaxhighlight>
</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="There&#039;s_an_updated_version_for_$software_on_the_unstable_branch,_but_I_use_stable,_how_can_I_use_it?"></span>
=== There's an updated version for $software on the unstable branch, but I use stable, how can I use it? ===
=== 不稳定分支上有软件 $software 的更新版本,但我用的是稳定版,我该如何使用它? ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 419: Line 412:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Using_channels"></span>
==== Using channels ====
==== 使用频道 ====
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 458: Line 450:
}</syntaxhighlight>
}</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Using_flakes"></span>
==== Using flakes ====
==== 使用 Flakes ====
</div>


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