Jump to content

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

From NixOS Wiki
FuzzyBot (talk | contribs)
m FuzzyBot moved page Translations:Nix package manager/1/zh to Translations:Nix (package manager)/1/zh without leaving a redirect: Part of translatable page "Nix package manager"
Weijia (talk | contribs)
No edit summary
Line 1: Line 1:
{{Navbox Nix}}
{{Disambiguation|message=本条目介绍的是 Nix 软件包管理器。请勿与 [[Nix ecosystem|Nix 生态系统]]、[[Nix (language)|Nix 语言]] 或 [[Nix (command)|Nix 命令]] 混淆。}}
Nix是一个包管理器和构建系统, 解析用 [[Nix Expression Language|Nix表达式语言]] (惰性求值的纯函数式语言) 指定的可再现的构建指令. Nix表达式是纯函数<ref>计算过程中,值不可改变. 当函数的输入不变时,函数总是输出相同的结果. </ref>, 接受依赖作为参数,并为包产生一个指定了可再现的构建环境的 ''[[Derivations|derivation]]'' . Nix把构建的结果存储在由完整依赖树的哈希值指定的唯一地址中, 创建了一个不可变的包存储 (即[[#Nix store|nix存储]]), 这使得原子升级, 回滚, 以及不同版本的包的同时安装成为可能, 从根本上消除了[https://en.wikipedia.org/wiki/Dependency_hell 依赖地狱].
Nix是一个包管理器和构建系统, 解析用 [[Nix Expression Language|Nix表达式语言]] (惰性求值的纯函数式语言) 指定的可再现的构建指令. Nix表达式是纯函数<ref>计算过程中,值不可改变. 当函数的输入不变时,函数总是输出相同的结果. </ref>, 接受依赖作为参数,并为包产生一个指定了可再现的构建环境的 ''[[Derivations|derivation]]'' . Nix把构建的结果存储在由完整依赖树的哈希值指定的唯一地址中, 创建了一个不可变的包存储 (即[[#Nix store|nix存储]]), 这使得原子升级, 回滚, 以及不同版本的包的同时安装成为可能, 从根本上消除了[https://en.wikipedia.org/wiki/Dependency_hell 依赖地狱].

Revision as of 15:46, 28 August 2025

Message definition (Nix (package manager))
{{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]].}}
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].
Introduction to Nix

Tools and applications

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

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

  1. 计算过程中,值不可改变. 当函数的输入不变时,函数总是输出相同的结果.