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

20080 commits

Author SHA1 Message Date
Brian McKenna
7c8c71f8e9 Totally exclude nix::setStackSize on Windows 2025-01-31 21:11:45 +11:00
Eelco Dolstra
c8b22643ba 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'
2025-01-30 19:03:34 +01:00
Eelco Dolstra
ee9fa0d360 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'
2025-01-30 19:03:34 +01:00
Eelco Dolstra
9f72d5bce9 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.
2025-01-30 19:03:34 +01:00
Eelco Dolstra
3032512425 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().
2025-01-30 12:41:02 +01:00
Eelco Dolstra
177a067d66
Merge pull request #12372 from roberth/test-characterisation-log-to-stderr
tests/functional/characterisation/framework: Log to stderr
2025-01-30 11:34:39 +01:00
Eelco Dolstra
102d90ebf0 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.
2025-01-30 11:27:24 +01:00
Eelco Dolstra
cfe93299b1
Merge pull request #12378 from DeterminateSystems/fix-shellcheck
Fix shellcheck warnings
2025-01-29 15:49:00 +01:00
Eelco Dolstra
fa87ad6a7c Fix shellcheck warnings 2025-01-29 15:34:49 +01: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
a5de2dd274 tests/functional/characterisation/framework: Log to stderr
It seems that `meson test --print-errorlogs` only captures stderr,
so this makes it forward the logs as intended.

We might want to redirect stdout in our common setup script instead.
2025-01-28 09:26:33 +01: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
Robert Hensing
fbe2940a08
Merge pull request #12363 from roberth/issue-12161
Issue #12161, add `meta.mainProgram`
2025-01-28 09:15:14 +01: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
Eelco Dolstra
8d744957a6
Merge pull request #12362 from roberth/refactor-realiseString
refactor: Extract EvalState::realiseString
2025-01-27 16:49:58 +01:00
Leandro Reina
6a3b4afc0a Merge remote-tracking branch 'upstream/master' into lfs 2025-01-27 14:44:41 +01:00
Eelco Dolstra
6a2198dfad
Merge pull request #12251 from nix-windows/local-store/fix-infinite-loop
local-store: fix infinite loop on Windows
2025-01-27 14:38:57 +01:00
Robert Hensing
850329dea5 packages.nix-cli: Add meta.mainProgram 2025-01-27 14:27:14 +01:00
Robert Hensing
0d7418b4fe packages.default: Add meta.mainProgram 2025-01-27 14:26:15 +01:00
Robert Hensing
7465fbe926 refactor: Extract EvalState::realiseString 2025-01-27 12:32:46 +01: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
John Ericson
06de255f5c
Merge pull request #12356 from Artturin/illegalpathrefprint
Improve "illegal path references in fixed output derivation" error
2025-01-26 14:37:51 -05:00
Ben Millwood
4e5d1b281e 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.
2025-01-25 20:10:43 +02: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
Robert Hensing
85a3071fc9
Merge pull request #12349 from NixOS/nixfmt
Apply nixfmt
2025-01-24 20:22:33 +01:00
Robert Hensing
b04077c0ec fix: Update shifted source positions after formatting
Carefully reviewed...
2025-01-24 18:53:42 +01:00
Robert Hensing
96e550efc5 Format .nix files
... with nixfmt (rfc style)
2025-01-24 17:04:02 +01:00
Robert Hensing
ba6425a7d0 dev: Configure nixfmt (rfc style) 2025-01-24 17:02:50 +01:00
Eelco Dolstra
99dbcca5f1
Merge pull request #12351 from DeterminateSystems/test-12339
Add a test for #12339
2025-01-24 16:24:14 +01:00
Eelco Dolstra
6cb17fd836 Bump version 2025-01-24 16:20:43 +01:00
Eelco Dolstra
d48d464c8b Add a test for #12339 2025-01-24 15:25:10 +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
Robert Hensing
c527fe0f96
Merge pull request #12347 from DeterminateSystems/fix-12339
EvalState::resolveLookupPathPath(): Call resolveSymlinks() before pathExists()
2025-01-24 14:45:16 +01:00
Robert Hensing
4166f59a7b
Merge pull request #12348 from NixOS/doc-building-11799
doc/building: Update for #11799
2025-01-24 13:02:10 +01: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
Robert Hensing
ace52b10c9 doc/building: Update for #11799
Reflect the shorter attribute name, changed in
f168a6e739
https://github.com/NixOS/nix/pull/11799
2025-01-24 12:41:26 +01:00
Eelco Dolstra
00d9e7e1f4 EvalState::resolveLookupPathPath(): Call resolveSymlinks() before pathExists()
Fixes #12339.
2025-01-24 12:15:07 +01:00
Philipp Otterbein
9cf3d3368e libstore: fix progress bars
(cherry picked from commit be97dc1efc)
2025-01-24 11:10:50 +00:00
Robert Hensing
10c8d7988d
Merge pull request #12336 from NaN-git/fix-progress
libstore: Fix progress bars
2025-01-24 12:08:50 +01:00
Robert Hensing
9837affddc
Merge pull request #12338 from DeterminateSystems/input-attr-path
Rename InputPath -> InputAttrPath
2025-01-24 12:06:37 +01:00
Eelco Dolstra
7dfff58292 Rename InputPath -> InputAttrPath
Fixes #12098.
2025-01-23 16:34:35 +01:00
Eelco Dolstra
9060d0fe46 Fix missing format argument 2025-01-23 16:21:30 +01:00
Eelco Dolstra
261b213272
Merge pull request #11900 from DeterminateSystems/fix-help-test
Fix help test in dev shell
2025-01-23 15:20:34 +01:00
Eelco Dolstra
5b43163c6d Disable 'man' tests 2025-01-23 14:54:05 +01:00