repowisenixos/nixpkgs

Architecture of nixos/nixpkgs

nixos/nixpkgs is 2,933 source files holding 3,632 symbols across 6 modules, written mainly in Shell, Python, C. The largest module is pkgs, with 2,253 files, and 35 files are entry points into the dependency graph.

How nixpkgs fits together

The pkgs directory holds the package definitions and makes up the largest part of the repository. Each package is written as a Nix expression that the Nix package manager reads to build and install software. The nixos directory contains the code for NixOS, the Linux distribution that Nixpkgs also implements. The lib directory holds helper code, and the doc directory holds the manuals, with entry points such as doc/packages/index.md and doc/modules/index.md. The ci directory holds the continuous integration scripts, including the entry point ci/github-script/run. Hydra builds and tests the expressions on unstable/master, and successful builds are published to a cache.

Largest modules

  • pkgs: 2,253 files
  • nixos: 351 files
  • doc: 200 files
  • maintainers: 53 files
  • .github: 37 files
  • ci: 23 files
  • lib: 12 files
  • root: 2 files

Languages

By file count: Shell 1,139 files, Python 281 files, C 67 files, Rust 38 files, JavaScript 37 files, C++ 25 files.

More on nixpkgs: summary and FAQ, codebase overview, code health.