Commit graph

18510 commits

Author SHA1 Message Date
tomberek
1ff0a983d6
Merge pull request #11322 from NixOS/eval-cache-doc
doc: Manage expectations for eval-cache
2024-08-19 13:50:15 -04:00
Eelco Dolstra
79ba1f1fd6
Merge pull request #11342 from DeterminateSystems/fix-umount
Fix umount failure
2024-08-19 19:31:55 +02:00
Noam Yorav-Raphael
62b9a26f60 Set $HOME=/proc/homeless-shelter on Linux, and /homeless-shelter on OSX. 2024-08-19 20:18:08 +03:00
Eelco Dolstra
e2e2af93c7
Merge pull request #11341 from DeterminateSystems/fix-doc-build
Fix doc build
2024-08-19 18:57:08 +02:00
Eelco Dolstra
39daa4a0d3 withFramedSink(): Don't use a thread to monitor the other side
Since withFramedSink() is now used a lot more than in the past (for
every addToStore() variant), we were creating a lot of threads, e.g.

  nix flake show --no-eval-cache --all-systems github:NixOS/nix/afdd12be5e19c0001ff3297dea544301108d298

would create 46418 threads. While threads on Linux are cheap, this is
still substantial overhead.

So instead, just poll from FramedSink before every write whether there
are pending messages from the daemon. This could slightly increase the
latency on log messages from the daemon, but not on exceptions (which
were only synchronously checked from FramedSink anyway).

This speeds up the command above from 19.2s to 17.5s on my machine (a
9% speedup).
2024-08-19 18:15:15 +02:00
Eelco Dolstra
9243457cb2 Fix umount failure
Fixes

```
    umount: /tmp/nix-shell.i3xRwX/nix-test/local-overlay-store/delete-refs/stores/merged-store/nix/store: filesystem was unmounted, but failed to update userspace mount table.
make: *** [mk/lib.mk:93: tests/functional/local-overlay-store/delete-refs.sh.test] Error 16
```

in a dev shell.

Note: this previously worked before we didn't have umount in the dev
shell, so we got /run/wrappers/bin/umount.
2024-08-19 17:07:22 +02:00
John Ericson
84ea12ad7f Fix build errors on Windows 2024-08-19 11:02:46 -04:00
Tom Bereknyei
3e5bf90341 feat: better warning for common SSL errors 2024-08-19 11:01:56 -04:00
Robert Hensing
b52e58903e doc: Manage expectations for eval-cache
Incorrectly high expectations lead to frustration for users who
stick around to experience how useless it is for e.g. a devShell

https://functional.cafe/@arianvp/112976284363120036:

> Flakes doesn't have eval caching. It has command line argument
> caching. It literally just stores the cli argument you passed
> in a sqlite database and yes that's as useless as it sounds

> When I discovered flakes had no expression level caching whatsoever
> I kind of felt lied to and betrayed.
2024-08-19 16:52:36 +02:00
Eelco Dolstra
a90d450827 Fix doc build
Fixes

```
  GEN    /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/manual/index.html
error: File not found: ../store/types/
   ┌─ release-notes/rl-next.md:60:197
   │
60 │   The build hook protocol did in principle support custom ways of remote building, but that can also be accomplished with a custom service for the ssh or daemon/ssh-ng protocols, or with a custom [store type](../store/types/) i.e. `Store` subclass. <!-- we normally don't mention classes, but consider that this release note is about a library use case -->
   │                                                                                                                                                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File not found: ../store/types/

Error: One or more incorrect links
2024-08-19 16:47:57 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-08-19 16:47:57 [ERROR] (mdbook::utils): Error: Rendering failed
2024-08-19 16:47:57 [ERROR] (mdbook::utils):    Caused By: The "linkcheck" renderer failed
```
2024-08-19 16:48:33 +02:00
tomberek
b0a7edb5ab
Merge pull request #11240 from 0x5a4/fix-11208
fix: bash mangles flake ref completion
2024-08-19 10:46:27 -04:00
John Ericson
67a54d47c5 Merge remote-tracking branch 'upstream/master' into path-in-exec 2024-08-19 10:42:12 -04:00
Robert Hensing
2f0db04da0 tests.installer: Load profile with -o unset
Tested with an ubuntu case. Might need revision depending on what hydra
thinks of the rest.
2024-08-19 16:41:40 +02:00
John Ericson
ceae25825f Update documentation to refer to Meson not Make in most places
This is necessary to make the Meson one the default and preferred one.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-19 10:34:35 -04:00
Eelco Dolstra
aeabe68291
Merge pull request #11331 from NixOS/make-check
Revert "Remove unit tests from old build system" (too soon)
2024-08-19 16:02:17 +02:00
Robert Hensing
8e4149af6f
Merge pull request #11329 from tomberek/tomberek.shell_segfault
fix: check to see if there are any lines before
2024-08-19 15:40:13 +02:00
Robert Hensing
9385383347 Revert "Remove unit tests from old build system"
`make check` was reverted too soon. The hacking guide wasn't brought
up to date with the new workflow, and it's not clear how to use
meson for everything.

This reverts commit 6f3045c2a2.
2024-08-19 15:18:02 +02:00
Tom Bereknyei
59db8fd62b fix: check to see if there are any lines before 2024-08-18 22:35:54 -04:00
tomberek
1c5ad159d6
Merge pull request #10980 from kjeremy/flake-show-description
nix flake show: add the description if it exists
2024-08-18 16:31:44 -04:00
Sandro
67de193277
Remove duplicated section (#11324) 2024-08-18 18:44:59 +02:00
siddhantCodes
9ccad9708e Don't use OS_STR in nix-channel.cc 2024-08-18 18:27:20 +05:30
siddhantCodes
58ef129502 Merge branch 'master' of github.com:NixOS/nix into path-in-exec 2024-08-17 20:05:31 +05:30
Robert Hensing
c458598647
Merge pull request #11297 from shivaraj-bh/flake-apps-description
`nix flake show`: Support `meta` attribute for `apps`
2024-08-17 13:12:01 +02:00
shivaraj-bh
2ab93fd5fd nix flake check: Add functional tests for apps and formatter 2024-08-17 15:50:06 +05:30
shivaraj-bh
adabca6e4f nix flake check: Add apps check; Check if formatter is a derivation 2024-08-17 15:50:06 +05:30
shivaraj-bh
a5f6ee8550 nix flake show: Support meta attribute for apps
Metadata information for flake apps will be useful while exploring a
flake using `nix flake show`
2024-08-17 15:50:06 +05:30
tomberek
b7d80d002f
Merge pull request #11320 from tomberek/tomberek.fix_container_release
ci: use attribute with version for docker
2024-08-17 03:40:33 -04:00
Jörg Thalheim
80f20fa4cb replace backport github action with mergify
The current backport action cannot automerge because
the github action bot does not trigger github CI actions.
Mergify instead does not have this limitation and can also
use a merge queue.

On top we have now a declarative configuration to allow
contributers to add new tests to required without having access
to the github org.

An example pull request and backport can be seen here:

https://github.com/Mic92/nix-1/pull/4

and here:

https://github.com/Mic92/nix-1/pull/5

To complete the setup the mergify app must be enabled for this repository.
It's already installed in the nixos organization for nixos-hardware and
other repositories.
2024-08-17 09:21:46 +02:00
Tom Bereknyei
4ba57c9eb2 ci: use attribute with version for docker 2024-08-17 02:46:58 -04:00
tomberek
b62e5e889a
Merge pull request #11279 from NixOS/contributing
Urge contributors to read the contributing page + link to matrix
2024-08-16 23:22:08 -04:00
tomberek
9e37a93229
Merge pull request #11270 from amarshall/fix-darwin-sandbox-local-networking
libstore: fix port binding in __darwinAllowLocalNetworking sandbox
2024-08-16 23:17:21 -04:00
tomberek
92df2a7cb2
Merge pull request #11285 from DeterminateSystems/downloadTarball-cacheable
fetchers::downloadTarball(): Return a cacheable accessor
2024-08-16 23:05:49 -04:00
tomberek
15a2457607
Merge pull request #11303 from NixOS/always-quick-build
Use nixosTest.quickBuild behavior by default
2024-08-16 22:07:05 -04:00
Robert Hensing
d4aa7d5dc7 Use nixosTest.quickBuild behavior by default
This wasn't the default behaviour because:

> We don't enable this by default to avoid the mostly unnecessary work of
> performing an additional build of the package in cases where we build
> the package normally anyway, such as in our pre-merge CI.

Since we have a componentized build, we've solved the duplication.

In the new situation, building both with and without unit tests
isn't any slow than just a build with unit tests, so there's no
point in using the unit-tested build anymore.

By using the otherwise untested build, we reduce the minimum build
time towards the NixOS test, at no cost.

If you want to run all tests, build all attributes.
2024-08-16 21:25:48 -04:00
Eelco Dolstra
b02601cd0c
Merge pull request #11311 from cole-h/update-nixpkgs-input-fix-darwin
Update nixpkgs input to fix darwin ccache evaluation, have CI check that all outputs on all systems evaluate
2024-08-16 20:43:59 +02:00
Cole Helbling
aa3d35c1f4 ci: check that all outputs for all systems can evaluate 2024-08-16 07:22:30 -07:00
Cole Helbling
8866d2cd83 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/63d37ccd2d178d54e7fb691d7ec76000740ea24a?narHash=sha256-7cCC8%2BTdq1%2B3OPyc3%2BgVo9dzUNkNIQfwSDJ2HSi2u3o%3D' (2024-07-21)
  → 'github:NixOS/nixpkgs/c3d4ac725177c030b1e289015989da2ad9d56af0?narHash=sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz%2BNG82pbdg%3D' (2024-08-15)
2024-08-16 07:09:27 -07:00
Robert Hensing
a03bb4455c Fix SSH invocation when local SHELL misbehaves
Setting it to /bin/sh will make it more predictable when users have
their favorite shell in SHELL, which might not behave as expected.
For instance, a bad rc file could send something to stdout before
our LocalCommand gets to write "started".

This may help https://github.com/NixOS/nix/issues/11010
2024-08-16 15:53:30 +02:00
Robert Hensing
c4192a6617 Add nix::execvpe 2024-08-16 15:53:30 +02:00
Michael Gallagher
30af4a9e27
nix-daemon.sh profile script: operate under set -u in bash
see d459d3307c
2024-08-15 17:56:05 -07:00
Robert Hensing
31f3f23ee6
Merge pull request #11305 from NixOS/doc-apply
Document function application operator
2024-08-15 19:43:19 +02:00
Robert Hensing
06b18cff20
doc: Edit language/operators
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-08-15 18:53:42 +02:00
Valentin Gagarin
ce62b766ef
fix link from the readme (#11307) 2024-08-15 15:25:50 +02:00
Robert Hensing
e225b63062 doc: Document function application operator 2024-08-15 13:55:41 +02:00
Robert Hensing
72a4d1f52d Add :doc support for __functor 2024-08-15 13:04:34 +02:00
Robert Hensing
6068e32aa7 refactor: Extract EvalState::addCallDepth 2024-08-15 13:04:34 +02:00
John Ericson
d8c1550189
Merge pull request #11301 from obsidiansystems/no-make-unittests
No make unittests
2024-08-15 03:21:39 -05:00
Travis A. Everett
0fabb348ba add script to migrate macOS 15 Sequoia nixbld UIDs
While we don't have any easy way to forcibly notify everyone about the
impending breakage (or forcibly migrate the users on their system),
this script enables those who do hear about the problem to migrate
their systems before they take the macOS update.

It should also enable people who only discover it after the update
when a build fails to ~fix their installs without a full reinstall.
2024-08-14 20:58:26 -05:00
John Ericson
b41cc1a755 Make wrapper derivation
This ensures just `nix build`-ing the flake doesn't forget to run all
tests. One can still specifiy specific attributes to just build one
thing.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-08-14 18:04:38 -04:00
John Ericson
6f3045c2a2 Remove unit tests from old build system
Now that we can run all tests with Meson, we want developers making code
changes to use it.

(Only the manual needs to be built with the build system, and that will
change shortly.)

This reverts commit b0bc2a97bf.
2024-08-14 16:38:00 -04:00