|
|
Line 1: |
Line 1: |
| <languages/> | | <languages/> |
| <div lang="en" dir="ltr" class="mw-content-ltr">
| |
| {{Navbox Nix}} | | {{Navbox Nix}} |
| {{Disambiguation|message=This article is about the Nix package manager. Not to be confused with the [[Nix ecosystem]], the [[Nix (language)|Nix language]] or the [[Nix (command)|Nix command]].}} | | {{消歧义|message=本条目介绍的是Nix包管理器。请勿与[[Nix ecosystem|Nix生态系统]]、[[Nix (language)|Nix(语言)]]或[[Nix (command)|Nix(命令)]]混淆。}} |
| Nix is a package manager and build system that parses reproducible build instructions specified in the [[Nix Expression Language]], a pure functional language with lazy evaluation. Nix expressions are pure functions<ref>Values cannot change during computation. Functions always produce the same output if their input does not change. </ref>taking dependencies as arguments and producing a ''[[Derivations|derivation]]'' specifying a reproducible build environment for the package. Nix stores the results of the build in unique addresses specified by a hash of the complete dependency tree, creating an immutable package store (aka the [[#Nix store|nix store]]) that allows for atomic upgrades, rollbacks and concurrent installation of different versions of a package, essentially eliminating [https://en.wikipedia.org/wiki/Dependency_hell dependency hell].
| | Nix是一个包管理器和构建系统,它解析由[[Nix Expression Language|Nix表达式语言]] (一种惰性求值的纯函数式语言) 指定的可复现的构建指令。Nix表达式是纯函数<ref>值在计算过程中不会改变。当输入不变时,函数总是得到相同的输出。</ref>,它接受依赖作为参数,并为该软件包生成一个指定可复现构建环境的''[[Derivations|derivation]]''。Nix把构建结果存储在由整个依赖树的哈希值指定的唯一地址,从而创建一个不可变的包存储 (即[[#Nix store|nix store]]),使得原子升级、回滚、同时安装同一软件包的不同版本成为可能,从根本上消除了[https://en.wikipedia.org/wiki/Dependency_hell 依赖地狱]。 |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr"> | | <span id="Usage"></span> |
| == Usage == | | == 用法 == |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr"> | | <div lang="en" dir="ltr" class="mw-content-ltr"> |