1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00
Commit graph

18421 commits

Author SHA1 Message Date
mergify[bot]
79828c12e0
Merge pull request #12535 from NixOS/mergify/bp/2.24-maintenance/pr-12391
Only try to chmod /nix/var/nix/profiles/per-user when necessary (backport #12391)
2025-02-20 16:55:38 +00:00
Sandro Jäckel
2a795bb793 Only try to chmod /nix/var/nix/profiles/per-user when necessary
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
(cherry picked from commit dcbf4dcc09)
2025-02-20 16:11:26 +00:00
mergify[bot]
9238c892d3
Merge pull request #12528 from NixOS/mergify/bp/2.24-maintenance/pr-12439
Set FD_CLOEXEC on sockets created by curl (backport #12439)
2025-02-19 20:30:16 +00:00
MaxHearnden
5862686ce2 Set FD_CLOEXEC on sockets created by curl
Curl creates sockets without setting FD_CLOEXEC/SOCK_CLOEXEC, this can
cause connections to remain open forever when using commands like `nix
shell`

This change sets the FD_CLOEXEC flag using a CURLOPT_SOCKOPTFUNCTION
callback.

(cherry picked from commit 12d2527276)
2025-02-19 19:47:40 +00:00
John Ericson
feadb3178d
Merge pull request #12508 from NixOS/mergify/bp/2.24-maintenance/pr-12499
startDaemon(): Detect if the daemon crashes before creating the socket (backport #12499)
2025-02-18 12:21:39 -05:00
Eelco Dolstra
be35515ef7 startDaemon(): Detect if the daemon crashes before creating the socket
This avoids timeouts like those seen in
3735812034.

(cherry picked from commit 11c42cb2e1)
2025-02-18 16:38:55 +00:00
Eelco Dolstra
71f93012fd
Merge pull request #12487 from NixOS/mergify/bp/2.24-maintenance/pr-12481
resolveLookupPathPath(): Fix caching of negative lookups (backport #12481)
2025-02-18 17:27:52 +01:00
Eelco Dolstra
b706642133 resolveLookupPathPath(): Fix caching of negative lookups
This avoids spamming in case the missing search path entry does not
exist (#12480).

(cherry picked from commit df08e1e204)
2025-02-18 16:58:07 +01:00
Eelco Dolstra
658392e029 getDefaultNixPath(): Don't add symlinks if the target doesn't exist
(cherry picked from commit 8ac49ea5de)
2025-02-17 17:08:45 +00:00
mergify[bot]
d3a52c2ef4
Merge pull request #12451 from NixOS/mergify/bp/2.24-maintenance/pr-12448
copyPathToStore(): Preserve symlinks (backport #12448)
2025-02-11 22:21:12 +00:00
Eelco Dolstra
3d6a9c7410 copyPathToStore(): Preserve symlinks
E.g. in a derivation attribute `foo = ./bar`, if ./bar is a symlink,
we should copy the symlink to the store, not its target. This restores
the behaviour of Nix <= 2.19.

(cherry picked from commit 26b87e78b5)

# Conflicts:
#	tests/functional/meson.build
2025-02-11 21:51:20 +00:00
mergify[bot]
0f5f24223d
Merge pull request #12434 from NixOS/mergify/bp/2.24-maintenance/pr-12373
pre-commit/check-merge-conflicts-2: fix use outside dev shell (backport #12373)
2025-02-10 14:37:20 +00:00
Robert Hensing
fcea626e49 test: Fix shellcheck by giving git-hashing scripts shebangs
This seems to be the way to do it now, even though I can't run them
without setting at least one env var.
I'll only fix shellcheck for now. Don't shoot the messenger.

It isn't quite clear to me why the previous commit masked this problem,
but I'm glad shellcheck has an effect or more effect now.
2025-02-10 15:09:36 +01:00
Robert Hensing
c6e09073ea pre-commit/check-merge-conflicts-2: fix use outside dev shell
Note that this is just a script that is meant to run outside a
derivation (but also can be called by a derivation builder).
`touch $out` does not belong in it.

`touch $out` worked accidentally in the derivation-based check,
and also in the dev shell, but if pre-commit is invoked without
the dev shell it would fail.
2025-02-10 15:08:54 +01:00
mergify[bot]
b9e6e00fe1
Merge pull request #12357 from NixOS/mergify/bp/2.24-maintenance/pr-12356
Improve "illegal path references in fixed output derivation" error (backport #12356)
2025-01-28 09:37:45 +00:00
mergify[bot]
5fb6551217
Merge pull request #12365 from NixOS/mergify/bp/2.24-maintenance/pr-12362
refactor: Extract EvalState::realiseString (backport #12362)
2025-01-28 08:51:24 +00:00
Robert Hensing
0f19bfe811 Fix conflict 2025-01-28 09:20:56 +01:00
Robert Hensing
865239c732 refactor: Extract EvalState::realiseString
(cherry picked from commit 7465fbe926)

# Conflicts:
#	src/libexpr/primops.cc
2025-01-27 15:50:52 +00:00
Ben Millwood
9c5482167f Improve "illegal path references in fixed output derivation" error
The main improvement is that the new message gives an example of a path
that is referenced, which should make it easier to track down. While
there, I also clarified the wording, saying exactly why the paths in
question were illegal.

(cherry picked from commit 4e5d1b281e)
2025-01-26 19:38:38 +00:00
Robert Hensing
a28791a91e
Merge pull request #12352 from NixOS/nixfmt-on-2.24
Apply nixfmt (backport 2.24)
2025-01-24 22:01:53 +01:00
Robert Hensing
ae0bb7d71c test: Fix shifted source positions after formatting 2025-01-24 21:32:07 +01:00
Robert Hensing
2f1b70a529 Format .nix files
This does not include any automation for the release branch, but
is based on the configuration of https://github.com/NixOS/nix/pull/12349

    pre-commit run -a nixfmt-rfc-style
2025-01-24 20:30:07 +01:00
Eelco Dolstra
42b22fe3de Actually bump the version
Fixes 532092a812.
2025-01-24 16:47:16 +01:00
mergify[bot]
62e7144ba7
Merge pull request #12344 from NixOS/mergify/bp/2.24-maintenance/pr-12336
libstore: Fix progress bars (backport #12336)
2025-01-24 11:52:17 +00:00
Philipp Otterbein
a106e33bab libstore: fix progress bars
(cherry picked from commit be97dc1efc)
2025-01-24 11:10:16 +00:00
Eelco Dolstra
7616bae342
Merge pull request #12332 from NixOS/mergify/bp/2.24-maintenance/pr-12331
GitRepo::fetch(): Ignore $GIT_DIR (backport #12331)
2025-01-22 22:49:18 +01:00
Eelco Dolstra
1a402db046 GitRepo::fetch(): Ignore $GIT_DIR
Fixes #12325.

(cherry picked from commit 41983dba8f)
2025-01-22 22:10:09 +01:00
Eelco Dolstra
4511c47ab7 GitRepo::fetch(): Cleanup
(cherry picked from commit bd10b859f7)

# Conflicts:
#	src/libfetchers/git-utils.cc
2025-01-22 22:10:09 +01:00
Eelco Dolstra
532092a812 Bump version 2025-01-22 11:20:50 +01:00
Robert Hensing
f22359ba1a
Merge pull request #12287 from bryango/2.24-maintenance
Backport git+file:./ fixes to 2.24 (#12107 + #12277)
2025-01-21 22:36:06 +01:00
mergify[bot]
f366beaa78
Merge pull request #12318 from NixOS/mergify/bp/2.24-maintenance/pr-12315
tests: Wait for network *online* targets and/or multi-user targets (more) (backport #12315)
2025-01-20 18:29:53 +00:00
Robert Hensing
011084b127 tests: Wait for network *online* targets
More prevalent than I thought in 15073e86a

See also 3588783032
which is a failed github-flakes test without "Network is Online"

(cherry picked from commit 6f0bdd9ae7)

# Conflicts:
#	tests/nixos/nix-docker.nix
2025-01-20 18:16:42 +00:00
Eelco Dolstra
d8872fce2c
Merge pull request #12311 from NixOS/mergify/bp/2.24-maintenance/pr-12302
tests: Wait for network *online* and multi-user targets (backport #12302)
2025-01-20 18:27:50 +01:00
Robert Hensing
12c90a0ec0 tests: Wait for network *online* and multi-user targets
This should help prevent some test stalls.

By default, multi-user.target does not imply that the network is fully up.

(cherry picked from commit 15073e86a8)
2025-01-20 16:40:04 +00:00
Eelco Dolstra
296769742b
Merge pull request #12307 from NixOS/mergify/bp/2.24-maintenance/pr-12294
processGraph(): Don't throw ThreadPoolShutDown if there is an exception (backport #12294)
2025-01-20 17:20:40 +01:00
Eelco Dolstra
d31be32c4b
Merge pull request #12299 from NixOS/mergify/bp/2.24-maintenance/pr-12296
addMultipleToStore(): Move pathsToCopy (backport #12296)
2025-01-20 16:25:17 +01:00
Eelco Dolstra
a1b4bc7292 processGraph(): Don't throw ThreadPoolShutDown if there is an exception
Fixes

  $ nix copy --derivation --to /tmp/nix /nix/store/...
  error: cannot enqueue a work item while the thread pool is shutting down

The ThreadPoolShutDown exception was hiding the reason for the thread
pool shut down, e.g.

  error: cannot add path '/nix/store/03sl46khd8gmjpsad7223m32ma965vy9-fix-static.patch' because it lacks a signature by a trusted key

(cherry picked from commit a8c69cc907)
2025-01-20 15:24:44 +00:00
Eelco Dolstra
ff91a777a6 Add comment
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
(cherry picked from commit 2669e4ac4f)
2025-01-20 14:17:51 +00:00
Eelco Dolstra
b4418c5c1d addMultipleToStore(): Move pathsToCopy
This allows RemoteStore::addMultipleToStore() to free the Source
objects early (and in particular the associated sinkToSource()
buffers). This should fix #7359. For example, memory consumption of

  nix copy --derivation --to ssh-ng://localhost?remote-store=/tmp/nix --derivation --no-check-sigs \
    /nix/store/4p9xmfgnvclqpii8pxqcwcvl9bxqy2xf-nixos-system-...drv

went from 353 MB to 74 MB.

(cherry picked from commit cc838e8181)
2025-01-20 14:17:51 +00:00
Eelco Dolstra
876d724061 Add link to tracking issue
(cherry picked from commit 3197c19a31)
2025-01-19 15:41:06 +08:00
Eelco Dolstra
f27e263f89 Warn against the use of relative 'git+file:' flake inputs
(cherry picked from commit 12e14956e2)
2025-01-19 15:38:05 +08:00
Eelco Dolstra
d944cb7f58 Use isAbsolute()
(cherry picked from commit ff9d886f3c)
2025-01-19 14:58:36 +08:00
Robert Hensing
b2acf4ab97 Clarify cd call in tests/functional/flakes/flakes.sh
(cherry picked from commit d9a50c0af2)
2025-01-19 14:56:13 +08:00
Bryan Lai
d4f0e8f4e3 tests/flake-in-submodule: git+file:./* input
(cherry picked from commit 37ac18d1d9)
2025-01-19 14:56:11 +08:00
Bryan Lai
84e3f4ad79 tests/flakes: check git+file:./${submodule} protocol
Relative, local git repo used to work (for submodules), but it
fails after 3e0129ce3b.

This commit adds a test to prevent such failure in the future.

(cherry picked from commit 9d088fa502)
2025-01-19 14:55:51 +08:00
Bryan Lai
6e44bc2a89 fetchers/git: make path absolute for local repo
(cherry picked from commit 96bd9bad2f)
2025-01-19 14:55:49 +08:00
mergify[bot]
2009cc137a
Merge pull request #12278 from NixOS/mergify/bp/2.24-maintenance/pr-12258
sequoia-nixbld-user-migration: nail down PATH (backport #12258)
2025-01-16 16:49:44 +00:00
Travis A. Everett
0cefe354c8 sequoia-nixbld-user-migration: nail down PATH
Fixes a user report of trouble with toybox grep and avoids
potential of same basic issue with other utils.

(cherry picked from commit 6a874c2865)

# Conflicts:
#	scripts/sequoia-nixbld-user-migration.sh
2025-01-16 16:43:56 +00:00
mergify[bot]
c6f504d827
Merge pull request #12239 from NixOS/mergify/bp/2.24-maintenance/pr-12237
Reject merge conflicts (backport #12237)
2025-01-15 19:40:36 +00:00
mergify[bot]
6e718c7c5c
Merge pull request #12259 from NixOS/mergify/bp/2.24-maintenance/pr-11922
gc: resume GC after a pathinuse error (backport #11922)
2025-01-15 16:42:29 +00:00