Nix ecosystem/zh-cn: Difference between revisions
No edit summary |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
此外,Nix社区开发了许多其他的 [[applications|应用程序]] (“Nix扩展生态”),这些应用程序使用并为核心技术提供支持。 | 此外,Nix社区开发了许多其他的 [[applications|应用程序]] (“Nix扩展生态”),这些应用程序使用并为核心技术提供支持。 | ||
< | <span id="Official_ecosystem"></span> | ||
== | == 官方生态 == | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ Nix 生态核心组件 | ||
|- | |- | ||
! | ! 组件 | ||
! Manual | ! 手册(Manual) | ||
! | ! 描述 | ||
! | ! 用途 | ||
! | ! 协议 | ||
|- | |- | ||
| [[NixOS]] | | [[NixOS]] | ||
| [https://nixos.org/nixos/manual/ NixOS Manual] | | [https://nixos.org/nixos/manual/ NixOS Manual] | ||
| | | 一个由 Nix 构建''所有''组件的 Linux 发行版,因此支持可重现的、声明式的全系统配置管理以及原子升级和回滚。 | ||
| | | 声明式配置桌面、服务器和集群。 | ||
| MIT | | MIT | ||
|- | |- | ||
| [[Nixpkgs]] | | [[Nixpkgs]] | ||
| [https://nixos.org/nixpkgs/manual/ Nixpkgs Manual] | | [https://nixos.org/nixpkgs/manual/ Nixpkgs Manual] | ||
| | | 最大的社区维护的 Nix 软件包和 NixOS 模块仓库,NixOS的标准发行版也托管在这里。 | ||
| | | 分享 Nix 软件包和 NixOS 模块 | ||
| MIT | | MIT | ||
|- | |- | ||
| [[Hydra]] | | [[Hydra]] | ||
| [https://nixos.org/hydra/manual/ Hydra Manual] | | [https://nixos.org/hydra/manual/ Hydra Manual] | ||
| | | 基于 Nix 的持续构建系统 | ||
| CI build farms | | CI build farms | ||
| GPL-3.0 | | GPL-3.0 | ||
Line 38: | Line 36: | ||
| [[Nix]] | | [[Nix]] | ||
| [https://nixos.org/nix/manual/ Nix Manual] | | [https://nixos.org/nix/manual/ Nix Manual] | ||
| | | 一款软件包管理器,能解析指定可重现构建的 Nix 表达式,并将结果与依赖关系树的哈希值一起放入存储地址,从而避免依赖关系地狱,并支持多版本安装和回滚。 | ||
| | | Linux 和 Darwin 中的可重现构建和软件包管理 | ||
| LGPL-2.1 | | LGPL-2.1 | ||
|} | |} | ||
{| style="max-width: 36rem; margin: auto;" | {| style="max-width: 36rem; margin: auto;" | ||
|+'''The NixOS core ecosystem stack''' | |+'''The NixOS core ecosystem stack''' | ||
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| | |style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| | ||
<div style="font-size: 1.3em; font-weight: bold">NixOS</div> | <div style="font-size: 1.3em; font-weight: bold">NixOS</div> | ||
一个用Nixpkgs构建的linux发行版和配置系统 | |||
! | ! | ||
|- | |- | ||
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| | |style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| | ||
<div style="font-size: 1.3em; font-weight: bold">Nixpkgs</div> | <div style="font-size: 1.3em; font-weight: bold">Nixpkgs</div> | ||
一个巨大的,社区维护的软件仓库 | |||
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| | |style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| | ||
<div style="font-size: 1.3em; font-weight: bold">Hydra</div> | <div style="font-size: 1.3em; font-weight: bold">Hydra</div> | ||
一个基于Nix的可持续构建系统 | |||
|- | |- | ||
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%" colspan="2"| | |style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%" colspan="2"| | ||
<div style="font-size: 1.3em; font-weight: bold">Nix</div> | <div style="font-size: 1.3em; font-weight: bold">Nix</div> | ||
一个纯粹而实用的构建系统 | |||
|} | |} | ||
== NixOS的使用方式 == | |||
用户在自己的电脑上安装 NixOS 发行版,就像安装其他 Linux 发行版一样。阅读 https://search.nixos.org 和本维基来了解 Nixpgs 中的的软件包安装和配置选项。使用 Nix 语言在一个文本文件中,声明式的描述应安装哪些软件包以及如何配置系统。在终端运行两个命令行程序,来将系统转换到所描述的系统。像使用其他 Linux 系统一样使用该系统。 | |||
== NixOS 的开发 == | |||
''NixOS''的开发人员主要在''Nixpkgs''上工作,用''Nix''语言的文本文件描述软件包应该如何构建。经过同行评审后,这些修改将被整合到 ''Nixpkgs'' 中。其中一些软件包预先在''Hydra''上构建,以减少''NixOS''用户的更新时间。 | |||
[[Category:Pedias]] | [[Category:Pedias]] | ||
[[Category:NixOS]] | [[Category:NixOS]] | ||
[[Category:nix]] | [[Category:nix]] | ||
Latest revision as of 11:23, 30 August 2024
“Nix核心生态”是一组技术,旨在以可重复的方式构建、声明式配置和管理软件包和系统及其依赖项。它通过利用名为Nix Language的动态、函数式和惰性求值的领域特定语言(DSL)将函数式编程范式从程序转换为系统来实现这一点,用于指定可重现的软件建构。
此外,Nix社区开发了许多其他的 应用程序 (“Nix扩展生态”),这些应用程序使用并为核心技术提供支持。
官方生态
组件 | 手册(Manual) | 描述 | 用途 | 协议 |
---|---|---|---|---|
NixOS | NixOS Manual | 一个由 Nix 构建所有组件的 Linux 发行版,因此支持可重现的、声明式的全系统配置管理以及原子升级和回滚。 | 声明式配置桌面、服务器和集群。 | MIT |
Nixpkgs | Nixpkgs Manual | 最大的社区维护的 Nix 软件包和 NixOS 模块仓库,NixOS的标准发行版也托管在这里。 | 分享 Nix 软件包和 NixOS 模块 | MIT |
Hydra | Hydra Manual | 基于 Nix 的持续构建系统 | CI build farms | GPL-3.0 |
Nix | Nix Manual | 一款软件包管理器,能解析指定可重现构建的 Nix 表达式,并将结果与依赖关系树的哈希值一起放入存储地址,从而避免依赖关系地狱,并支持多版本安装和回滚。 | Linux 和 Darwin 中的可重现构建和软件包管理 | LGPL-2.1 |
NixOS
一个用Nixpkgs构建的linux发行版和配置系统 |
|
Nixpkgs
一个巨大的,社区维护的软件仓库 |
Hydra
一个基于Nix的可持续构建系统 |
Nix
一个纯粹而实用的构建系统 |
NixOS的使用方式
用户在自己的电脑上安装 NixOS 发行版,就像安装其他 Linux 发行版一样。阅读 https://search.nixos.org 和本维基来了解 Nixpgs 中的的软件包安装和配置选项。使用 Nix 语言在一个文本文件中,声明式的描述应安装哪些软件包以及如何配置系统。在终端运行两个命令行程序,来将系统转换到所描述的系统。像使用其他 Linux 系统一样使用该系统。
NixOS 的开发
NixOS的开发人员主要在Nixpkgs上工作,用Nix语言的文本文件描述软件包应该如何构建。经过同行评审后,这些修改将被整合到 Nixpkgs 中。其中一些软件包预先在Hydra上构建,以减少NixOS用户的更新时间。