Commit Graph

13766 Commits

Author SHA1 Message Date
Valentin Gagarin
c27b9c8af9
show Nix logo in the manual (#10441)
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:29:13 +00:00
Théophane Hufschmitt
9e19aca31b
Merge pull request #10187 from NixOS/backport-10183-to-2.14-maintenance
[Backport 2.14-maintenance] 2.16 faster flake lock parsing
2024-03-08 10:28:59 +01:00
Graham Dennis
2dd715ef0b 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:08 +00:00
github-actions[bot]
f092ae4478
fix location of _redirects file (#9952) 2024-02-07 11:44:39 +01:00
github-actions[bot]
cbabc40c30
fix an old lost direct (#9713)
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:57:03 +01:00
Robert Hensing
2978cc2583
Merge pull request #9467 from NixOS/backport-9459-to-2.14-maintenance
[Backport 2.14-maintenance] add path based redirects
2023-11-27 15:15:31 +01:00
Valentin Gagarin
f37a5ed83c 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:46 +00:00
John Ericson
956096843e
Merge pull request #9432 from NixOS/backport-9431-to-2.14-maintenance
[Backport 2.14-maintenance] Add missing `-lrapidcheck` fixing build with shared lib
2023-11-22 10:21:06 -05:00
John Ericson
9ec640f2a7 Add missing -lrapidcheck fixing build with shared lib
https://github.com/NixOS/nixpkgs/pull/269064 makes rapidcheck be build
as a shared lib, but that broke Nix because the `-lrapidcheck` was
missing. This fixes that (and doesn't break Nix what the library is a
static archive as today).

(cherry picked from commit 46131567da)
2023-11-22 04:47:57 +00:00
Robert Hensing
d020050509
Merge pull request #9219 from NixOS/backport-9130-to-2.14-maintenance
[Backport 2.14-maintenance] [Backport 2.15-maintenance] StorePath: reject names starting with '.', Fix typo in error message of too long store path
2023-10-23 22:43:25 +02:00
edef
33b54fc1f7 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)
2023-10-23 17:32:50 +00:00
oxalica
21d5e846c1 Fix typo in error message of too long store path
(cherry picked from commit 303858afad)
(cherry picked from commit 8f74170e5e)
2023-10-23 17:32:50 +00:00
Eelco Dolstra
efa096c3ab
Merge pull request #9217 from hercules-ci/backport-9214-to-2.14-maintenance
[Backport 2.14-maintenance] CI fixes
2023-10-23 19:31:17 +02:00
Naïm Favier
397de7bf24 ci: bump install-nix-action, don't fail fast
(cherry picked from commit b931d83550)
(cherry picked from commit ade3bffad3)
(cherry picked from commit cfc45b59de)
2023-10-23 18:50:36 +02:00
Silvan Mosberger
0ffb20a81d 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)
2023-10-23 18:50:36 +02:00
Théophane Hufschmitt
d9bdbd2c47 ci: Update the install-nix-action
(cherry picked from commit cff3149a01)
2023-10-23 18:49:33 +02:00
Eelco Dolstra
a5fa42c5ed
Merge pull request #8801 from NixOS/backport-8800-to-2.14-maintenance
[Backport 2.14-maintenance] restoreMountNamespace(): Restore the original root directory
2023-08-14 11:02:53 +02:00
Eelco Dolstra
3065960f2a 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)
(cherry picked from commit 92e198f1db)
(cherry picked from commit 9783bbad54)
2023-08-07 17:57:14 +00:00
Eelco Dolstra
4504ee2957
Merge pull request #8266 from NixOS/backport-7958-to-2.14-maintenance
[Backport 2.14-maintenance] InstallableFlake: Apply nix config in `getCursors`
2023-04-28 12:02:06 +02:00
amesgen
15d1f8b89c InstallableFlake: Apply nix config in getCursors
(cherry picked from commit 77bb950566)
2023-04-27 18:01:54 +00:00
Théophane Hufschmitt
9588d2e939
Merge pull request #8182 from NixOS/backport-8179-to-2.14-maintenance
[Backport 2.14-maintenance] disable gc on coroutine
2023-04-08 13:44:19 +02:00
Yorick van Pelt
3b371e2924 Add talkative msg for coro gc debug
(cherry picked from commit 62ddd8633c)
2023-04-07 16:21:34 +00:00
Yorick van Pelt
8a2a2fbc63 Always disable GC in a coroutine unless the patch is applied
(cherry picked from commit 58d24a4cb6)
2023-04-07 16:21:34 +00:00
Yorick van Pelt
bb53873253 DisableGC: replace by CoroutineContext, std::shared_ptr<void>
(cherry picked from commit 00bc34430b)
2023-04-07 16:21:34 +00:00
Yorick van Pelt
f8cc1dc435 Disable GC inside coroutines on mac OS
(cherry picked from commit 2c53ef1bfe)
2023-04-07 16:21:34 +00:00
John Ericson
40627612ec
Merge pull request #8117 from NixOS/backport-8114-to-2.14-maintenance
[Backport 2.14-maintenance] Fix more profile dirs in docs
2023-03-27 16:37:19 -04:00
John Ericson
74393024d6 Fix more profile dirs in docs
Picking up where #8078 left off.

(cherry picked from commit 8df6f7bb0f)
2023-03-27 20:36:16 +00:00
Robert Hensing
bf38c5df51
Merge pull request #8115 from NixOS/backport-8109-to-2.14-maintenance
[Backport 2.14-maintenance] Catch eval errors in `hasContent`
2023-03-27 19:03:45 +02:00
John Ericson
e0aa691061
Merge pull request #8116 from NixOS/backport-8078-to-2.14-maintenance
[Backport 2.14-maintenance] Fix `nix profile --help`
2023-03-27 12:16:12 -04:00
John Ericson
8a3f3d6a46 Fix nix profile --help
The documentation hadn't be updated to reflect the new default profile
location.

(cherry picked from commit f87f1bbfe6)
2023-03-27 16:14:18 +00:00
Robert Hensing
22860dddff tests/flakes/show.sh: Broaden requirement comment
(cherry picked from commit 6b87c6577f)
2023-03-27 16:13:21 +00:00
oxalica
52c7261898 Catch eval errors in hasContent
`legacyPackages` of nixpkgs trigger eval errors in `hasContent`, causing
the whole `legacyPackages` being skipped. We should treat it as
has-content in that case.

(cherry picked from commit 2941a599fa)
2023-03-27 16:13:21 +00:00
Eelco Dolstra
f9b8193555
Merge pull request #8086 from NixOS/backport-8085-to-2.14-maintenance
[Backport 2.14-maintenance] Fix rendering of fetchGit documentation
2023-03-21 16:02:24 +01:00
Eelco Dolstra
d2ee9fc61f Fix rendering of fetchGit documentation
stripIndentation() doesn't support tabs, so the entire markdown ended
up indented and thus rendered as a code block.

(cherry picked from commit 16cb9b9f04)
2023-03-21 14:25:14 +00:00
Eelco Dolstra
a64ab82c30
Merge pull request #8055 from NixOS/backport-8053-to-2.14-maintenance
[Backport 2.14-maintenance] LocalDerivationGoal: set NIX_ATTRS_*_FILE correctly for sandboxed builds
2023-03-16 16:16:16 +01:00
Eelco Dolstra
d3e3001f5e Revert "Fix coverage job"
This reverts commit cae8edb207.
2023-03-16 16:15:49 +01:00
Linus Heckemann
1a7f2e0742 LocalDerivationGoal: set NIX_ATTRS_*_FILE correctly for sandboxed builds
(cherry picked from commit af4cbdafe7)
2023-03-16 15:04:58 +00:00
Eelco Dolstra
d30682eb37
Merge pull request #8010 from NixOS/backport-8005-to-2.14-maintenance
[Backport 2.14-maintenance] Run 'make installcheck' again
2023-03-08 17:41:59 +01:00
Eelco Dolstra
cb76292148 Run 'make installcheck' again
This was failing because the check for the existence of the
'installcheck' target failed silently, so the whole phase got
skipped. It works by running 'make -n installcheck 2> /dev/null',
which however barfs with

  /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld.gold: error: cannot open tests/plugins/plugintest.o: No such file or directory

Fixes #8004.

(cherry picked from commit 693b1be81f)
2023-03-08 16:40:38 +00:00
Eelco Dolstra
3dfbf03407
Merge pull request #8008 from NixOS/backport-8007-to-2.14-maintenance
[Backport 2.14-maintenance] Fix coverage job
2023-03-08 17:14:31 +01:00
Eelco Dolstra
2639911c8b Fix crash/hang with CA derivations
The curl download can outlive DrvOutputSubstitutionGoal (if some other
error occurs), so at shutdown setting the promise to an exception will
fail because 'this' is no longer valid in the callback. This can
manifest itself as a segfault, "corrupted double-linked list" or hang.

(cherry picked from commit 7bfed34367)
2023-03-08 17:13:53 +01:00
Eelco Dolstra
cae8edb207 Fix coverage job
https://hydra.nixos.org/build/211747539
(cherry picked from commit bda8d7f165)
2023-03-08 16:11:12 +00:00
Eelco Dolstra
3913366f6d
Merge pull request #8001 from NixOS/backport-7993-to-2.14-maintenance
[Backport 2.14-maintenance] Fix `nix-collect-garbage -d` with the new profile location
2023-03-08 12:03:54 +01:00
Théophane Hufschmitt
6527dc1614 Fix nix-collect-garbage -d with the new profile location
Low-hanging fix for https://github.com/NixOS/nix/pull/5226#issuecomment-1454669399

(cherry picked from commit 2272bc6049)
2023-03-08 10:11:10 +00:00
John Ericson
0dd3be153a
Merge pull request #7997 from NixOS/backport-7946-to-2.14-maintenance
[Backport 2.14-maintenance] flake: restore binary-dist artifact to Hydra static builds
2023-03-07 18:11:55 -05:00
Cole Helbling
b9b4e2275c flake: restore binary-dist artifact to Hydra static builds
(cherry picked from commit a8d0ff1a11)
2023-03-07 19:22:36 +00:00
Théophane Hufschmitt
7f5e1c8e0a
Merge pull request #7987 from NixOS/backport-7957-to-2.14-maintenance
[Backport 2.14-maintenance] Switch to cachix/install-nix-action@v20
2023-03-06 14:05:35 +01:00
Théophane Hufschmitt
18c5e9e6db 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-03-06 10:09:58 +00:00
Eelco Dolstra
70d01bdec1
Merge pull request #7921 from NixOS/backport-7920-to-2.14-maintenance
[Backport 2.14-maintenance] nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
2023-03-02 00:24:44 +01:00
Eelco Dolstra
892b699ea6
Merge pull request #7934 from NixOS/backport-7925-to-2.14-maintenance
[Backport 2.14-maintenance] Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't exist
2023-03-01 23:02:48 +01:00