Commit graph

18344 commits

Author SHA1 Message Date
Eelco Dolstra
12fd65d179 Disable subflakes test
Relative path flakes ("subflakes") are basically fundamentally
broken, since they produce lock file entries like

  "locked": {
    "lastModified": 1,
    "narHash": "sha256-/2tW9SKjQbRLzfcJs5SHijli6l3+iPr1235zylGynK8=",
    "path": "./flakeC",
    "type": "path"
  },

that don't specify what "./flakeC" is relative to. They *sometimes*
worked by accident because the `narHash` field allowed
`fetchToStore()` to get the store path of the subflake *if* it
happened to exist in the local store or in a substituter.

Subflakes are properly fixed in #10089 (which adds a "parent" field to
the lock file). Rather than come up with some crazy hack to make them
work in the interim, let's just disable the only test that depends on
the broken behaviour for now.
2024-09-11 21:58:32 +02:00
Eelco Dolstra
30aa45a373 Formatting 2024-09-11 20:35:04 +02:00
Eelco Dolstra
e557096cef Add release note 2024-09-11 17:32:16 +02:00
Eelco Dolstra
3fbd71701a Add test 2024-09-11 17:27:39 +02:00
Eelco Dolstra
aa41de7d82 Merge remote-tracking branch 'origin/master' into no-flake-substitution 2024-09-11 17:10:55 +02:00
Eelco Dolstra
46339db18d
Merge pull request #11471 from zimbatm/hacking-md
doc: add HACKING.md symlink
2024-09-11 14:54:28 +02:00
Eelco Dolstra
9a7c0d8933
Merge pull request #11473 from Artturin/keepfailedreadable
Fix making the build directory kept by `keep-failed` readable
2024-09-11 14:52:50 +02:00
Eelco Dolstra
894da59186
Merge pull request #11447 from DeterminateSystems/nix-flake-metadata-chroot-store
nix flake {metadata,archive}: Fix chroot stores
2024-09-11 14:51:56 +02:00
Noam Yorav-Raphael
38bfbb297c
Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined (#11351) 2024-09-11 10:36:46 +00:00
tomberek
c60e1be62c
Merge pull request #11438 from zimbatm/nix-fmt-pwd
fix(nix fmt): remove the default "." argument
2024-09-10 23:44:16 -04:00
tomberek
b30b3b27f8
Merge pull request #11476 from abathur/sequoia_migration_undebug
sequoia-nixbld-user-migration: disable trace mode
2024-09-10 23:35:23 -04:00
Travis A. Everett
f2e7e996da sequoia-nixbld-user-migration: disable trace mode
Was hoping to leave this enabled for a little while as core community
members test this script out, but Apple's aggressive release timeline
for macOS 15 Sequoia has caught us off-guard here.

It's probably not ideal for a general audience if the script spews all
of this output--and people can still force bash to run in trace mode
if we really need to debug a problem.
2024-09-10 20:54:09 -05:00
Artturin
ebebe626ff Fix making the build directory kept by keep-failed readable
Caused by 1d3696f0fb

Without this fix the kept build directory is readable only by root

```
$ sudo ls -ld /comp-temp/nix-build-openssh-static-x86_64-unknown-linux-musl-9.8p1.drv-5
drwx------ root root 60 B Wed Sep 11 00:09:48 2024  /comp-temp/nix-build-openssh-static-x86_64-unknown-linux-musl-9.8p1.drv-5/

$ sudo ls -ld /comp-temp/nix-build-openssh-static-x86_64-unknown-linux-musl-9.8p1.drv-5/build
drwxr-xr-x nixbld1 nixbld 80 B Wed Sep 11 00:09:58 2024  /comp-temp/nix-build-openssh-static-x86_64-unknown-linux-musl-9.8p1.drv-5/build/
```
2024-09-11 00:23:14 +03:00
zimbatm
c4766d7b8b fix(nix fmt): remove the default "." argument
When `nix fmt` is called without an argument, Nix appends the "." argument before calling the formatter. The comment in the code is:
> Format the current flake out of the box

This also happens when formatting sub-folders.

This means that the formatter is now unable to distinguish, as an interface, whether the "." argument is coming from the flake or the user's intent to format the current folder. This decision should be up to the formatter.

Treefmt, for example, will automatically look up the project's root and format all the files. This is the desired behaviour. But because the "." argument is passed, it cannot function as expected.
2024-09-10 22:18:56 +02:00
Eelco Dolstra
b9d3cdfbd2
Merge pull request #11472 from Mic92/darwin-fix
add missing filesystem include (x86_64-darwin fix)
2024-09-10 17:33:09 +02:00
Jörg Thalheim
1ca1439b1f add missing filesystem include (x86_64-darwin fix) 2024-09-10 16:45:39 +02:00
zimbatm
be480971c2 doc: add HACKING.md symlink
As a hacker, I should be able to checkout the repo, and find relevant
information on how to develop in the project somewhere in the top-level.
Either in the README.md, or CONTRIBUTING.md or HACKING.md files.

This PR symlinks the HACKING.md into the right place in the manual.
2024-09-10 15:26:38 +02:00
Eelco Dolstra
9c0e968843
Merge commit from fork
Fix unsafe NAR unpacking
2024-09-10 12:42:55 +02:00
Tom Bereknyei
c55b285cf9 tests: test was re-named 2024-09-09 22:15:45 -04:00
Eelco Dolstra
c5a4dfa660 nix flake {metadata,archive}: Fix chroot stores
Fixes

  $ nix flake metadata --store /tmp/nix nixpkgs
  error: path '/tmp/nix/nix/store/65xpqkz92d9j7k5ric4z8lzhiigxsfbg-source/flake.nix' is not in the Nix store

This has been broken since 598deb2b23.
2024-09-09 15:41:38 +02:00
Eelco Dolstra
5ca2f58798 Improve use-case-hack description slightly 2024-09-09 14:29:05 +02:00
Eelco Dolstra
4cfa59fdb3 Typo 2024-09-09 14:11:35 +02:00
Eelco Dolstra
4c7a6ffee7
Merge pull request #11380 from roberth/eco-friendly-progress-bar
progress-bar: Only write when truly updated
2024-09-09 13:58:42 +02:00
Eelco Dolstra
5e337ee60d
Merge pull request #11412 from parkerhoyes/daemon-cgroup
Move daemon process into sub-cgroup
2024-09-09 13:49:31 +02:00
Robert Hensing
69e925640f
Merge pull request #11432 from fricklerhandwerk/docs-defexpr
docs: small fixups on the default expression
2024-09-08 12:31:23 +02:00
Robert Hensing
c955563b64 fix: Avoid deadlock in ProgressBar::redraw() 2024-09-08 11:44:24 +02:00
Robert Hensing
e10ea78f93 refact: Inline ProgressBar::draw(state, newOutput), inline local output 2024-09-08 01:23:01 +02:00
Robert Hensing
047d9643b5 refact: Extract ProgressBar::redraw(newOutput) 2024-09-08 01:23:01 +02:00
Robert Hensing
9df5236c46 progress-bar: Only write when truly updated 2024-09-08 01:04:14 +02:00
Robert Hensing
9ae7140beb
Merge pull request #11436 from fricklerhandwerk/reword-nix-expr-gloss
docs: reword glossary entry on Nix expression
2024-09-07 22:47:32 +01:00
Robert Hensing
791f943761
Merge pull request #11437 from fricklerhandwerk/default-nix-path-docs
docs: explain provenance of default `nix-path` values
2024-09-07 22:38:50 +01:00
Eelco Dolstra
52ba3cc5ea Test that deserializing regular files / symlinks is exclusive 2024-09-06 16:28:09 +02:00
Eelco Dolstra
f15aef2a79
Merge pull request #11413 from cole-h/fixup-daemon-service
fixup: use the real bindir for systemd unit's bindir
2024-09-06 15:56:44 +02:00
Eelco Dolstra
644a034783
Merge pull request #11440 from fricklerhandwerk/fix-docs-build-instructions
update instructions to build the manual
2024-09-06 15:48:52 +02:00
Eelco Dolstra
bb1af0645e
Merge pull request #11439 from Mic92/revert-warning
Revert "fix: Error on malformed URI query parameter"
2024-09-06 15:48:18 +02:00
Valentin Gagarin
92be107c8e update instructions to build the manual 2024-09-06 10:33:12 +02:00
Eelco Dolstra
9fcb588dd8 RestoreSink::createDirectory(): Use append()
On macOS, `mkdir("x/')` behaves differently than `mkdir("x")` if `x` is
a dangling symlink (the formed succeed while the latter fails). So make
sure we always strip the trailing slash.
2024-09-05 22:21:53 +02:00
Eelco Dolstra
21dcbd7e83 Fix test on macOS 2024-09-05 20:55:24 +02:00
Eelco Dolstra
7a765a6aaf Test that deserializing NARs with names with equal Unicode normal forms fails on macOS
The test is based on the one by @puckipedia but with the file names
swapped to make them sorted.
2024-09-05 20:37:26 +02:00
Eelco Dolstra
3557587381 Detect NAR directory entries that collide with another path after case-hacking
The test was made by @puckipedia.
2024-09-05 19:26:10 +02:00
Eelco Dolstra
77c090cdbd More tests 2024-09-05 16:54:12 +02:00
Eelco Dolstra
da1ad28912 Test that nix-store --restore fails if the output already exists
This restores the behaviour from before the std::filesystem
refactorings.
2024-09-05 16:48:43 +02:00
Eelco Dolstra
83d5b32803 Add test case for NARs with duplicate directory entries
This test was made by @puckipedia.
2024-09-05 16:41:15 +02:00
Jörg Thalheim
5a5a010120 Revert "fix: Error on malformed URI query parameter"
This reverts commit c9f45677b5.

This now triggers on simple cases like `nix build .#nix`.
Reverting for now.
2024-09-05 15:18:16 +02:00
Jörg Thalheim
a81083d080 Revert "Update src/libutil/url.cc"
This reverts commit 9b1cefe27e.
2024-09-05 15:18:16 +02:00
Valentin Gagarin
a1cc362d9d
fix broken link (#11435) 2024-09-05 08:34:07 +00:00
tomberek
5bfe198ad5
Merge pull request #11433 from abathur/fix_sequoia_migration_gid
use existing GID in sequoia migration script
2024-09-05 00:20:56 -04:00
Valentin Gagarin
17655ecfef docs: explain provenance of default nix-path values
this should make it more obvious how things are related to each other, and also
hopefully expose the historical context without having to say on every
corner that these details are accounting for legacy decisions.
2024-09-05 04:35:06 +02:00
Valentin Gagarin
48249e001a docs: reword glossary entry on Nix expression
this makes it less cumbersome to read and puts the statements in
meaningful order.
2024-09-05 04:13:43 +02:00
Valentin Gagarin
38d9d536a8 docs: small fixups on the default expression
- highlighted example
- linked definitions to the glossary (this is a shorter read)
- fixed some artefact
2024-09-05 03:32:30 +02:00