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

19173 commits

Author SHA1 Message Date
mergify[bot]
b3e9204833
Merge pull request #12459 from NixOS/mergify/bp/2.26-maintenance/pr-12458
lockFlake(): When refetching a locked flake, use the locked ref (backport #12458)
2025-02-12 16:09:58 +00:00
Eelco Dolstra
0ff190107f
Resolve merge conflict 2025-02-12 16:54:48 +01:00
Eelco Dolstra
dffcc184d7 lockFlake(): When refetching a locked flake, use the locked ref
Otherwise we may accidentally update a lock when we shouldn't.

Fixes #12445.

(cherry picked from commit 5c552b62fc)

# Conflicts:
#	src/libflake/flake/flake.cc
2025-02-12 15:46:52 +00:00
Eelco Dolstra
49f226e87b
Merge pull request #12457 from NixOS/mergify/bp/2.26-maintenance/pr-12450
packaging/components.nix: Don't import a symlink (backport #12450)
2025-02-12 12:56:51 +01:00
Eelco Dolstra
d308228497 Don't import a symlink
This is a workaround to avoid differing evaluation results between Nix
2.19 and >= 2.20 (#12449).

(cherry picked from commit 2e20a5f822)
2025-02-12 11:42:49 +00:00
Eelco Dolstra
dfbd030d3f
Merge pull request #12453 from NixOS/mergify/bp/2.26-maintenance/pr-12448
copyPathToStore(): Preserve symlinks (backport #12448)
2025-02-11 23:16:31 +01:00
Eelco Dolstra
83306bb841 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)
2025-02-11 21:51:39 +00:00
mergify[bot]
4c3786dd40
Merge pull request #12436 from NixOS/mergify/bp/2.26-maintenance/pr-12373
pre-commit/check-merge-conflicts-2: fix use outside dev shell (backport #12373)
2025-02-10 15:15:29 +00:00
Robert Hensing
0531f1299c Resolve conflict 2025-02-10 16:01:13 +01:00
Robert Hensing
df8d5e61ad 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:14:53 +01:00
Robert Hensing
30435e0559 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:14:44 +01:00
Eelco Dolstra
31bdb2a8ff
Merge pull request #12429 from NixOS/mergify/bp/2.26-maintenance/pr-12386
Git fetcher: Don't create refs when fetching by revision (backport #12386)
2025-02-06 15:24:14 +01:00
Eelco Dolstra
8e4cd2f537 readHead(): Make sure we're returning the HEAD ref line
If we previously fetched by revision, the output of "git ls-remote"
won't start with the expected line like

  ref: refs/heads/master HEAD

but will be something like

  5c4410e3b9891c05ab40d723de78c6f0be45ad30        refs/heads/5c4410e3b9891c05ab40d723de78c6f0be45ad30

This then causes Nix to treat that revision as a refname, which then
leads to warnings like

  warning: could not update cached head '5c4410e3b9891c05ab40d723de78c6f0be45ad30' for 'file:///tmp/repo'

(cherry picked from commit c8b22643ba)
2025-02-06 14:05:03 +00:00
Eelco Dolstra
1fe33c13d9 Git fetcher: Don't use refspec <rev>:<rev>
This causes Git to create a local ref named refs/head/<rev>, e.g.

  $ git -C ~/.cache/nix/gitv3/11irpim06vj4h6c0w8yls6kx4hvl0qd0gr1fvk47n76g6wf1s1vk ls-remote --symref .
  5c4410e3b9891c05ab40d723de78c6f0be45ad30        refs/heads/5c4410e3b9891c05ab40d723de78c6f0be45ad30
  7f6bde8a20de4cccc2256f088bc5af9dbe38881d        refs/heads/7f6bde8a20de4cccc2256f088bc5af9dbe38881d

which confuses readHead(), leading to errors like

  fatal: Refusing to point HEAD outside of refs/
  warning: could not update cached head 'd275d93aa0bb8a004939b2f1e87f559f989453be' for 'file:///tmp/repo'

(cherry picked from commit ee9fa0d360)
2025-02-06 14:05:03 +00:00
Eelco Dolstra
727cf59997 Git fetcher: Don't pass URL query parameters for file:// URLs
Git interprets them as part of the file name, so passing parameters
like 'rev' breaks. Only relevant for testing (when _NIX_FORCE_HTTP is
set) and local bare repos.

(cherry picked from commit 9f72d5bce9)
2025-02-06 14:05:02 +00:00
mergify[bot]
acba2c6f4f
Merge pull request #12406 from NixOS/mergify/bp/2.26-maintenance/pr-12405
nix-profile.fish: Typo NIX_SS{H => L}_CERT_FILE (backport #12405)
2025-02-03 12:50:41 +00:00
Illia Bobyr
491aaaf116 nix-profile.fish: Typo NIX_SS{H => L}_CERT_FILE
(cherry picked from commit 803fb83f7f)

# Conflicts:
#	scripts/nix-profile.fish.in
2025-02-03 12:36:51 +00:00
mergify[bot]
862b3f41a4
Merge pull request #12396 from NixOS/mergify/bp/2.26-maintenance/pr-12385
Fix duplicate setPathDisplay() (backport #12385)
2025-02-02 03:05:49 +00:00
Eelco Dolstra
28684af74b GitExportIgnoreSourceAccessor: Don't show «unknown»
In general we should set the path display prefix on the inner
accessor, so we now pass the display prefix to getAccessor().

(cherry picked from commit 3032512425)
2025-02-02 02:10:53 +00:00
Eelco Dolstra
1c1f8b2343 Fix duplicate setPathDisplay()
Fixes messages like 'copying /tmp/repo/tmp/repo to the store'. The
PosixSourceAccessor already sets the prefix. Setting the prefix twice
shouldn't be a problem, but GitRepoImpl::getAccessor() returns a
wrapped accessor so it's not actually idempotent.

(cherry picked from commit 102d90ebf0)
2025-02-02 02:10:53 +00:00
mergify[bot]
a02e814b4b
Merge pull request #12371 from NixOS/mergify/bp/2.26-maintenance/pr-12363
Issue #12161, add `meta.mainProgram` (backport #12363)
2025-01-28 08:39:15 +00:00
Robert Hensing
a75cf57702 packages.nix-cli: Add meta.mainProgram
(cherry picked from commit 850329dea5)
2025-01-28 08:16:00 +00:00
Robert Hensing
605bd06ca4 packages.default: Add meta.mainProgram
(cherry picked from commit 0d7418b4fe)
2025-01-28 08:16:00 +00:00
mergify[bot]
84efd3ecf2
Merge pull request #12367 from NixOS/mergify/bp/2.26-maintenance/pr-12362
refactor: Extract EvalState::realiseString (backport #12362)
2025-01-27 16:08:41 +00:00
Robert Hensing
527e68ac3e refactor: Extract EvalState::realiseString
(cherry picked from commit 7465fbe926)
2025-01-27 15:51:30 +00:00
mergify[bot]
2fce659c7d
Merge pull request #12359 from NixOS/mergify/bp/2.26-maintenance/pr-12356
Improve "illegal path references in fixed output derivation" error (backport #12356)
2025-01-26 20:10:39 +00:00
Ben Millwood
791d6cf433 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:39:33 +00:00
Robert Hensing
3e0d9ff937
Merge pull request #12354 from NixOS/nixfmt-on-2.26
Apply nixfmt (backport 2.26)
2025-01-24 22:43:06 +01:00
Robert Hensing
f629d81df0 test: Fix shifted source positions after formatting 2025-01-24 22:21:27 +01:00
Robert Hensing
32aed360b8 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:40:21 +01:00
Eelco Dolstra
6cb17fd836 Bump version 2025-01-24 16:20:43 +01:00
mergify[bot]
36bd92736f
Merge pull request #12350 from NixOS/mergify/bp/2.26-maintenance/pr-12347
EvalState::resolveLookupPathPath(): Call resolveSymlinks() before pathExists() (backport #12347)
2025-01-24 14:02:15 +00:00
Eelco Dolstra
90159cb197 EvalState::resolveLookupPathPath(): Call resolveSymlinks() before pathExists()
Fixes #12339.

(cherry picked from commit 00d9e7e1f4)
2025-01-24 13:46:16 +00:00
mergify[bot]
4cfeb8d1bb
Merge pull request #12346 from NixOS/mergify/bp/2.26-maintenance/pr-12336
libstore: Fix progress bars (backport #12336)
2025-01-24 11:46:16 +00:00
Philipp Otterbein
9cf3d3368e libstore: fix progress bars
(cherry picked from commit be97dc1efc)
2025-01-24 11:10:50 +00:00
Eelco Dolstra
aab6419b63
Merge pull request #12334 from NixOS/mergify/bp/2.26-maintenance/pr-12331
GitRepo::fetch(): Ignore $GIT_DIR (backport #12331)
2025-01-22 22:00:16 +01:00
Eelco Dolstra
832221650b GitRepo::fetch(): Ignore $GIT_DIR
Fixes #12325.

(cherry picked from commit 41983dba8f)
2025-01-22 20:30:29 +00:00
Eelco Dolstra
2301d86f32 GitRepo::fetch(): Cleanup
(cherry picked from commit bd10b859f7)
2025-01-22 20:30:28 +00:00
Eelco Dolstra
91e60321f6 Bump version 2025-01-22 13:36:30 +01:00
Eelco Dolstra
28752fe288 Mark official release 2025-01-22 12:16:44 +01:00
Eelco Dolstra
7af6329005
Merge pull request #12326 from NixOS/release-notes
Nix 2.26 release notes
2025-01-22 12:12:04 +01:00
Eelco Dolstra
21f2e29176 Add release credits 2025-01-22 12:01:00 +01:00
Eelco Dolstra
617bf84518 Add a few more release notes 2025-01-22 11:55:20 +01:00
Eelco Dolstra
d8dbb71c92 release notes: 2.26.0 2025-01-22 11:45:04 +01:00
Eelco Dolstra
069ca2a21a
Merge pull request #12324 from NixOS/disable-lto
x86_64-darwin: Disable LTO
2025-01-21 18:29:35 +01:00
Eelco Dolstra
b09b4dc995 x86_64-darwin: Disable LTO
LTO on x86_64-darwin appears to break the ability to catch exceptions
correctly (maybe just for exception types defined in different
libraries). This leads to many weird test failures,
e.g. https://hydra.nixos.org/build/286312387 and
https://hydra.nixos.org/build/286312341.
2025-01-21 18:10:12 +01:00
Eelco Dolstra
b8c296f0de
Merge pull request #12322 from DeterminateSystems/fix-fetchurl-test
Fix fetchurl test
2025-01-21 14:19:54 +01:00
Eelco Dolstra
9e324df383 Fix fetchurl test
https://hydra.nixos.org/build/286311974
2025-01-21 14:09:17 +01:00
Eelco Dolstra
27c9f7ef78 Fix name 2025-01-21 14:07:20 +01:00
Eelco Dolstra
9a71c3c60d
Merge pull request #12321 from DeterminateSystems/fix-nix-everything
Fix nix-everything build
2025-01-21 11:26:27 +01:00