Commit Graph

2155 Commits

Author SHA1 Message Date
Valentin Gagarin 8d4890c3f8
catch multiple use of link reference (#9937) 2024-02-04 21:45:10 +00:00
Valentin Gagarin 8b873edcca
fix anchor link; less weird link texts (#9936) 2024-02-04 21:15:20 +00:00
Valentin Gagarin 721fddac2f
use the right heading level (#9935) 2024-02-04 21:03:13 +00:00
Robert Hensing 4072a8fea0
Merge pull request #9867 from hercules-ci/issue-912
#912 allow leading period
2024-01-31 19:10:59 +01:00
Robert Hensing f1b4663805 Disallow store path names that are . or .. (plus opt. -)
As discussed in the maintainer meeting on 2024-01-29.

Mainly this is to avoid a situation where the name is parsed and
treated as a file name, mostly to protect users.
.-* and ..-* are also considered invalid because they might strip
on that separator to remove versions. Doesn't really work, but that's
what we decided, and I won't argue with it, because .-* probably
doesn't seem to have a real world application anyway.
We do still permit a 1-character name that's just "-", which still
poses a similar risk in such a situation. We can't start disallowing
trailing -, because a non-zero number of users will need it and we've
seen how annoying and painful such a change is.

What matters most is preventing a situation where . or .. can be
injected, and to just get this done.
2024-01-31 18:35:19 +01:00
Robert Hensing b13e6a76b4 parseStorePath: Support leading period 2024-01-31 18:35:19 +01:00
Eelco Dolstra 652f334f87 Edit release notes 2024-01-29 17:51:21 +01:00
Eelco Dolstra 3089bce41b release notes: 2.20.0 2024-01-29 17:14:17 +01:00
Eelco Dolstra 0070400809 maintainers/release-notes: Include changelog-d
Otherwise it quietly generates an empty rl-<version>.md
2024-01-29 17:13:48 +01:00
Eelco Dolstra baff34d728 Don't include store docs in every manpage 2024-01-29 16:30:29 +01:00
Valentin Gagarin 44a0d04483
add missing link (#9869) 2024-01-29 05:56:19 +01:00
Robert Hensing 40254092dd
Merge pull request #9770 from hercules-ci/refactor-rename-derivation-isPure
Refactor rename derivation type `isPure`
2024-01-27 11:24:20 +01:00
Robert Hensing 6a99c18c30 doc/glossary: Define impure derivation 2024-01-27 11:00:10 +01:00
Robert Hensing 5b7bfd2d6b
Merge pull request #9754 from 9999years/print-value-when-coercion-fails
Print the value in `error: cannot coerce` messages
2024-01-24 12:48:39 +01:00
tomberek 1c260fa6d1
Merge pull request #9481 from iFreilicht/disallow-nix-search-without-search-terms
nix search: Disallow empty regex
2024-01-23 20:59:52 -05:00
tomberek 775d59f1fa
Merge pull request #8893 from 9999years/fix-8882
Log what `nix flake check` does
2024-01-23 20:38:23 -05:00
Rebecca Turner 83bb494a30
Print the value in `error: cannot coerce` messages
This extends the `error: cannot coerce a TYPE to a string` message
to print the value that could not be coerced. This helps with debugging
by making it easier to track down where the value is being produced
from, especially in errors with deep or unhelpful stack traces.
2024-01-23 15:15:41 -08:00
Robert Hensing 5f72a97092
Merge pull request #9753 from 9999years/print-value-on-type-error
Print the value in `value is X while a Y is expected` error
2024-01-22 22:18:16 +01:00
John Ericson 50ce3832dc
Merge pull request #9512 from hercules-ci/release-notes-bdwgc-traceable-allocator-patch
prerequisites-source: Add bdwgc-traceable-allocator-patch
2024-01-22 11:58:43 -05:00
Rebecca Turner cb7fbd4d83
Print value on type error
Adds the failing value to `value is <TYPE> while a <TYPE> is expected`
error messages.
2024-01-22 08:56:02 -08:00
Eelco Dolstra 16ccca2e86
Merge pull request #9703 from fricklerhandwerk/upgrade-no-channel
don't show `nix-channel` in upgrade instructions
2024-01-22 14:46:47 +01:00
John Ericson a0b86b3160
Merge pull request #9760 from hercules-ci/doc-glossary-nix-expression
doc/glossary: Nix expression can be language expression
2024-01-22 08:26:01 -05:00
Théophane Hufschmitt c8d33bca8d
Merge pull request #9822 from obsidiansystems/algo-vs-hash-algo
Start standardizing hash algo flags
2024-01-22 11:08:24 +01:00
John Ericson da1aae2d06
Merge pull request #9821 from obsidiansystems/fix-typo
Fix typo in upcomming release notes
2024-01-20 18:03:25 -05:00
John Ericson 202c5e2afc Start standardizing hash algo flags
Do this if we want to do `--hash-algo` everywhere, and not `--algo` for
hash commands.

The new `nix hash convert` is updated. Deprecated new CLI commands are
left as-is (`nix hash path` needs to be redone and is also left as-is).
2024-01-20 17:29:35 -05:00
John Ericson a93b204c27
Merge pull request #9348 from obsidiansystems/json-formats
Document JSON formats
2024-01-20 17:22:39 -05:00
John Ericson 65294fe5fe Fix typo in upcomming release notes
Thanks @cole-h for finding in https://github.com/NixOS/nix/pull/9815#discussion_r1460604130
2024-01-20 17:07:21 -05:00
John Ericson edf3ecc497 Document JSON formats
Good to document these formats separately from commands that happen to
use them.

Eventually I would like this and `builtins.derivation` to refer to a
store section on derivations that is authoritative, but that doesn't yet
exist, and will take some time to make. So I think we're just best off
merging this now as is.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-20 17:03:47 -05:00
Rebecca Turner 561a56cd13
Add release notes 2024-01-20 00:04:06 -08:00
John Ericson 356352c370 Add missing `--hash-algo` flag to `nix store add` 2024-01-19 23:11:18 -05:00
Robert Hensing 4e8483d09d
Merge pull request #9792 from fricklerhandwerk/move-section
move section on make variables
2024-01-19 00:55:33 +01:00
Robert Hensing 14f470ec4e
doc/hacking.md: Hint short option `make -e`
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-19 00:32:30 +01:00
Valentin Gagarin 28eb406834 reword section on make variables
- use one line per sentence
- use imperative for instructions
- add link to Make documentation
2024-01-17 04:39:26 +01:00
Valentin Gagarin f134dbdffb move section on make variables
it should be after the general build instructions, as it goes into more detail.
2024-01-17 04:23:16 +01:00
Valentin Gagarin 55da939424 fix typo 2024-01-17 02:57:11 +01:00
Robert Hensing 2a3c5e6b8b
Merge pull request #9480 from NixOS/libfetchers-git-exportIgnore
libfetchers/git: Support export-ignore
2024-01-16 23:03:46 +01:00
Robert Hensing 51f524c629
Merge pull request #9755 from 9999years/printer-followup
Printer followup
2024-01-16 22:35:08 +01:00
Robert Hensing baea5f42c6
doc/glossary: Simplify software package definition
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-16 14:50:53 +01:00
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
Robert Hensing e838ac98d4 doc/glossary: Nix expression can be language expression 2024-01-13 19:42:05 +01:00
Qyriad cbd5553d57
doc: provide context in glossary definitions (#9378) 2024-01-13 12:20:08 +01:00
Rebecca Turner f73e50144f
Clarify ambiguity in `nix-instantiate` man page 2024-01-12 13:53:45 -08:00
Rebecca Turner 2d96c7a51f
Remove outdated reference to `y` in `nix-instantiate` man page 2024-01-12 11:27:31 -08:00
Rebecca Turner b29be1ff57
Document unit tests in hacking.md 2024-01-12 10:47:49 -08:00
Eelco Dolstra 8c7e2ed77c Update release notes 2024-01-12 16:21:07 +01:00
Robert Hensing 71d08af15b rl-next: Add *general* note about git fetcher reimpl 2024-01-12 15:31:53 +01:00
Rebecca Turner df84dd4d8d
Restore ambiguous value printer for `nix-instantiate`
The Nix team has requested that this output format remain unchanged.
I've added a warning to the man page explaining that `nix-instantiate
--eval` output will not parse correctly in many situations.
2024-01-11 16:34:36 -08:00
Valentin Gagarin 6a243e5ed2
fix an old lost direct (#9458)
this part must have been moved quite a while ago, but apparently so far
no one noticed
2024-01-08 19:38:36 +01:00
Valentin Gagarin fe751fbde2 don't show channels in upgrade instructions
channels make everything more stateful, and therefore more complicated
and potentially confusing, but aren't needed for this task, so don't encourage their use.
2024-01-07 01:07:11 +01:00
Valentin Gagarin 8e865f3aba
deduplicate installation instructions (#9507)
* deduplicate installation instructions

- reorder sections to present pinned installation more prominently
- remove outdated notes on the macOS installer rework
- update instructions to handle the installer tarball

Co-authored-by: Travis A. Everett <travis.a.everett@gmail.com>
2024-01-06 22:45:25 +01:00