Nix (package manager)/ja: Difference between revisions

Poske (talk | contribs)
No edit summary
FuzzyBot (talk | contribs)
Updating to match new version of source page
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
<languages/>
<languages/>
{{Navbox Nix}}
{{Disambiguation|message=<span lang="en" dir="ltr" class="mw-content-ltr">This article is about the Nix package manager. Not to be confused with the [[Nix ecosystem|Nix ecosystem]], the [[Nix (language)|Nix language]] or the [[Nix (command)|Nix command]].</span>}}
<div class="mw-translate-fuzzy">
{{Navbox Nix}}
{{Navbox Nix}}
{{Disambiguation|message=これは、Nix package managerのページです。[[Nix ecosystem]] や [[Nix (language)|Nix language]] 、 [[Nix (command)|Nix command]] とは異なります。}}
{{Disambiguation|message=これは、Nix package managerのページです。[[Nix ecosystem]] や [[Nix (language)|Nix language]] 、 [[Nix (command)|Nix command]] とは異なります。}}
Nixは、[[Nix Expression Language]] で表現された再現可能なビルド命令を解析するパッケージマネージャーおよびビルドシステムであり、これは遅延評価を伴う純粋関数型言語である。Nix expressions は、依存関係を引数として取り、パッケージに対して再現可能なビルド環境''[[Derivations|derivation]]''を作成する純粋関数<ref>変数は不変で、引数が変化しない場合、関数は常に同じ値を返す。</ref>です。Nixは、ビルドの結果を完全な依存関係ツリーのハッシュで指定された一意のアドレスに保存し、不変のパッケージストアを作成することで、原子的な更新、ロールバックを実現する。また、異なるバージョンのパッケージを同時にインストールすることで、根本的に[https://ja.wikipedia.org/wiki/%E4%BE%9D%E5%AD%98%E9%96%A2%E4%BF%82%E5%9C%B0%E7%8D%84 依存関係地獄]を防ぐ。  
Nixは、[[Nix Expression Language]] で表現された再現可能なビルド命令を解析するパッケージマネージャーおよびビルドシステムであり、これは遅延評価を伴う純粋関数型言語である。Nix expressions は、依存関係を引数として取り、パッケージに対して再現可能なビルド環境''[[Derivations|derivation]]''を作成する純粋関数<ref>変数は不変で、引数が変化しない場合、関数は常に同じ値を返す。</ref>です。Nixは、ビルドの結果を完全な依存関係ツリーのハッシュで指定された一意のアドレスに保存し、不変のパッケージストアを作成することで、原子的な更新、ロールバックを実現する。また、異なるバージョンのパッケージを同時にインストールすることで、根本的に[https://ja.wikipedia.org/wiki/%E4%BE%9D%E5%AD%98%E9%96%A2%E4%BF%82%E5%9C%B0%E7%8D%84 依存関係地獄]を防ぐ。
</div>


<span id="Usage"></span>
<span id="Usage"></span>
== 使い方 ==
== 使い方 ==


<div class="mw-translate-fuzzy">
=== インストール ===
=== インストール ===
[[NixOS]]では、Nix は最初からインストールされている。
[[NixOS]]では、Nix は最初からインストールされている。
</div>


<div class="mw-translate-fuzzy">
他の Linux ディストリビューションや macOS 上では、[https://nixos.org/manual/nix/stable/installation/installation installation section of the Nix manual]に従ってインストールできる。
他の Linux ディストリビューションや macOS 上では、[https://nixos.org/manual/nix/stable/installation/installation installation section of the Nix manual]に従ってインストールできる。
</div>


<span id="Nix_commands"></span>
<span id="Nix_commands"></span>
=== Nix コマンド ===
=== Nix コマンド ===


<div class="mw-translate-fuzzy">
[[Nix (command line utilities)|Nix コマンド]]は、[https://nixos.org/manual/nix/stable/command-ref/command-ref Nix リファレンスマニュアル]に、主なコマンド、ユーティリティ、および実験コマンドが文書化されている。バージョン2.0(2018年2月リリース)以前は、さまざまなコマンドが存在していた。
[[Nix (command line utilities)|Nix コマンド]]は、[https://nixos.org/manual/nix/stable/command-ref/command-ref Nix リファレンスマニュアル]に、主なコマンド、ユーティリティ、および実験コマンドが文書化されている。バージョン2.0(2018年2月リリース)以前は、さまざまなコマンドが存在していた。
</div>


<div class="mw-translate-fuzzy">
=== 設定 ===
=== 設定 ===
NixOS 上では、[https://search.nixos.org/options?query=nix. <code>nix</code> option]を用いてNixで設定することができる。  
NixOS 上では、[https://search.nixos.org/options?query=nix. <code>nix</code> option]を用いてNixで設定することができる。
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Standalone Nix is configured through <code>nix.conf</code> (usually found in <code>/etc/nix/</code>). Details on the available options are [https://nixos.org/manual/nix/stable/command-ref/conf-file found in the Nix reference manual].
Standalone Nix is configured through <code>nix.conf</code> (usually found in <code>/etc/nix/</code>). Details on the available options are [https://nix.dev/manual/nix/stable/command-ref/conf-file found in the Nix reference manual].
</div>  
</div>  


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
You can also configure Nix using [[Home Manager]], which manages declarative environments for a single user. For system-wide configuration, you can use [https://github.com/numtide/system-manager System Manager] on Linux and [https://github.com/LnL7/nix-darwin nix-darwin] on macOS.
You can also configure Nix using [[Home Manager|Home Manager]], which manages declarative environments for a single user. For system-wide configuration, you can use [https://github.com/numtide/system-manager System Manager] on Linux and [https://github.com/nix-darwin/nix-darwin nix-darwin] on macOS.
</div>
</div>


Line 102: Line 115:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
* [https://cs.tvl.fyi/depot/-/tree/tvix tvix]
* [https://code.tvl.fyi/tree/tvix tvix]
</div>
</div>