Commit Graph

16510 Commits

Author SHA1 Message Date
github-actions[bot]
1248da4423
remove link to relocated manual page (#10706)
fix old anchor redirects to point to the correct location

(cherry picked from commit 45697ba502)

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-15 22:41:26 +02:00
github-actions[bot]
3c10c6f15d
Revert "manual: fold sidebar sections" (#10699)
(cherry picked from commit 937e7bae48)

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-15 22:40:44 +02:00
Robert Hensing
375acc48ea
Merge pull request #10670 from NixOS/backport-10588-to-2.21-maintenance
[Backport 2.21-maintenance] Fix fetchGit/fetchTree for nested submodules
2024-05-09 11:32:38 +02:00
Robert Hensing
7d1af2cf79 Fix fetchGit nested submodules
(cherry picked from commit 750bcaa330)
2024-05-09 09:09:37 +00:00
Théophane Hufschmitt
93e8660bba
Merge pull request #10529 from NixOS/backport-10467-to-2.21-maintenance
[Backport 2.21-maintenance] nix shell: Handle output paths that are symlinks
2024-04-17 16:12:10 +02:00
Eelco Dolstra
b1044d52ce nix shell: Test that store paths cannot link outside of the store
(cherry picked from commit 26a4688a86)
2024-04-17 13:25:06 +00:00
Eelco Dolstra
c8905a8747 Doh
(cherry picked from commit 9d50f57fa3)
2024-04-17 13:25:06 +00:00
Eelco Dolstra
3e138de2e0 nix shell: Handle output paths that are symlinks
This requires moving resolveSymlinks() into SourceAccessor. Also, it
requires LocalStoreAccessor::maybeLstat() to work on parents of the
store (to avoid an error like "/nix is not in the store").

Fixes #10375.

(cherry picked from commit 85b9f4ef4f)
2024-04-17 13:25:06 +00:00
Théophane Hufschmitt
60824fa97c
Merge pull request #10475 from tweag/backport-10244-to-2.21-maintenance
Backport #10244 to 2.21 maintenance
2024-04-11 17:29:58 +02:00
Bouke van der Bijl
d5e029a62e Add nixos test
(cherry picked from commit cd06193d13)
2024-04-11 17:00:15 +02:00
Bouke van der Bijl
ed6dc569bb Set the origin instead of hacking in the URL resolving
(cherry picked from commit 1a76ca4161)
2024-04-11 17:00:15 +02:00
Bouke van der Bijl
3f2150dcd1 git fetcher: relax absolute URL check of resolveSubmoduleUrl
This matches up the behavior with the internals of libgit2

Fixes #9979

(cherry picked from commit 1f73de2629)
2024-04-11 17:00:15 +02:00
Théophane Hufschmitt
0c1fcc2a97
Merge pull request #10470 from NixOS/backport-10456-to-2.21-maintenance
[Backport 2.21-maintenance] Fix adding symlink to the sandbox paths
2024-04-11 15:14:48 +02:00
Théophane Hufschmitt
4c7f69f531 Fix permission denied when building symlink derivation which points to a symlink out of the store
Bind-mounting symlinks is apparently not possible, which is why the
thing was failing.

Fortunately, symlinks are small, so we can fallback to copy them at no cost.

Fix https://github.com/NixOS/nix/issues/9579

Co-authored-by: Artturin <Artturin@artturin.com>
(cherry picked from commit 913db9f738)
2024-04-11 12:17:37 +00:00
Théophane Hufschmitt
2e93272f19 Add a test for depending on a symlink store path
Regression test for https://github.com/NixOS/nix/issues/9579

(cherry picked from commit 872d93eb13)
2024-04-11 12:17:36 +00:00
John Ericson
45b2789dc8
Merge pull request #10466 from NixOS/backport-10458-to-2.21-maintenance
[Backport 2.21-maintenance] doc/rl-2.20: clarify builders-use-substitutes vs. substitute-on-destion
2024-04-11 03:16:31 -04:00
Maximilian Bosch
a643aeccd3 doc/rl-2.20: clarify builders-use-substitutes vs. substitute-on-destination
...as this lead to confusion before.

(cherry picked from commit 50557adb3b)
2024-04-10 21:26:20 +00:00
Eelco Dolstra
c80068c099
Merge pull request #10462 from NixOS/backport-10413-to-2.21-maintenance
[Backport 2.21-maintenance] path-info: print correct path when using `nix path-info --store file://... --all --json`
2024-04-10 22:32:34 +02:00
Maximilian Bosch
cb7beb05cd path-info: print correct path when using nix path-info --store file://... --all --json
When querying all paths in a binary cache store, the path's representation
is `<hash>-x` (where `x` is the value of `MissingName`) because the .narinfo
filenames only contain the hash.

Before cc46ea1630 this worked correctly,
because the entire path info was read and the path from this
representation was printed, i.e. in the form `<hash>-<name>`. Since then
however, the direct result from `queryAllValidPaths()` was used as `path`.

Added a regression test to make sure the behavior remains correct.

(cherry picked from commit c80cd6bb06)
2024-04-10 17:37:39 +00:00
Théophane Hufschmitt
b433176028
Merge pull request #10452 from NixOS/backport-10449-to-2.21-maintenance
[Backport 2.21-maintenance] doc/rl-2.20: add missing entry about `nix copy --to ssh-ng://...`
2024-04-10 12:41:11 +02:00
Maximilian Bosch
9fe8513e3a doc/rl-2.20: add missing entry about nix copy --to ssh-ng://...
This requires `--substitute-on-destination` if you want the remote side
to substitute instead of copying if possible.

For completeness sake, document it here.

Also, the stable Nix from nixpkgs is still 2.18, so more folks may
stumble upon this when this is bumped, so I'd expect this to be actually
useful.

Closes #10182

(cherry picked from commit f34b8de5b2)
2024-04-10 09:44:51 +00:00
Eelco Dolstra
bd2c466b46 Bump version 2024-04-05 17:24:14 +02:00
Eelco Dolstra
355cbc482f
Merge pull request #10392 from NixOS/backport-10391-to-2.21-maintenance
[Backport 2.21-maintenance] Handle the case where a parent of ~/.nix-defexpr is a symlink
2024-04-03 18:18:57 +02:00
Eelco Dolstra
56555e584f Handle the case where a parent of ~/.nix-defexpr is a symlink
Fixes https://github.com/DeterminateSystems/nix-installer/issues/912 and probably #10247.

(cherry picked from commit 09551fabd0)
2024-04-03 15:20:54 +00:00
Eelco Dolstra
92e38fe30c
Merge pull request #10384 from NixOS/backport-10340-to-2.21-maintenance
[Backport 2.21-maintenance] Add trust-tarballs-from-git-forges setting
2024-04-03 11:48:19 +02:00
Eelco Dolstra
b77b2c22c1 Add test
(cherry picked from commit 00ce36fafe)
2024-04-02 16:06:10 +00:00
Eelco Dolstra
162cc2a180 Add trust-tarballs-from-git-forges setting
If enabled, GitHub flakerefs don't require a content hash, a Git
revision is enough.

Fixes #10297.

(cherry picked from commit 46d9e70c20)
2024-04-02 16:06:10 +00:00
Eelco Dolstra
542b9eff07
Merge pull request #10356 from NixOS/backport-10259-to-2.21-maintenance
[Backport 2.21-maintenance] doc: builtins.addDrvOutputDependencies: fix link target
2024-03-29 13:21:51 +01:00
Yueh-Shun Li
4e9c7e7a3d builtins.addDrvOutputDependencies: fix commentary
(cherry picked from commit d2b512959c)
2024-03-29 10:56:48 +00:00
Yueh-Shun Li
0d8e2679a5 doc: builtins.addDrvOutputDependencies: fix link target
(cherry picked from commit 39b0b8452f)
2024-03-29 10:56:48 +00:00
Eelco Dolstra
2d1cb49095 Bump version 2024-03-26 18:56:51 +01:00
Théophane Hufschmitt
3272ed0d58
Merge pull request #10328 from NixOS/backport-10325-to-2.21-maintenance
[Backport 2.21-maintenance] build-remote: fix format string shenanigans
2024-03-26 15:04:01 +01:00
K900
fb25bdc7b7 build-remote: fix format string shenanigans
HintFmt(string) invokes the HintFmt("%s", literal) constructor,
which is not what we want here. Add a constructor with a proper name
and call that.

Next step: rename all the other ones to HintFmt::literal(string).

Fixes https://github.com/NixOS/nix/issues/10238

(cherry picked from commit 2d4edb945b)
2024-03-26 13:35:06 +00:00
Robert Hensing
53440f4edf
Merge pull request #10309 from NixOS/backport-10293-to-2.21-maintenance
[Backport 2.21-maintenance] EvalCache: Fix missing format string argument
2024-03-24 02:54:31 +01:00
Eelco Dolstra
9e35746360 EvalCache: Fix missing format string argument
Fixes

  terminate called after throwing an instance of 'boost::wrapexcept<boost::io::too_few_args>'
    what():  boost::too_few_args: format-string referred to more arguments than were passed
  Aborted (core dumped)

for type errors in AttrCursor.

(cherry picked from commit bfd36402ac)
2024-03-24 01:28:27 +00:00
Eelco Dolstra
057ffc2e8e Bump version 2024-03-11 21:15:30 +01:00
Eelco Dolstra
34807c8906 Mark official release 2024-03-11 18:34:29 +01:00
Eelco Dolstra
72e145e415
Merge pull request #10226 from edolstra/release-notes
Release notes
2024-03-11 18:32:51 +01:00
Eelco Dolstra
4c97a66b4c Tweak release notes 2024-03-11 18:00:10 +01:00
Eelco Dolstra
b12dc76cfc release notes: 2.21.0 2024-03-11 16:22:29 +01:00
Eelco Dolstra
0ce58cd1c2
Merge pull request #10224 from tweag/fix-darwin-instaltests
Run preInstallCheck even when not building
2024-03-11 16:02:31 +01:00
Théophane Hufschmitt
74008d8215 Run preInstallCheck even when not building
Add `runHook preInstallCheck` to the overriden `installCheckPhase` used
for the non-build case.

In particular, this allow the fix from 2a34510776
to also apply there.
2024-03-11 15:34:23 +01:00
Robert Hensing
3539172fd2
Merge pull request #10208 from 9999years/print-strings-directly
`:print` strings directly in `nix repl`
2024-03-11 10:02:09 +01:00
Théophane Hufschmitt
83460fb64f
Merge pull request #10216 from edolstra/fix-github-test
Fix GitHub test
2024-03-11 09:50:33 +01:00
Eelco Dolstra
841fd78baa GitArchiveInputScheme: Support the narHash attribute
This is required to produce a locked flakeref.
2024-03-10 14:08:55 +01:00
Eelco Dolstra
c1811c1eba Fix GitHub test
Cherry-picked from 03618bb85f.
2024-03-10 13:38:38 +01:00
Eelco Dolstra
e65e9114d2
Merge pull request #10204 from 9999years/replace-foo-in-big-cxx-literal
Replace `foo` with `__NIX_STR` in `cxx-big-literal`
2024-03-10 13:11:36 +01:00
Rebecca Turner
d859d6c434
:print strings directly in nix repl
Strings are now printed directly when evaluated by `:print`, rather than
escaped. This makes it easier to debug multi-line strings or strings
containing quotes, like the results of `builtins.readFile`,
`lib.toShellArg`, and so on.

```
nix-repl> "cuppy\ndog\ncity"
"cuppy\ndog\ncity"

nix-repl> :p "cuppy\ndog\ncity"
cuppy
dog
city
```
2024-03-09 18:13:08 -08:00
Rebecca Turner
ea8faf8e9a
Replace foo with __NIX_STR in cxx-big-literal
Looks a little nicer when you check the generated sources.
2024-03-09 17:05:56 -08:00
Valentin Gagarin
ac730622e8
document where the value of builtins.nixPath comes from (#9113)
* document default values for `nix-path`

also note how it's overridden and note the effect of `restrict-eval`
2024-03-09 17:57:57 +00:00