Commit Graph

15004 Commits

Author SHA1 Message Date
Eelco Dolstra
184a20ec04
Merge pull request #9334 from fricklerhandwerk/backport-2.18-fix-anchors
backport fix for the `--help` output to 2.18
2023-11-16 15:02:18 +01:00
Valentin Gagarin
a68bf15fe6 backport fix for the --help output 2023-11-10 19:22:42 +01:00
John Ericson
78fd621397
Merge pull request #9122 from NixOS/backport-9095-to-2.18-maintenance
[Backport 2.18-maintenance] StorePath: reject names starting with '.'
2023-10-09 10:27:51 -04:00
edef
82040664e4 StorePath: reject names starting with '.'
This has been the behaviour before Nix 2.4. It was dropped in a rewrite
in 759947bf72, allowing the creation of
store paths that aren't considered valid by older Nix versions or other
Nix tooling.

Nix 2.4 didn't ship in NixOS until 22.05, and stdenv.mkDerivation in
nixpkgs drops leading periods since April 2022, so it's unlikely anyone
is relying on the current lax behaviour.

Closes #9091.

Change-Id: I4a57bd9899e1b0dba56870ae5a1b680918a18ce9
(cherry picked from commit 24bda0c7b3)
2023-10-08 12:21:18 +00:00
Eelco Dolstra
f5f4de6a55
Merge pull request #9086 from NixOS/backport-9081-to-2.18-maintenance
[Backport 2.18-maintenance] Revert "Adapt scheduler to work with dynamic derivations"
2023-10-02 17:05:54 +02:00
John Ericson
72b65981f9 Revert "Adapt scheduler to work with dynamic derivations"
This reverts commit 5e3986f59c. This
un-implements RFC 92 but fixes the critical bug #9052 which many people
are hitting. This is a decent stop-gap until a minimal reproduction of
that bug is found and a proper fix can be made.

Mostly fixed #9052, but I would like to leave that issue open until we
have a regression test, so I can then properly fix the bug (unbreaking
RFC 92) later.

(cherry picked from commit 8440afbed7)
2023-10-02 15:05:23 +00:00
Eelco Dolstra
7e2399b123
Merge pull request #9079 from hercules-ci/backport-9022-to-2.18-maintenance
[Backport 2.18-maintenance] pathExists: isDir when endswith /.
2023-10-02 14:08:25 +02:00
Robert Hensing
860f64c345 pathExists: isDir when endswith /.
(cherry picked from commit f8a3893e8d)
2023-10-01 13:58:20 +01:00
Eelco Dolstra
9e212344f9
Merge pull request #9036 from NixOS/backport-9026-to-2.18-maintenance
[Backport 2.18-maintenance] flake: complete update to 23.05
2023-09-25 15:05:25 +02:00
Gerg-L
277ba90779 flake: complete update to 23.05
(cherry picked from commit f264d9ff08)
2023-09-25 08:43:54 +00:00
Robert Hensing
a4445859ab
Merge pull request #9009 from NixOS/backport-9008-to-2.18-maintenance
[Backport 2.18-maintenance] Re-enable systemd-nspawn test
2023-09-21 13:13:16 +02:00
Cole Helbling
f3005632c4 Re-enable systemd-nspawn test
It was disabled in c6953d1ff6 because
a recent Nixpkgs bump brought in a new systemd which changed how
systemd-nspawn worked.

As far as I can tell, the issue was caused by this upstream systemd
commit:
b71a0192c0

Bind-mounting the host's `/sys` and `/proc` into the container's
`/run/host/{sys,proc}` fixes the issue and allows the test to succeed.

(cherry picked from commit 883092e3f7)
2023-09-20 17:03:47 +00:00
Eelco Dolstra
40a014416b Bump version 2023-09-20 15:20:52 +02:00
Eelco Dolstra
44fb119218 Mark official release 2023-09-20 12:49:01 +02:00
Eelco Dolstra
d40e91440d
Merge pull request #9002 from NixOS/release-notes
Release notes
2023-09-20 12:41:30 +02:00
Eelco Dolstra
10ad052f7d Release notes 2023-09-20 11:42:49 +02:00
Eelco Dolstra
a4a7eca679
Merge pull request #8991 from NixOS/dependabot/github_actions/docker/login-action-3
Bump docker/login-action from 2 to 3
2023-09-20 11:37:36 +02:00
Eelco Dolstra
6ce358b13c
Merge pull request #8569 from vcunat/p/flake-update
flake: update nixpkgs: 22.11 -> 23.05
2023-09-20 11:30:55 +02:00
Eelco Dolstra
b6b2a0aea9 Use "touch -h"
https://hydra.nixos.org/build/235888160

This is needed because Nixpkgs now contains dangling symlinks
(pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/pkgs/by-name/fo/foo/foo.nix).
2023-09-19 17:21:07 +02:00
Eelco Dolstra
c6953d1ff6 Disable systemd-nspawn test
This is broken because of a change in systemd in NixOS 23.05. It fails
with

  Failed to mount proc (type proc) on /proc (MS_NOSUID|MS_NODEV|MS_NOEXEC ""): Operation not permitted
2023-09-19 17:03:21 +02:00
Eelco Dolstra
126e2645f2 Disable rapidcheck tests in the coverage run
https://hydra.nixos.org/build/233688539
2023-09-19 16:04:00 +02:00
Eelco Dolstra
c8afa01bc2 Try aws-sdk-cpp fix 2023-09-19 14:51:50 +02:00
Eelco Dolstra
c451b48993 Merge remote-tracking branch 'origin/master' into p/flake-update 2023-09-19 13:33:56 +02:00
dependabot[bot]
dd3bf4dbda
Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 22:16:55 +00:00
Théophane Hufschmitt
2a52ec4e92
Merge pull request #7661 from henrik-ch/repl-doc
improved help command listing.
2023-09-14 16:43:02 +02:00
Théophane Hufschmitt
b99fdcf8db
Merge pull request #8959 from maralorn/print-parent
Print parent activity field in json log
2023-09-13 11:41:47 +02:00
Emil Nikolov
21783cff16
docs: make the nix develop --command example unambiguous (#8952) 2023-09-12 17:15:36 +02:00
John Ericson
d98337d18f
Merge pull request #8962 from mkenigs/dead-code
Drop dead code
2023-09-11 10:03:32 -07:00
Matthew Kenigsberg
07545add53
Drop dead code
localPath is unused
2023-09-10 12:18:03 +02:00
maralorn
682dbcab9a
Print parent activity field in json log 2023-09-09 18:01:10 +02:00
Emil Nikolov
2cdc9c32e7
docs: fixed the default priority of nix-env --install (#8945) 2023-09-09 06:54:39 +00:00
thenbe
5473e10249
fix: nix shell multiple commands example (#8950)
The `-c` flag belongs to `sh` not `nix shell`. As it stands, the command errors with:

```
$ nix shell nixpkgs#gnumake --command sh --command "cd src && make"
sh: --command: invalid option
```

https://github.com/NixOS/nix/pull/8276 was good for readability, but it missed this since that PR used a find/replace script.
2023-09-07 22:25:32 +00:00
Robert Hensing
5f55c33917
Merge pull request #8944 from fricklerhandwerk/fix-anchor
fix invalid anchor link
2023-09-07 17:58:16 +02:00
Robert Hensing
e34493a70e
Merge pull request #4628 from obsidiansystems/dynamic-drvs
Dynamic derivations RFC 92
2023-09-07 17:33:02 +02:00
John Ericson
37d6fff113
Merge pull request #8938 from obsidiansystems/better-drv-parsing
Improve derivation parsing
2023-09-07 11:07:02 -04:00
John Ericson
80d7994f52 Special-case error message to add extra information
The Derivation parser and old ATerm unfortunately leaves few ways to get
nice errors when an old version of Nix encounters a new version of the
format. The most likely scenario for this to occur is with a new client
making a derivation that the old daemon it is communicating with cannot
understand.

The extensions we just created for dynamic derivation deps will add a
version field, solving the problem going forward, but there is still the
issue of what to do about old versions of Nix up to now.

The solution here is to carefully catch the bad error from the daemon
that is likely to indicate this problem, and add some extra context to
it.

There is another "Ugly backwards compatibility hack" in
`remote-store.cc` that also works by transforming an error.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-09-07 10:39:37 -04:00
John Ericson
7ad66cb3ef Allow dynamic derivation deps in inputDrvs
We use the same nested map representation we used for goals, again in
order to save space. We might someday want to combine with `inputDrvs`,
by doing `V = bool` instead of `V = std::set<OutputName>`, but we are
not doing that yet for sake of a smaller diff.

The ATerm format for Derivations also needs to be extended, in addition
to the in-memory format. To accomodate this, we added a new basic
versioning scheme, so old versions of Nix will get nice errors. (And
going forward, if the ATerm format changes again the errors will be even
better.)

`parsedStrings`, an internal function used as part of parsing
derivations in A-Term format, used to consume the final `]` but expect
the initial `[` to already be consumed. This made for what looked like
unbalanced brackets at callsites, which was confusing. Now it consumes
both which is hopefully less confusing.

As part of testing, we also created a unit test for the A-Term format for
regular non-experimental derivations too.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>

Apply suggestions from code review

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-09-07 10:39:37 -04:00
Valentin Gagarin
829d4d3e03 fix invalid anchor link 2023-09-07 15:13:22 +02:00
John Ericson
b7edc2099f Improve derivation parsing
- Don't assert: Derivation ATerms are not necessarily produced by Nix,
  and parsers should always throw graceful errors

- Improve error message from `static void except(..)`, shows both what
  we expected and what we actually got.

The intention is that we backport it, and then hopefully a few people
might get slightly better errors if they try out new experimental drv
files (for RFC 92) with an old version of Nix.
2023-09-06 11:44:06 -04:00
John Ericson
3a62651bd6
Merge pull request #8933 from fricklerhandwerk/option-anchors
Add anchors to option listings
2023-09-06 09:39:33 -04:00
John Ericson
216c66ddcf
Merge pull request #8932 from fricklerhandwerk/formatting
dedent common options listing; one sentence per line
2023-09-06 09:30:25 -04:00
John Ericson
754528241a
Merge pull request #8927 from obsidiansystems/test-derivation-aterm
Test and begin documentation of the ATerm format for derivations
2023-09-06 09:24:52 -04:00
John Ericson
83f99a380b
Merge pull request #8928 from cafkafk/patch-2
Fix globals.hh typo
2023-09-06 08:46:06 -04:00
John Ericson
d568877eab
Retitle section as Robert suggests
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-09-06 08:43:16 -04:00
Robert Hensing
964d186e5d
Merge pull request #8930 from fricklerhandwerk/output-path
disambiguate output from output path
2023-09-06 10:26:53 +02:00
Valentin Gagarin
391f18063c add anchors to option listings 2023-09-06 09:52:56 +02:00
Valentin Gagarin
02c2679f0e dedent common options listing; one sentence per line
this is a pure reformatting, contents were not changed

one sentence per line makes reviewing diffs and making suggestions much
more convenient. the indentation was an artifat of the DocBook
migration.
2023-09-06 09:49:00 +02:00
Valentin Gagarin
5c23d3a90c disambiguate output from output path 2023-09-06 09:09:02 +02:00
Christina Sørensen
2b3a17820f
Fix globals.hh typo 2023-09-06 04:19:40 +00:00
Robert Hensing
acc50e1845
Merge pull request #8925 from NixOS/dependabot/github_actions/cachix/install-nix-action-23
Bump cachix/install-nix-action from 22 to 23
2023-09-05 20:37:26 +02:00