Jump to content

Translations:Nix (package manager)/1/zh-hans: Difference between revisions

From Official NixOS Wiki
Loxodoromy (talk | contribs)
mNo edit summary
Loxodoromy (talk | contribs)
mNo edit summary
Tag: Manual revert
 
(3 intermediate revisions by the same user not shown)
(No difference)

Latest revision as of 09:45, 26 September 2025

Message definition (Nix (package manager))
Nix is a package manager and build system that parses reproducible build instructions specified in the [[$1|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 ''[[$2|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 [[$3|dependency hell]].
Introduction to Nix

Tools and applications

⤧︎
Disambiguation: 本条目介绍的是Nix包管理器。请勿与Nix生态系统Nix(语言)Nix(命令)混淆。

Nix是一个包管理器和构建系统,它解析由Nix表达式语言 (一种惰性求值的纯函数式语言) 指定的可复现的构建指令。Nix表达式是纯函数[1],它接受依赖作为参数,并为该软件包生成一个指定可复现构建环境的derivation。Nix把构建结果存储在由整个依赖树的哈希值指定的唯一地址,从而创建一个不可变的包存储 (即nix store),使得原子升级、回滚、同时安装同一软件包的不同版本成为可能,从根本上消除了依赖地狱

  1. 值在计算过程中不会改变。当输入不变时,函数总是得到相同的输出。