John Ericson
328a3bbbd0
Regression test for issue #14287
...
This will currently fail, until the bug is fixed.
Co-Authored-By: Sergei Zimmerman <sergei@zimmerman.foo>
(cherry picked from commit 246dbe1c05 )
2025-10-29 07:59:08 +00:00
Sergei Zimmerman
44701007b4
libfetchers/git-utils: Be more correct about validating refnames
...
Turns out there's a much better API for this that doesn't have the
footguns of the previous method.
isLegalRefName is somewhat of a misnomer, since it's mainly used to
validate user inputs that can be either references, branch names,
psedorefs or tags.
(cherry picked from commit 5d1178b817 )
2025-10-15 20:08:43 +00:00
Sergei Zimmerman
11f9c59140
Remove validation of URLs passed to FileTransferRequest verbatim
...
CURL is not very strict about validation of URLs passed to it. We
should reflect this in our handling of URLs that we get from the user
in <nix/fetchurl.nix> or builtins.fetchurl. ValidURL was an attempt to
rectify this, but it turned out to be too strict. The only good way to
resolve this is to pass (in some cases) the user-provided string verbatim
to CURL. Other usages in libfetchers still benefit from using structured
ParsedURL and validation though.
nix store prefetch-file --name foo 'https://cdn.skypack.dev/big.js @^5.2.2'
error: 'https://cdn.skypack.dev/big.js @^5.2.2' is not a valid URL: leftover
(cherry picked from commit 47f427a172 )
2025-10-13 20:48:15 +00:00
Eelco Dolstra
c5799aa62c
exportReferencesGraph: Handle heterogeneous arrays
...
This barfed with
error: [json.exception.type_error.302] type must be string, but is array
on `nix build github:malt3/bazel-env#bazel-env` because it has a `exportReferencesGraph` with a value like `["string",...["string"]]`.
(cherry picked from commit 94f410b628 )
2025-10-08 23:13:09 +00:00
Eelco Dolstra
1e709554d5
Merge pull request #14050 from NixOS/fix-fetch-to-store-caching
...
Fix fetchToStore caching
2025-10-06 19:39:41 +02:00
Eelco Dolstra
e7e2ac97f8
Merge remote-tracking branch 'origin/master' into external-derivation-builder
2025-10-06 11:40:56 +02:00
Sergei Zimmerman
ce749454dc
Revert "Merge pull request #14022 from obsidiansystems/derivation-resolution-goal"
...
This reverts commit d02dca099f , reversing
changes made to 9bd09155ac .
2025-10-05 21:54:59 +03:00
Eelco Dolstra
73e4c40e64
Add test for external-builders
2025-10-03 16:32:32 +02:00
Eelco Dolstra
d5d7ca01b3
Merge pull request #14138 from lovesegfault/nix-fix-4313
...
fix(libfetchers): substitute fetchTarball and fetchurl
2025-10-03 15:13:06 +02:00
Bernardo Meurer Costa
1e92b61750
fix(libfetchers): substitute fetchTarball and fetchurl
...
Fixes #4313 by enabling builtins.fetchurl, builtins.fetchTarball to use
binary cache substituters before attempting to download from the
original URL.
2025-10-02 19:33:02 +00:00
Sergei Zimmerman
28adcfda32
Merge pull request #14119 from NixOS/hide-derivation-internal
...
libexpr: Move derivation-internal.nix from corepkgsFS to internalFS
2025-10-01 20:58:17 +00:00
Jörg Thalheim
d02dca099f
Merge pull request #14022 from obsidiansystems/derivation-resolution-goal
...
Introduce `DerivationResolutionGoal`, fix substituting a single CA drv output
2025-10-01 22:53:58 +02:00
Sergei Zimmerman
2a0fddc7d5
libexpr: Move derivation-internal.nix from corepkgsFS to internalFS
...
Best I can tell this was never supposed to be exposed to the user
and has been this way since 2.19.
2.18 did not expose this file to the user:
nix run nix/2.18-maintenance -- eval --expr "import <nix/derivation-internal.nix>"
error: getting status of '/__corepkgs__/derivation-internal.nix': No such file or directory
2025-10-01 23:13:11 +03:00
Farid Zakaria
015b639cea
shellcheck fix: tests/functional/why-depends.sh
2025-09-30 20:27:51 -07:00
Farid Zakaria
c8ef6dfa5a
shellcheck fix: tests/functional/user-envs.sh
2025-09-30 20:27:50 -07:00
Farid Zakaria
13eac5295d
shellcheck fix: tests/functional/user-envs.builder.sh
2025-09-30 20:23:02 -07:00
Farid Zakaria
049c4c7546
shellcheck fix: tests/functional/user-envs-test-case.sh
2025-09-30 20:22:11 -07:00
Farid Zakaria
359e73a6db
shellcheck fix: tests/functional/user-envs-migration.sh
2025-09-30 20:20:13 -07:00
Farid Zakaria
799cd62ec8
shellcheck fix: tests/functional/toString-path.sh
2025-09-30 20:19:47 -07:00
Farid Zakaria
b349783830
shellcheck fix: tests/functional/supplementary-groups.sh
2025-09-30 20:19:27 -07:00
Farid Zakaria
8c9bfb6e12
shellcheck fix: tests/functional/simple.builder.sh
2025-09-30 20:18:48 -07:00
Farid Zakaria
7266a51412
shellcheck fix: tests/functional/selfref-gc.sh
2025-09-30 20:17:55 -07:00
Farid Zakaria
b8f1a8a0c1
shellcheck fix: tests/functional/selfref-gc.sh
2025-09-30 20:17:55 -07:00
Farid Zakaria
1a5ccbeafc
shellcheck fix: tests/functional/secure-drv-outputs.sh
2025-09-30 20:17:55 -07:00
Farid Zakaria
b42ed6a74d
shellcheck fix: tests/functional/restricted.sh
2025-09-30 20:17:55 -07:00
Farid Zakaria
d35d86da89
shellcheck fix: tests/functional/repair.sh
2025-09-30 20:17:54 -07:00
Farid Zakaria
06f21e101f
shellcheck fix: tests/functional/remote-store.sh
2025-09-30 20:15:34 -07:00
Farid Zakaria
7ed4011990
shellcheck fix: tests/functional/referrers.sh
2025-09-30 20:15:34 -07:00
Farid Zakaria
5d1333bf4b
shellcheck fix: tests/functional/recursive.sh
2025-09-30 20:15:34 -07:00
Farid Zakaria
8a36cf4422
shellcheck fix: tests/functional/readfile-context.sh
2025-09-30 20:15:34 -07:00
Farid Zakaria
c8a7719614
shellcheck fix: tests/functional/read-only-store.sh
2025-09-30 20:15:34 -07:00
Farid Zakaria
b951e6e1ed
shellcheck fix: tests/functional/pure-eval.sh
2025-09-30 20:15:34 -07:00
Farid Zakaria
bcd8311ec6
shellcheck fix: tests/functional/post-hook.sh
2025-09-30 20:15:33 -07:00
Farid Zakaria
1aaa3dafee
shellcheck fix: tests/functional/placeholders.sh
2025-09-30 19:54:29 -07:00
Farid Zakaria
c82aa04a3d
shellcheck fix: tests/functional/path-info.sh
2025-09-30 19:53:54 -07:00
Farid Zakaria
112c9d8f54
shellcheck fix: tests/functional/path-from-hash-part.sh
2025-09-30 19:53:33 -07:00
Farid Zakaria
32cbf5f55a
shellcheck fix: tests/functional/pass-as-file.sh
2025-09-30 19:52:44 -07:00
John Ericson
39f6fd9b46
Fix #13247
...
Resolve the derivation before creating a building goal, in a context
where we know what output(s) we want. That way we have a chance just to
download the outputs we want.
Fix #13247
2025-09-30 11:29:19 -04:00
John Ericson
8f4a739d0f
Split out DerivationResolutionGoal
...
This prepares the way for fixing a few issues.
2025-09-30 11:25:52 -04:00
John Ericson
d76dc2406f
Merge pull request #14060 from obsidiansystems/build-result-variant
...
Use `std::variant` to enforce `BuildResult` invariants
2025-09-30 11:02:13 -04:00
Jörg Thalheim
bc66e131f8
Merge pull request #14120 from lovesegfault/http-binary-cache-compression
...
feat(libstore/http-binary-cache-store): narinfo/ls/log compression
2025-09-30 12:50:10 +02:00
Jörg Thalheim
3fcd33079c
add http binary cache test for compression options
2025-09-30 10:35:46 +02:00
Jörg Thalheim
13a236ba29
Merge pull request #14114 from fzakaria/fzakaria/shellcheck-multiple-4
...
shellcheck fixes continued
2025-09-29 21:32:19 +02:00
Farid Zakaria
ef17baf50d
shellcheck fix: tests/functional/parallel.sh
2025-09-29 10:52:17 -07:00
Farid Zakaria
4dc5dbaba2
shellcheck fix: tests/functional/parallel.builder.sh
2025-09-29 10:52:17 -07:00
Farid Zakaria
c09cf33a3a
shellcheck fix: tests/functional/output-normalization.sh
2025-09-29 10:52:17 -07:00
Farid Zakaria
32818483a5
shellcheck fix: tests/functional/optimise-store.sh
2025-09-29 10:52:17 -07:00
Farid Zakaria
375529c7e5
shellcheck fix: tests/functional/nix_path.sh
2025-09-29 10:52:17 -07:00
Farid Zakaria
fe4e476d13
shellcheck fix: tests/functional/nix-shell.sh
2025-09-29 10:52:17 -07:00
Farid Zakaria
78833ca8d0
shellcheck fix: tests/functional/nix-profile.sh
2025-09-29 10:52:17 -07:00