wiki/notebook/tools.nix.nixpkgs.org
Gabriel Arazas 5242780327 Revise Nix-related notes
Added more notes as I developed the Guix overlay for NixOS over time. It
does have a nice experience, overall (albeit clunky one due to the documentation).
2022-10-25 16:58:19 +08:00

1.6 KiB

nixpkgs

The main repository of what Nix package manager mainly offers. This is where you get most of the updates from whether you're using NixOS or in a foreign distro to update the list of packages.

It contains a lot of stuff such as…

  • Massive set of package definitions (about 80k as of 2022-09-03) for various applications and dependencies.
  • roam:NixOS modules for various programs, services, and the basis for NixOS, in general.
  • A library that extends the builtin functions from Nix language.

    • Includes a way to painlessly define derivations to compile with stdenv.mkDerivation.
    • Various support for easily packaging projects made in different programming languages are also built on top of mkDerivation.
  • Various mechanisms to make packaging easier such as nixpkgs setup hooks.

Being familiar with nixpkgs allows you to understand NixOS better and define packages in a more idiomatic way. It's a large repository with Nix code so it is a nice way to learn more about Nix.

Among other things, it is made to be extensible as seen with features like…

  • Nix overrides and overlays that allows fine-grained changes to package definitions and changes part of the package set that nixpkgs has.
  • Its standard library can be extended further with lib.extends.