Jump to content

Nixpkgs

From NixOS Wiki
Revision as of 14:29, 27 September 2025 by Loxodoromy (talk | contribs)

Nixpkgs是最大的Nix包仓库和NixOS模块。该仓库存储在GitHub上,由社区维护,并得到NixOS基金会的官方支持。

搜索可用的包和选项,见搜索包

正如NixOS 24.11发行公告所强调的,“NixOS已经被认为是最与时俱进的发行版和包最多的发行版”。Nixpkgs能成为杰出的Linux包仓库,归功于社区的持续贡献。

子页面

这里有一些关于操作nixpkgs的文章:

发行版本

Main article: Channel branches

托管在Nixpkgs上的包和模块通过多个频道分支分发,以供特定用途。实际上,它们的区别在于更新必须在官方nixos.org Hydra实例上通过的测试等级,以及它们的更新数量。

对于NixOS用户,nixos-unstable频道分支是滚动发行版,包通过构建测试和虚拟机上的集成测试,并通过操作系统方面的测试(这意味着测试对象还有X服务器KDE、各种服务器和低级细节如安装引导加载程序(bootloaders)和运行NixOS安装步骤之类)。

对于独立Nix用户,nixpkgs-unstable频道分支是滚动发行版,包只通过基本的构建测试,持续更新。

Both NixOS and Nix users can use stable channel branches (see https://status.nixos.org/ for the current channels) to receive only conservative updates for fixing critical bugs and security vulnerabilities. Stable channel branches are released bi-annually at the end of May and the end of November.

在NixOS上使用稳定频道,用户体验可与其他Linux发行版相媲美。

Alternatives

Due to the fact that Nixpkgs is only a Nix expression, it is possible to extend or replace the logic with your own sources. In fact, there are a number of extensions as well as complete replacements for Nixpkgs, see the Alternative Package Sets article.