Commit Graph

18219 Commits

Author SHA1 Message Date
Robert Hensing
359d124bbf fixup: Re-enable import .drv code 2024-08-26 12:46:01 +02:00
Robert Hensing
68a5cfd30e tests: nix:derivation-internal.nix renders with a scheme now 2024-08-26 10:37:42 +02:00
Robert Hensing
1008847630 fix findFile assertion failure
A string is only allowed to create one path component; containing
no slashes.
2024-08-24 21:35:01 +02:00
Robert Hensing
52c0ef24c5 WIP fix baseNameOf (needs test maybe)
https://github.com/NixOS/nix/pull/10252#issuecomment-2275035429
2024-08-24 00:54:31 -04:00
Robert Hensing
f13dc79904 Fix nix flake init eval for path value 2024-08-24 00:53:06 -04:00
Robert Hensing
f3d2a16eff Fix evalState::rootFS paths' to_string()
This showPath is getting a little too ad hoc, but it works for now.
2024-08-24 00:51:46 -04:00
Robert Hensing
5def18e53b SourceAccessor: insert colon after prefix
This allows clever editors/IDEs to discern the path more easily
for Ctrl+Click navigate to functionality, e.g. when building
.?ref=HEAD
2024-08-24 00:51:10 -04:00
Robert Hensing
ee6a764988 Make path values lazy
This fixes the double copy problem and improves performance
for expressions that don't force the whole source to be added to the
store.

Rules for fast expressions:

- Use path literals where possible
   - import ./foo.nix
- Use + operator with slash in string
   - src = fetchTree foo + "/src";
- Use source filtering, lib.fileset

- AVOID toString
- If possible, AVOID interpolations ("${./.}")
- If possible, move slashes into the interpolation to add less to the store
   - "${./src}/foo" -> "${./src/foo}"

toString may be improved later as part of lazy-trees, so these
recommendations are a snapshot. Path values are quite nice though.
2024-08-23 23:53:55 -04:00
Tom Bereknyei
b79c918e09 fixup: remove FlakeCache 2024-08-23 23:53:52 -04:00
Tom Bereknyei
50b00b0194 fetchTree: Return a path instead of a store path
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
2024-08-23 23:52:21 -04:00
Eelco Dolstra
fa49d2e356
Merge pull request #11350 from noamraph/homeless-shelter-to-proc-changelog
Add changelog for homeless-shelter-to-proc
2024-08-21 19:49:36 +02:00
Noam Yorav-Raphael
a643c9b1f9
Update doc/manual/rl-next/homeless-shelter-to-proc.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-08-21 19:58:16 +03:00
Noam Yorav-Raphael
02446918f4 Add changelog for homeless-shelter-to-proc 2024-08-21 18:29:45 +03:00
John Ericson
af26fe3934
Merge pull request #11281 from siddhantk232/path-in-exec
Use `std::filesystem::path` in end executables
2024-08-20 12:35:57 -04:00
Eelco Dolstra
e1d1eac791
Merge pull request #11152 from DeterminateSystems/flip-coroutines
addToStore(): Evaluate on the main stack
2024-08-20 18:19:49 +02:00
John Ericson
d34a89afc3
Merge pull request #11335 from obsidiansystems/meson-doc
Update documentation to refer to Meson not Make in most places
2024-08-20 11:49:19 -04:00
Eelco Dolstra
257470b58d Merge remote-tracking branch 'origin/master' into flip-coroutines 2024-08-20 17:19:17 +02:00
tomberek
6accf86923
Merge pull request #11075 from abathur/macos_sequoia_proto_migration_script
add UID migration script for macOS Sequoia 15
2024-08-19 23:58:48 -04:00
tomberek
ce4e4a158e
Merge pull request #11344 from kjeremy/flake-show-description-manual
Release note for nix flake show change
2024-08-19 23:50:19 -04:00
tomberek
43e82c9446
Merge pull request #11300 from noamraph/homeless-shelter-to-proc
Make $HOME=/proc/homeless-shelter instead of /homeless-shelter
2024-08-19 23:26:41 -04:00
Jeremy Kolb
2926a859a3 Release note for nix flake show change 2024-08-19 15:15:20 -04:00
tomberek
d79b9bdec0
Merge pull request #11246 from NixOS/tomberek.ssl_warning
feat: better warning for common SSL error
2024-08-19 13:51:42 -04:00
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
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
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
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