Commit Graph

13503 Commits

Author SHA1 Message Date
Valentin Gagarin
6c84ef8821
show Nix logo in the manual (#10440)
the location of files is hard-coded by mdBook.
there is also seems to be no way to define custom templates, therefore
all styling has to be done in the CSS override.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-04-09 09:10:56 +00:00
Théophane Hufschmitt
17e5d0325d
Merge pull request #10188 from NixOS/backport-10183-to-2.13-maintenance
[Backport 2.13-maintenance] 2.16 faster flake lock parsing
2024-03-08 10:29:05 +01:00
Graham Dennis
279b7d8f62 Faster flake.lock parsing
This PR reduces the creation of short-lived basic_json objects while
parsing flake.lock files. For large flake.lock files (~1.5MB) I was
observing ~60s being spent for trivial nix build operations while
after this change it is now taking ~1.6s.

(cherry picked from commit 7fd0de38c6)
(cherry picked from commit f94fb636c0)
2024-03-07 23:08:41 +00:00
github-actions[bot]
94f38ea77d
fix location of _redirects file (#9951) 2024-02-07 11:44:45 +01:00
github-actions[bot]
25f2dfc6e4
fix an old lost direct (#9712)
this part must have been moved quite a while ago, but apparently so far
no one noticed

(cherry picked from commit 6db805b3d1)

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-08 20:56:52 +01:00
Robert Hensing
040a85caa0
Merge pull request #9466 from NixOS/backport-9459-to-2.13-maintenance
[Backport 2.13-maintenance] add path based redirects
2023-11-27 15:15:27 +01:00
Valentin Gagarin
7a5f35a1f9 add path based redirects
up to now, those were managed outside of this repo, which as
unsurprisingly a real hassle to deal with if one wanted to prevent URLs
from breaking when moving pages around. this change removes a large part
of the friction involved in moving content in the Nix manual.

possible next steps for further automation:
- check for content that moved and warn if it's not reachable from
  links that were valid prior to a change
- create redirect rules automatically based on this information

(cherry picked from commit 2b7016cc56)
2023-11-27 13:28:43 +00:00
Robert Hensing
56eb179068
Merge pull request #9224 from hercules-ci/backport-9219-to-2.13-maintenance
[Backport 2.13-maintenance] StorePath: reject names starting with '.', Fix typo in error message of too long store path
2023-10-23 23:20:29 +02:00
edef
35c72f4425 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 a06801de17)
(cherry picked from commit 33b54fc1f7)
2023-10-23 22:49:58 +02:00
oxalica
e22b261d82 Fix typo in error message of too long store path
(cherry picked from commit 303858afad)
(cherry picked from commit 8f74170e5e)
(cherry picked from commit 21d5e846c1)
2023-10-23 22:48:44 +02:00
Robert Hensing
c863accfd6
Merge pull request #9220 from hercules-ci/backport-9217-to-2.13-maintenance
[Backport 2.13-maintenance] CI Fixes #9217
2023-10-23 20:55:26 +02:00
Naïm Favier
1258cea068 ci: bump install-nix-action, don't fail fast
(cherry picked from commit b931d83550)
(cherry picked from commit ade3bffad3)
(cherry picked from commit cfc45b59de)
(cherry picked from commit 397de7bf24)
2023-10-23 19:44:06 +02:00
Silvan Mosberger
34d041d390 ci: Always run with sandbox, even on Darwin
And fix a test failure in the sandbox due to /home
existing on Darwin but not being accessible in the sandbox since it's a
symlink to /System/Volumes/Data/home, see
https://github.com/NixOS/nix/actions/runs/4205378453/jobs/7297384658#step:6:2127:

    C++ exception with description "error: getting status of /home/schnitzel/darmstadt/pommes: Operation not permitted" thrown in the test body.

On Linux this wasn't a problem because there /home doesn't exist in the sandbox

(cherry picked from commit be48907470)
(cherry picked from commit 75ec8e3130)
(cherry picked from commit 0ffb20a81d)
2023-10-23 19:43:21 +02:00
Eelco Dolstra
94d1b539a7 Bump version 2023-10-18 23:34:04 +02:00
Eelco Dolstra
2cf2bb45fc Fix C++17 build 2023-10-18 19:32:20 +02:00
Eelco Dolstra
70559cf89a Document that redirected tarball flakerefs can specify lastModified
(cherry picked from commit 56763ff918)
2023-10-18 17:08:00 +02:00
Eelco Dolstra
fb0b056d2f Tarball trees: Propagate lastModified
This makes them behave consistently with GitHub/GitLab flakes.

(cherry picked from commit 81045f243f)
(cherry picked from commit eb21904198)
2023-10-18 17:05:52 +02:00
Justin Restivo
38f4fe04e3 fix: build aarch64-darwin
(cherry picked from commit 220aa8e0ac)
2023-08-07 21:39:05 +02:00
Eelco Dolstra
d5f98aa91d Bump version 2023-08-07 21:38:53 +02:00
Eelco Dolstra
5bc21dccc9
Merge pull request #8763 from hercules-ci/backport-7447-to-2.13-maintenance
Backport 7447 to 2.13 maintenance
2023-08-07 19:30:27 +02:00
Eelco Dolstra
01401ffffd Merge remote-tracking branch 'origin/backport-8483-to-2.13-maintenance' into 2.13-maintenance 2023-08-07 16:43:57 +02:00
Eelco Dolstra
d971ce3ed4 Add docs
(cherry picked from commit cab03fb779)
2023-08-07 16:38:50 +02:00
Eelco Dolstra
dc718e28c9 Allow tarball URLs to redirect to a lockable immutable URL
Previously, for tarball flakes, we recorded the original URL of the
tarball flake, rather than the URL to which it ultimately
redirects. Thus, a flake URL like
http://example.org/patchelf-latest.tar that redirects to
http://example.org/patchelf-<revision>.tar was not really usable. We
couldn't record the redirected URL, because sites like GitHub redirect
to CDN URLs that we can't rely on to be stable.

So now we use the redirected URL only if the server returns the
`x-nix-is-immutable` or `x-amz-meta-nix-is-immutable` headers in its
response.

(cherry picked from commit 1ad3328c5e)
2023-08-07 16:38:30 +02:00
Eelco Dolstra
cb425af931 Add a generic check for rev attribute mismatches
(cherry picked from commit 3402b650cd)
2023-08-07 16:33:57 +02:00
Eelco Dolstra
3cc2ff77da GC server: Clear O_NONBLOCK on the right file descriptor
The bug fix in 6d30f9e6fe erroneously
cleared O_NONBLOCK on the server rather than client FD (leaving both
in an incorrect state).

Fixes #8551.

(cherry picked from commit a6a75ecad8)
2023-08-07 16:31:04 +02:00
Eelco Dolstra
0a0a4e2ea3 restoreMountNamespace(): Restore the original root directory
This is necessary when we're in a chroot environment, where the
process root is not the same as the root of the mount namespace
(e.g. in nixos-enter).

Fixes #7602.

(cherry picked from commit e54538c461)
2023-08-07 08:23:32 +00:00
Robert Hensing
995b658e72 Fixup release notes (#8393)
* Fixup release notes
2023-07-31 16:40:57 +02:00
Robert Hensing
1dfcf41645 rl-next.md: Minor improvement
(cherry picked from commit 37c533ed27)
2023-07-31 16:37:44 +02:00
Alex Ameen
1a6446b5eb primop: add readFileType, optimize readDir
Allows checking directory entry type of a single file/directory.

This was added to optimize the use of `builtins.readDir` on some
filesystems and operating systems which cannot detect this information
using POSIX's `readdir`.

Previously `builtins.readDir` would eagerly use system calls to lookup
these filetypes using other interfaces; this change makes these
operations lazy in the attribute values for each file with application
of `builtins.readFileType`.

(cherry picked from commit 153ee460c5)
2023-07-31 16:37:44 +02:00
Eelco Dolstra
25e1eb4dfd Bump version 2023-05-30 11:53:09 +02:00
Théophane Hufschmitt
43aa47cf8a
Merge pull request #8410 from tweag/backport-7957-to-2.13-maintenance
[Backport 2.13-maintenance] Switch to cachix/install-nix-action@v20
2023-05-28 17:24:13 +02:00
Théophane Hufschmitt
d17ecc5177 Switch to cachix/install-nix-action@v20
Fixes the installation issue with the latest Nix.

Also revert the pinning to nix-2.13 since it's not needed any more.

(cherry picked from commit c3b5499dff)
2023-05-28 17:23:37 +02:00
Théophane Hufschmitt
e0afeef10f
Merge pull request #8409 from NixOS/backport-7766-to-2.13-maintenance
[Backport 2.13-maintenance] Bump cachix/install-nix-action from 18 to 19
2023-05-28 17:18:25 +02:00
dependabot[bot]
478b015577 Bump cachix/install-nix-action from 18 to 19
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 6fdce7a9df)
2023-05-28 15:18:06 +00:00
Théophane Hufschmitt
691d1170e5
Merge pull request #8408 from NixOS/backport-8399-to-2.13-maintenance
[Backport 2.13-maintenance] Properly report build errors on chrooted stores
2023-05-28 17:11:48 +02:00
Théophane Hufschmitt
00811f98fb Properly report build errors on chrooted stores
When encountering a build error, Nix moves the output paths out of the
chroot into their final location (for “easier debugging of build
failures”). However this was broken for chroot stores as it was moving
it to the _logical_ location, not the _physical_ one.

Fix it by moving to the physical (_real_) location.

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

(cherry picked from commit d16a1994fb)
2023-05-28 15:11:26 +00:00
Théophane Hufschmitt
8aa178f75b
Merge pull request #8181 from NixOS/backport-8179-to-2.13-maintenance
[Backport 2.13-maintenance] disable gc on coroutine
2023-04-08 13:44:15 +02:00
Yorick van Pelt
ad96bf9791 Add talkative msg for coro gc debug
(cherry picked from commit 62ddd8633c)
2023-04-07 16:21:30 +00:00
Yorick van Pelt
de7803e15f Always disable GC in a coroutine unless the patch is applied
(cherry picked from commit 58d24a4cb6)
2023-04-07 16:21:30 +00:00
Yorick van Pelt
cc90264a7d DisableGC: replace by CoroutineContext, std::shared_ptr<void>
(cherry picked from commit 00bc34430b)
2023-04-07 16:21:30 +00:00
Yorick van Pelt
325ea715b3 Disable GC inside coroutines on mac OS
(cherry picked from commit 2c53ef1bfe)
2023-04-07 16:21:30 +00:00
John Ericson
11f12253ce
Merge pull request #8054 from NixOS/backport-8053-to-2.13-maintenance
[Backport 2.13-maintenance] LocalDerivationGoal: set NIX_ATTRS_*_FILE correctly for sandboxed builds
2023-03-16 18:24:51 -04:00
Linus Heckemann
e697c74269 LocalDerivationGoal: set NIX_ATTRS_*_FILE correctly for sandboxed builds
(cherry picked from commit af4cbdafe7)
2023-03-16 15:04:52 +00:00
Eelco Dolstra
9bf0baa7f4 Bump version 2023-02-27 18:13:04 +01:00
Théophane Hufschmitt
4acc684ef7
Merge pull request #7878 from NixOS/backport-7856-to-2.13-maintenance
[Backport 2.13-maintenance] Wait with making /etc unwritable until after build env setup
2023-02-22 06:52:14 +01:00
Yorick van Pelt
11522a573d Wait with making /etc unwritable until after build env setup
This fixes /etc/nsswitch.conf

(cherry picked from commit bbba49b3e4)
2023-02-21 19:22:35 +00:00
Eelco Dolstra
1083ecbb2b
Merge pull request #7833 from hercules-ci/backport-7616-to-2.13-maintenance
Backport 7616 to 2.13 maintenance
2023-02-14 16:53:27 +01:00
Eelco Dolstra
911cd5b45a
Merge pull request #7837 from NixOS/backport-7830-to-2.13-maintenance
[Backport 2.13-maintenance] Don't allow writing to /etc
2023-02-14 16:52:50 +01:00
Yorick van Pelt
bca7075edc Make /etc writability conditional on uid-range feature
(cherry picked from commit 49fd72a903)
2023-02-14 15:50:29 +00:00
Yorick van Pelt
459832e5c2 container test: make /etc writable
(cherry picked from commit ad1f61c39b)
2023-02-14 15:50:29 +00:00