Commit Graph

14095 Commits

Author SHA1 Message Date
Eelco Dolstra
de3f035d12
Merge pull request #8535 from emilazy/backport-8240-to-2.15-maintenance
[Backport 2.15-maintenance] ci: Always run with sandbox, even on Darwin
2023-06-19 12:42:12 +02:00
Yorick van Pelt
8a9b22b604 create pathAccessible, use it to infer default dirs
(cherry picked from commit 2c462486fe)
2023-06-18 04:03:26 +01:00
Yorick van Pelt
a1c22a7c10 getDefaultNixPath: ignore EPERM
(cherry picked from commit a6c78ba367)
2023-06-18 04:03:26 +01:00
Yorick van Pelt
24e1dc4d74 Call getDefaultSSLCertFile() only when none is specified
This does pathExists on various paths, which crashes on EPERM in the
macOS sandbox.

(cherry picked from commit b7cde90c6b)
2023-06-18 04:03:26 +01:00
Silvan Mosberger
75ec8e3130 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)
2023-06-18 04:03:26 +01:00
Théophane Hufschmitt
1b31d04e74
Merge pull request #8465 from NixOS/backport-8399-to-2.15-maintenance
[Backport 2.15-maintenance] Properly report build errors on chrooted stores
2023-06-07 09:18:49 +02:00
Théophane Hufschmitt
2da1b12062 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-06-06 22:17:26 +00:00
Eelco Dolstra
d609b64bb2 Bump version 2023-05-23 17:18:24 +02:00
John Ericson
9204ab4d58
Merge pull request #8350 from NixOS/backport-8154-to-2.15-maintenance
[Backport 2.15-maintenance] Make `nix-collect-garbage -d` look into more places
2023-05-16 12:45:30 -04:00
Théophane Hufschmitt
5c183986d0 test the garbage collection with the old profile dir
Regression test for https://github.com/NixOS/nix/issues/8294

(cherry picked from commit e97e9e9f00)
2023-05-16 13:52:04 +00:00
Théophane Hufschmitt
81466aff45 Make nix-collect-garbage -d look into more places
Make it look into the new-style profiles dir, the old-style one, and the
target of `~/.nix-profile` to be sure that we don't miss anything

(cherry picked from commit 64b0cc5bc4)
2023-05-16 13:52:04 +00:00
John Ericson
02b2ea1e1a
Merge pull request #8320 from NixOS/backport-8310-to-2.15-maintenance
[Backport 2.15-maintenance] Fix `nix print-dev-env` & `nix develop` with drv paths
2023-05-12 00:02:10 -04:00
John Ericson
fec05fad3a Fix nix print-dev-env & nix develop with drv paths
Fixes #8309

This regression was because both `CmdDevelop` and `CmdPrintDevEnv` were
switched to be `InstallableValueCommand` subclasses, but actually
neither should have been.

The `nixpkgsFlakeRef` method should indeed not be on the base
installable class, because "flake refs" and "nixpkgs" are not
installable-wide notions, but that doesn't mean these commands should
only accept installable values.

(cherry picked from commit a93110ab19)
2023-05-11 21:08:10 +00:00
Robert Hensing
ab14087ea3
Merge pull request #8237 from NixOS/backport-8231-to-2.15-maintenance
[Backport 2.15-maintenance] Gate experimental features in `DerivationOutput::fromJSON`
2023-04-18 17:36:25 +02:00
John Ericson
bef52e525d Gate experimental features in DerivationOutput::fromJSON
This is an entry point for outside data, so we need to check enabled
experimental features here.

(cherry picked from commit aa74c7b0bc)
2023-04-18 13:43:19 +00:00
John Ericson
80afafdbd4
Merge pull request #8221 from NixOS/backport-8214-to-2.15-maintenance
[Backport 2.15-maintenance] Display valid installable in `InstallableDerivedPath::parse` warning
2023-04-15 10:37:59 -04:00
John Ericson
e79de4791d Legacy vs non-legacy to_string/parse for DerivedPath
As requested by @roberth, it is good to call out the specific instances
we care about, which is `!` for the RPC protocols, and `^` for humans.

This doesn't take advantage of parametricity as much, but since the
human and computer interfaces are good to decouple anyways (we don't
care if they drift further apart over time in the slightest) some
separation and slight duplication is fine.

Also, unit test both round trips.

(cherry picked from commit ee420ac64e)
2023-04-15 12:15:19 +00:00
Raphael Robatsch
a345c14cc1 Display valid installable in InstallableDerivedPath::parse warning
The warning message should produce an installable name that can be
passed to `nix build`, `nix path-info`, etc. again. Since the CLI
expects that the .drv path and the output names are separated by
a caret, the warning message must also separate the .drv path and output
names with a caret.

However, `DerivedPath::Built.to_string()` uses an exclamation point as
the separator instead. This commit adds a `separator` argument to the
to_string method.

This changes the warning message from:
If this command is now failing try again with '/nix/store/foo.drv!*'
to:
If this command is now failing try again with '/nix/store/foo.drv^*'

(cherry picked from commit 9e8f209036)
2023-04-15 12:15:19 +00:00
Eelco Dolstra
717cd487b1 Bump version 2023-04-11 20:16:10 +02:00
John Ericson
8340e2623a
Merge pull request #8203 from NixOS/backport-8201-to-2.15-maintenance
[Backport 2.15-maintenance] Do not gate or hide experimental settings
2023-04-11 11:45:02 -04:00
John Ericson
9af0a0e049 Do not gate or hide experimental settings
This is somewhat hacky fix just for 2.15. I unintentionally hid them
from the manual, when no one wanted to hide them that (including
myself). I also required the experimental feature to be enabled in an
order-dependent way, which is not good.

The simplest fix for this immanent release is just to always show them,
and always allow them to be set.

Effectively undoes some changes from aa663b7e89

(cherry picked from commit 450e5ec618)
2023-04-11 15:37:29 +00:00
Eelco Dolstra
d2932ad0be Revert "Filter tests/nixos from source"
This reverts commit 80f9231b69 because
it causes a divergence in the source tree used for the Nix build
between hydra.nixos.org and Nix.
2023-04-11 16:26:57 +02:00
Eelco Dolstra
d7bedc60f9 Mark official release 2023-04-11 14:06:41 +02:00
Eelco Dolstra
0a54624275
Merge pull request #8200 from edolstra/release-notes
2.15 release notes
2023-04-11 13:18:30 +02:00
Eelco Dolstra
e570a91661 Release notes 2023-04-11 12:40:56 +02:00
Eelco Dolstra
162c3f5f7c
Merge pull request #8170 from tweag/fix-aarch64-build
Explicitely define `LockFile::operator!=`
2023-04-11 12:35:23 +02:00
Eelco Dolstra
45ca4e6432
Merge pull request #8158 from tweag/harden-profiles-test
Fix the flaky `nix-profile` test
2023-04-11 12:12:09 +02:00
Eelco Dolstra
8fd91b3585
Merge pull request #8153 from obsidiansystems/more-labeler
Try auto-labeling a few more things
2023-04-11 12:10:34 +02:00
Eelco Dolstra
60a1bf08b6
Merge pull request #7798 from peeley/list-experimental-features
Documentation: list experimental features in manual
2023-04-11 11:55:35 +02:00
Eelco Dolstra
deb7f4b466
Nitpicks 2023-04-11 11:29:35 +02:00
Robert Hensing
a2ec8eaf17
Merge pull request #8190 from NaN-git/configure_ac
add check for librapidcheck
2023-04-10 20:13:32 +02:00
John Ericson
73eb6a2a57 Single page for experimental feature descriptions
As requested by @fricklerhandwerk.
2023-04-09 11:01:23 -04:00
Philipp Otterbein
ca6b759f4e fix failing configure in nix-tests 2023-04-09 02:33:53 +02:00
Philipp Otterbein
8ffc05e7ec add check for librapidcheck
declare RAPIDCHECK_HEADERS as variable
2023-04-08 22:29:43 +02:00
Robert Hensing
8f0ec323ea
Merge pull request #8180 from obsidiansystems/factor-out-daemon-cmd-helpers
Tidy up and comment daemon CLI
2023-04-08 16:57:49 +02:00
John Ericson
8f44edc83e Tidy up and comment daemon CLI
Some of the factoring out was taken from #7912 by @mupdt. Thanks!

No behavior should be changed in this commit.

Co-Authored-By: mupdt <25388474+mupdt@users.noreply.github.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-04-07 16:49:52 -04:00
Robert Hensing
4411c7d7e0
Merge pull request #8179 from tweag/disable-gc-on-coroutine
disable gc on coroutine
2023-04-07 18:21:11 +02:00
John Ericson
0746951be1
Finish converting existing comments for internal API docs (#8146)
* Finish converting existing comments for internal API docs

99% of this was just reformatting existing comments. Only two exceptions:

- Expanded upon `BuildResult::status` compat note

- Split up file-level `symbol-table.hh` doc comments to get
  per-definition docs

Also fixed a few whitespace goofs, turning leading tabs to spaces and
removing trailing spaces.

Picking up from #8133

* Fix two things from comments

* Use triple-backtick not indent for `dumpPath`

* Convert GNU-style `\`..'` quotes to markdown style in API docs

This will render correctly.
2023-04-07 13:55:28 +00:00
Robert Hensing
54b3b6ebc6
Merge pull request #7887 from obsidiansystems/add-derivation
`nix derivation add`, `show-derivation` -> `derivation show`
2023-04-07 15:02:35 +02:00
Yorick van Pelt
62ddd8633c Add talkative msg for coro gc debug 2023-04-07 14:54:50 +02:00
Yorick van Pelt
58d24a4cb6 Always disable GC in a coroutine unless the patch is applied 2023-04-07 14:54:38 +02:00
Yorick van Pelt
00bc34430b DisableGC: replace by CoroutineContext, std::shared_ptr<void> 2023-04-07 14:53:40 +02:00
Yorick van Pelt
2c53ef1bfe Disable GC inside coroutines on mac OS 2023-04-07 14:52:59 +02:00
John Ericson
9d1105824f Add release notes for nix derivation {add,show} 2023-04-07 08:35:59 -04:00
John Ericson
59e0728714 Create nix derivation add command
Also refine `nix derivation show`'s docs very slightly.
2023-04-07 08:34:58 -04:00
John Ericson
27597f8131 Rename files to reflect new nix derivation show name
This will match the files we added for `nix add derivation` in the rest
of this PR.
2023-04-07 08:34:58 -04:00
John Ericson
2b98af2e62 nix show-derivation -> nix derivation show 2023-04-07 08:34:58 -04:00
John Ericson
4e9f32f993 Liberate checkDerivationOutputs from LocalStore
Make it instead a method on `Derivation` that can work with any store.
We will need this for a CLI command to create a derivation.
2023-04-07 08:34:58 -04:00
John Ericson
b200784cec Include the name in the JSON for derivations
This is non-breaking change in the to-JSON direction. This *is* a
breaking change in the from-JSON direction, but we don't care, as that
is brand new in this PR.

`nix show-derivation --help` currently has the sole public documentation
of this format, it is updated accordingly.
2023-04-07 08:34:58 -04:00
John Ericson
fe9cbe838c Create Derivation::fromJSON
And test, of course
2023-04-07 08:34:58 -04:00