Nix/doc/manual/src
Robert Hensing 7e5fa5c25c doc/glossary: Define package and package attribute set
A small step towards https://github.com/NixOS/nix/issues/6507

I believe this incomplete definition is one that can be agreed on.
It would be nice to define more, but considering that the issue
also proposes changes to the design, I believe we should hold off
on those.

As for the wording, we're dealing with some very general and vague
terms, that have to be treated with exactly the right amount of
vagueness to be effective.

I start out with a fairly abstract definition of package.
1. to establish a baseline so we know what we're talking about
2. so that we can go in and clarify that we have an extra, Nix-specific
   definition.

"Software" is notoriously ill-defined, so it makes a great qualifier
for package, which we don't really want to pin down either, because
that would just get us lost in discussion.
We can come back to this after we've done 6057 and a few years in a
desert cave.

Then comes the "package attribute set" definition.
I can already hear Valentin say "That's not even Nix's responsibility!"
and on some days I might even agree.
However, in our current reality, we have `nix-env`, `nix-build` and
`nix profile`, which query the `outputName` attribute - among others -
which just don't exist in the derivation.

For those who can't believe what they're reading:

    $ nix-build --expr 'with import ./. {}; bind // {outputName = "lib";}' --no-out-link
    this path will be fetched (1.16 MiB download, 3.72 MiB unpacked):
      /nix/store/rfk6klfx3z972gavxlw6iypnj6j806ma-bind-9.18.21-lib
    copying path '/nix/store/rfk6klfx3z972gavxlw6iypnj6j806ma-bind-9.18.21-lib' from 'https://cache.nixos.org'...
    /nix/store/rfk6klfx3z972gavxlw6iypnj6j806ma-bind-9.18.21-lib

and let me tell you that bind is not a library.

So anyway, that's also proof of why calling this a "derivation attrset" would be wrong, despite the type attribute.
2024-01-13 20:00:06 +01:00
..
advanced-topics Avoid <name>/<name> in documentation URLs 2023-11-30 09:37:32 -05:00
architecture Avoid <name>/<name> in documentation URLs 2023-11-30 09:37:32 -05:00
command-ref Restore ambiguous value printer for nix-instantiate 2024-01-11 16:34:36 -08:00
contributing Document unit tests in hacking.md 2024-01-12 10:47:49 -08:00
figures Move figures 2020-07-24 12:58:31 +02:00
installation deduplicate installation instructions (#9507) 2024-01-06 22:45:25 +01:00
language Change "dervation" typos to "derivation" 2023-12-26 17:12:28 -05:00
package-management Avoid <name>/<name> in documentation URLs 2023-11-30 09:37:32 -05:00
protocols Avoid <name>/<name> in documentation URLs 2023-11-30 09:37:32 -05:00
release-notes fix up release note 2023-12-04 16:42:32 +01:00
store fix links in stores overview 2023-12-02 00:56:41 +01:00
glossary.md doc/glossary: Define package and package attribute set 2024-01-13 20:00:06 +01:00
introduction.md Convert short nix options to long ones 2023-05-17 08:10:30 +01:00
quick-start.md deduplicate installation instructions (#9507) 2024-01-06 22:45:25 +01:00
SUMMARY.md.in Document each store type on its own page 2023-12-01 01:27:52 +01:00