1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
nix/doc/manual
Valentin Gagarin a0d3003bf2 glossary: refine the definition of "package"
This change follows the definition from aptitude, but using precise notions from Nix:

> package managers deal with packages: collections of files that are
> bundled together and can be installed and removed as a group.
> [...]
> If a package A depends upon another package B, then B is required
> for A to operate properly.
> [...]
> The job of a package manager is to present an interface which assists
> the user in managing the collection of packages installed on his or her system.
>
> -- <https://www.debian.org/doc/manuals/aptitude/pr01s02.en.html>

An interesting addition:

> Packages are abstractions defining the granularity at which users can act
> (add, remove, upgrade, etc.) on available software.
> A distribution is a collection of packages maintained (hopefully) coherently.
>
> -- Package Upgrades in FOSS Distributions: Details and Challenges
>    (Roberto Di Cosmo, Stefano Zacchiroli; 2009) <https://arxiv.org/pdf/0902.1610>

Notably these quotes and this change don't say anything about installation,
or what it means for software to be available. In practice, this is
handled downstream, e.g. in NixOS or Home Manager. Nix historically
provides rudimentary facilities for package management such as
`nix-env`, but I claim they are widely agreed upon being discouraged,
with plenty of arguments provided in <https://stop-using-nix-env.privatevoid.net>.

Similarly, the specific structure of packages is determined downstream,
since Nix is policy-free:

> Nix is policy-free; it provides mechanisms to implement various deployment policies, but does not enforce a specific one.
>
> -- The Purely Functional Software Deployment Model (Eelco Dolstra; 2006) <https://edolstra.github.io/pubs/phd-thesis.pdf>

Specifically, Nix mechanisms do not define what a package is supposed to be:

> It's worth noting that the Nix language is intended as a DSL for package and configuration management, but it has no notions of "packages" or "configurations".
>
> -- <https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0dbc00d>

This is why we say, Nix *allows* denoting packages in a certain way, but
doesn't enforce any particular way.
2025-04-10 22:50:28 +02:00
..
rl-next release notes: 2.28.0 2025-04-06 17:03:34 -04:00
source glossary: refine the definition of "package" 2025-04-10 22:50:28 +02:00
theme doc/manual: don't need to copy highlight.js manually 2021-08-04 19:47:05 -07:00
.version Build the manual with Meson 2024-10-09 11:58:17 -04:00
anchors.jq doc: Port anchors preprocessor to jq script 2022-05-26 18:17:21 +02:00
book.toml.in Include the Nix version in the title of the manual 2025-02-24 14:49:58 +01:00
custom.css doc/manual: fix misaligned icons in custom.css (#11296) 2024-08-14 14:27:12 +02:00
generate-builtins.nix Format .nix files 2025-01-24 17:04:02 +01:00
generate-deps.py Build the manual with Meson 2024-10-09 11:58:17 -04:00
generate-manpage.nix Format .nix files 2025-01-24 17:04:02 +01:00
generate-settings.nix Format .nix files 2025-01-24 17:04:02 +01:00
generate-store-info.nix Format .nix files 2025-01-24 17:04:02 +01:00
generate-store-types.nix Format .nix files 2025-01-24 17:04:02 +01:00
generate-xp-features-shortlist.nix Format .nix files 2025-01-24 17:04:02 +01:00
generate-xp-features.nix Format .nix files 2025-01-24 17:04:02 +01:00
meson.build Include the Nix version in the title of the manual 2025-02-24 14:49:58 +01:00
package.nix Format .nix files 2025-01-24 17:04:02 +01:00
quote-literals.xsl Generate release notes again 2014-03-12 14:24:29 +01:00
redirects.js glossary: refine the definition of "package" 2025-04-10 22:50:28 +02:00
remove_before_wrapper.py Build the manual with Meson 2024-10-09 11:58:17 -04:00
render-manpage.sh Build the manual with Meson 2024-10-09 11:58:17 -04:00
substitute.py Rename doc/manual{src -> source} 2024-10-14 11:21:24 -04:00
utils.nix Format .nix files 2025-01-24 17:04:02 +01:00