Commit graph

12289 commits

Author SHA1 Message Date
Eelco Dolstra
e7c42e55e9
Fetch non-flake inputs using lazyFetch() 2022-06-02 16:26:00 +02:00
Eelco Dolstra
1c7d0b716d
Give a better error message in case of unlocked inputs 2022-06-02 16:15:57 +02:00
Eelco Dolstra
1395210a68
Typo 2022-06-02 14:46:19 +02:00
Eelco Dolstra
9d772bbf96
Remove 'nix flake archive'
This is because flakes are no longer substitutable.
2022-06-02 14:41:36 +02:00
Eelco Dolstra
76c71c015b
Typo 2022-06-02 14:04:03 +02:00
Eelco Dolstra
8a0a55fe12
Fix subflake handling
Relative 'path:' flake inputs now use the containing flake's
InputAccessor. This has the following implications:

* They're no longer locked in the lock file.

* They don't cause an additional copy to the store.

* They can reference the containing directory (i.e. a subflake can
  have an input '../foo', so long as it doesn't go outside the
  top-level containing flake).

Note: this is not a complete fix for subflake handling, since the lock
file currently makes it ambiguous what the containing flake is. We'll
probably need to add another field to the lock file for that.

Fixes #6352.
2022-06-02 13:48:55 +02:00
Eelco Dolstra
6ab3b86cf5
Return narHash when available 2022-06-01 14:20:38 +02:00
Eelco Dolstra
b01ee2a93d
nix flake init: Fix 2022-06-01 13:54:34 +02:00
Eelco Dolstra
da553de7b1
Fix template checking 2022-06-01 13:38:17 +02:00
Eelco Dolstra
6285c91619
nix profile upgrade: Handle unlockable inputs properly 2022-06-01 13:25:13 +02:00
Eelco Dolstra
f917970df8
Set locked flag 2022-06-01 13:16:23 +02:00
Eelco Dolstra
04d5417755
More rename mutable/immutable -> unlocked/locked 2022-06-01 11:39:28 +02:00
Eelco Dolstra
4bc65d45d6
Typo 2022-05-31 15:32:46 +02:00
Eelco Dolstra
98bdc18bf6
Merge remote-tracking branch 'origin/master' into lazy-trees 2022-05-31 15:26:03 +02:00
Eelco Dolstra
04a699b8a9
Typo 2022-05-31 10:38:03 +02:00
Eelco Dolstra
403201e011
Merge pull request #6537 from cole-h/update-flake
flake: use github: reference to nixpkgs
2022-05-31 08:30:42 +02:00
Eelco Dolstra
929ab5b195
Bump version 2022-05-30 21:11:20 +02:00
Eelco Dolstra
de13b44573
Branch 2.9 release notes 2022-05-30 20:42:55 +02:00
Eelco Dolstra
af23d38019
Merge pull request #6590 from edolstra/fix-noexcept
Fix noexcept violations
2022-05-30 17:45:44 +02:00
Eelco Dolstra
452dba510d
Mark nix-perl as a Perl module
The call to perl.withPackages in nix-serve expects this.
2022-05-30 14:10:26 +02:00
Eelco Dolstra
a72e75e6b6
Merge pull request #6589 from edolstra/respect-output-specified
Respect the outputSpecified attribute
2022-05-30 13:40:07 +02:00
Eelco Dolstra
948515efb7
Set meta.platforms
'nix-serve' in nixpkgs expects the nix package to set this.
2022-05-30 13:35:28 +02:00
Eelco Dolstra
6378f0bb32
RemoteStore::queryRealisationUncached(): Fix potential noexcept violation 2022-05-30 13:27:13 +02:00
Eelco Dolstra
b8faa83742
HttpBinaryCacheStore::getFile(): Don't throw an exception
This violates the noexcept specification.

Fixes #6445.
2022-05-30 13:24:04 +02:00
Eelco Dolstra
8e8e9d8705
Respect the outputSpecified attribute
E.g. 'nix build nixpkgs#libxml2.dev' will build the 'dev' output.
2022-05-30 11:34:47 +02:00
Eelco Dolstra
ec07a70979
Style fix 2022-05-27 11:25:05 +02:00
Eelco Dolstra
d67a2ae52d
Merge branch 'doc-redirects' of https://github.com/jtojnar/nix 2022-05-27 11:12:41 +02:00
Eelco Dolstra
b2d0bd4067
Merge pull request #6580 from trofi/fix-build-for-gcc-13
src/libutil/json.cc: add missing <cstdint> include for gcc-13
2022-05-26 21:07:47 +02:00
Sergei Trofimovich
b36d5172cb src/libutil/json.cc: add missing <cstdint> include for gcc-13
Without the change llvm build fails on this week's gcc-13 snapshot as:

    src/libutil/json.cc: In function 'void nix::toJSON(std::ostream&, const char*, const char*)':
    src/libutil/json.cc:33:22: error: 'uint16_t' was not declared in this scope
       33 |             put(hex[(uint16_t(*i) >> 12) & 0xf]);
          |                      ^~~~~~~~
    src/libutil/json.cc:5:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
        4 | #include <cstring>
      +++ |+#include <cstdint>
        5 |
2022-05-26 18:37:15 +01:00
Jan Tojnar
26d1877d6e doc: Add redirects for the DocBook manual
There are still many links to the old manual on the web and
having them end up on the Introduction page is a bad user experience.
2022-05-26 18:17:21 +02:00
Jan Tojnar
a793863b97 doc: Manually insert some anchors 2022-05-26 18:17:21 +02:00
Jan Tojnar
7708a34a51 doc: Add anchors to long lists
Added using the following sed scripts:

- For command-ref/opt-common.md:

    s~- `(--?)([^`]+)`~- [`\1\2`]{#opt-\2}~g

- For expressions/builtin-constants.md:

    s~- `(builtins\.?)([^`]+)`~- [`\1\2`]{#builtins-\2}~g

- For expressions/advanced-attributes.md

    s~^  - `([^`]+)`~  - [`\1`]{#adv-attr-\1}~g

  and manually adjusted outputHashAlgo & outputHashMode.

- For glossary.md

    s~^  - (`([^`]+)`|(.+)) ?\\~  - [\1]{#gloss-\2\3}\\~g;
    s~(gloss-\w+) ~\1-~g

  and manually adjusted anchors for Nix expression, user environment, NAR, ∅ and ε.

- For command-ref/env-common.md

    s~^  - `([^`]+)`~  - [`\1`]{#env-\1}~g'
2022-05-26 18:17:21 +02:00
Jan Tojnar
3272afa17b doc: Port anchors preprocessor to jq script
Python is only pulled into the build closure by Mercurial, which might end up being removed.
Let’s port the script to jq, which is more likely to stay.
2022-05-26 18:17:21 +02:00
Jan Tojnar
4de84e095d doc: Introduce pre-processor for adding anchors to text
It is now possible to use the following syntax to insert anchors into the text:

    []{#anchor-name}

The anchor will allow linking to the location it is placed by appending #anchor-name to the URL.

Additionally, it is possible to create a link pointing to its own location by adding text between the square brackets:

    [`--add-root`]{#opt-add-root}
2022-05-26 17:54:15 +02:00
Eelco Dolstra
5bcd0f09b3
Merge pull request #6578 from edolstra/remove-perl
Remove unused Perl dependency
2022-05-26 15:53:26 +02:00
Eelco Dolstra
5b27040203
Remove unused Perl dependency 2022-05-26 14:49:17 +02:00
Eelco Dolstra
dfbb9a997f
Merge remote-tracking branch 'origin/master' into lazy-trees 2022-05-26 14:11:46 +02:00
Eelco Dolstra
1e67582d75
Merge pull request #6576 from hercules-ci/daemon-increase-socket-backlog
Fix `Connection refused` on daemon socket
2022-05-26 12:43:45 +02:00
Eelco Dolstra
8f4548d401
Tweak IN_NIX_SHELL description 2022-05-26 12:40:01 +02:00
Eelco Dolstra
9acc770ce4
Remove pre-C++11 hackiness 2022-05-26 12:40:01 +02:00
Robert Hensing
c156155239 createUnixDomainSocket: listen(unix, 5 -> 100)
This solves the error

    error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': Connection refused

on build farm systems that are loaded but operating normally.

I've seen this happen on an M1 mac running a loaded hercules-ci-agent.
Hercules CI uses multiple worker processes, which may connect to
the Nix daemon around the same time. It's not unthinkable that
the Nix daemon listening process isn't scheduled until after 6
workers try to connect, especially on a system under load with
many workers.

Is the increase safe?

The number is the number of connections that the kernel will buffer
while the listening process hasn't `accept`-ed them yet.
It did not - and will not - restrict the total number of daemon
forks that a client can create.

History

The number 5 has remained unchanged since the introduction in
nix-worker with 0130ef88ea in 2006.
2022-05-26 11:24:04 +02:00
Eelco Dolstra
762fa2b2ff
Merge pull request #6570 from edolstra/eof-in-string
Handle EOFs in string literals correctly
2022-05-26 08:13:39 +02:00
Eelco Dolstra
5f097fbcef
Merge pull request #5416 from bburdette/debug-exploratory-PR
--debugger flag
2022-05-26 08:12:19 +02:00
Ben Burdette
9068d32e12 remove parens from repl help 2022-05-25 12:55:58 -06:00
Ben Burdette
9a5ea6c359
Merge branch 'master' into debug-exploratory-PR 2022-05-25 10:41:10 -06:00
Ben Burdette
6031a36208 add --debugger to rl-next list 2022-05-25 10:38:13 -06:00
Ben Burdette
b4c24a29c6 back to ref<EvalState> in NixRepl 2022-05-25 10:21:20 -06:00
Eelco Dolstra
27ebb97d0a
Handle EOFs in string literals correctly
We can't return a STR token without setting a valid StringToken,
otherwise the parser will crash.

Fixes #6562.
2022-05-25 17:58:13 +02:00
Eelco Dolstra
d8398d33c9
Typo 2022-05-25 15:29:27 +02:00
Eelco Dolstra
89a8955e79
Merge remote-tracking branch 'origin/file-fetcher' 2022-05-25 15:15:16 +02:00