Jump to content

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

From NixOS Wiki
Mayer (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
Mayer (talk | contribs)
No edit summary
Line 1: Line 1:
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 14:40, 25 February 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].

Nix是一個包管理器和構建系統, 解析用 Nix表達式語言 (惰性求值的純函數式語言) 指定的可再現的構建指令. Nix表達式是純函數[1], 接受依賴作為參數,並為包產生一個指定了可再現的構建環境的 derivation . Nix把構建的結果存儲在由完整依賴樹的哈希值指定的唯一地址中, 創建了一個不可變的包存儲 (即nix存儲), 這使得原子升級, 回滾, 以及不同版本的包的同時安裝成為可能, 從根本上消除了依賴地獄.

  1. 計算過程中,值不可改變. 當函數的輸入不變時,函數總是輸出相同的結果.