This category hierarchy is partially deprecated and will be migrated away over time.
The new `pkgs/by-name` directory ([docs](./by-name/README.md)) should be preferred instead.
The category hierarchy may still be used for packages that should be imported using an alternate `callPackage`, such as `python3Packages.callPackage` or `libsForQt5.callPackage`.
If that is the case for a new package, here are some rules for picking the right category.
Many packages fall under several categories; what matters is the _primary_ purpose of a package.
For example, the `libxml2` package builds both a library and some tools; but it’s a library foremost, so it goes under `pkgs/development/libraries`.
<details>
<summary>Categories</summary>
**If it’s used to support _software development_:**
- **If it’s a _library_ used by other packages:**
- `development/libraries` (e.g. `libxml2`)
- **If it’s a _compiler_:**
- `development/compilers` (e.g. `gcc`)
- **If it’s an _interpreter_:**
- `development/interpreters` (e.g. `guile`)
- **If it’s a (set of) development _tool(s)_:**
- **If it’s a _parser generator_ (including lexers):**
- `development/tools/parsing` (e.g. `bison`, `flex`)
- **If it’s a _build manager_:**
- `development/tools/build-managers` (e.g. `gnumake`)
- **If it’s a _language server_:**
- `development/tools/language-servers` (e.g. `ccls` or `nil`)
- **Else:**
- `development/tools/misc` (e.g. `binutils`)
- **Else:**
- `development/misc`
**If it’s a (set of) _tool(s)_:**
(A tool is a relatively small program, especially one intended to be used non-interactively.)
- **If it’s for _networking_:**
- `tools/networking` (e.g. `wget`)
- **If it’s for _text processing_:**
- `tools/text` (e.g. `diffutils`)
- **If it’s a _system utility_, i.e., something related or essential to the operation of a system:**
- `tools/system` (e.g. `cron`)
- **If it’s an _archiver_ (which may include a compression function):**
- `tools/archivers` (e.g. `zip`, `tar`)
- **If it’s a _compression_ program:**
- `tools/compression` (e.g. `gzip`, `bzip2`)
- **If it’s a _security_-related program:**
- `tools/security` (e.g. `nmap`, `gnupg`)
- **Else:**
- `tools/misc`
**If it’s a _shell_:**
- `shells` (e.g. `bash`)
**If it’s a _server_:**
- **If it’s a web server:**
- `servers/http` (e.g. `apache-httpd`)
- **If it’s an implementation of the X Windowing System:**
- `servers/x11` (e.g. `xorg` — this includes the client libraries and programs)
- **Else:**
- `servers/misc`
**If it’s a _desktop environment_:**
- `desktops` (e.g. `kde`, `gnome`, `enlightenment`)
**If it’s a _window manager_:**
- `applications/window-managers` (e.g. `awesome`, `stumpwm`)
**If it’s an _application_:**
A (typically large) program with a distinct user interface, primarily used interactively.
- **If it’s a _version management system_:**
- `applications/version-management` (e.g. `subversion`)
- **If it’s a _terminal emulator_:**
- `applications/terminal-emulators` (e.g. `alacritty` or `rxvt` or `termite`)
- **If it’s a _file manager_:**
- `applications/file-managers` (e.g. `mc` or `ranger` or `pcmanfm`)
- **If it’s for _video playback / editing_:**
- `applications/video` (e.g. `vlc`)
- **If it’s for _graphics viewing / editing_:**
- `applications/graphics` (e.g. `gimp`)
- **If it’s for _networking_:**
- **If it’s a _mailreader_:**
- `applications/networking/mailreaders` (e.g. `thunderbird`)
- **If it’s a _newsreader_:**
- `applications/networking/newsreaders` (e.g. `pan`)
- **If it’s a _web browser_:**
- `applications/networking/browsers` (e.g. `firefox`)
- **Else:**
- `applications/networking/misc`
- **Else:**
- `applications/misc`
**If it’s _data_ (i.e., does not have a straight-forward executable semantics):**
- **If it’s a _font_:**
- `data/fonts`
- **If it’s an _icon theme_:**
- `data/icons`
- **If it’s related to _SGML/XML processing_:**