1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
Commit graph

3195 commits

Author SHA1 Message Date
Sergei Zimmerman
b1d067c9bb
tests/nixos: Rename back S3 store nixos test 2025-10-16 21:49:35 +03:00
Sergei Zimmerman
17b7fb383f
tests: Fix splicing in functional tests for nix-cli
This is necessary to fix nix-everything-llvm.
The problem here is that nix-cli is taken from the previous
stage that is built with libstdc++, but this derivation builds
plugins with libc++ and the plugin load fails miserably.
2025-10-16 01:04:50 +03:00
Sergei Zimmerman
d2b6499154
Merge pull request #13752 from lovesegfault/curl-based-s3-v2
feat(libstore): curl-based s3
2025-10-15 20:01:26 +00:00
Sergei Zimmerman
e3232af558
Merge pull request #14253 from NixOS/libgit2-refname-wa
libfetchers/git-utils: Be more correct about validating refnames
2025-10-15 19:30:53 +00:00
Sergei Zimmerman
5d1178b817
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.
2025-10-15 21:54:09 +03:00
Bernardo Meurer Costa
9295c14a35
refactor(libstore): replace AWS SDK with curl-based S3 implementation
This commit replaces the AWS C++ SDK with a lighter curl-based approach
for S3 binary cache operations.

- Removed dependency on the heavy aws-cpp-sdk-s3 and aws-cpp-sdk-transfer
- Added lightweight aws-crt-cpp for credential resolution only
- Leverages curl's native AWS SigV4 authentication (requires curl >= 7.75.0)
- S3BinaryCacheStore now delegates to HttpBinaryCacheStore
- Function s3ToHttpsUrl converts ParsedS3URL to ParsedURL
- Multipart uploads are no longer supported (may be reimplemented later)
- Build now requires curl >= 7.75.0 for AWS SigV4 support

Fixes: #13084, #12671, #11748, #12403, #5947
2025-10-15 18:23:55 +00:00
Bernardo Meurer Costa
d18f959d4f
test(nixos): add comprehensive curl-based S3 VM tests
Add `curl-s3-binary-cache-store.nix` with comprehensive test coverage
for the curl-based S3 implementation.

Depends-On: #14206, #14222
2025-10-14 20:55:14 +00:00
John Ericson
2ee41976c2 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

(cherry picked from commit 39f6fd9b46)
2025-10-13 18:37:14 -04:00
Sergei Zimmerman
47f427a172
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
2025-10-13 22:23:26 +03:00
Sergei Zimmerman
4f585dedbe
Merge pull request #14228 from obsidiansystems/fix-windows-build
Fix windows build
2025-10-12 18:07:50 +00:00
John Ericson
9150ccb89e Fix Windows dev shell (mostly)
gbenchmark still has too-narrow supported systems, however. That needs
to be fixed in Nixpkgs.
2025-10-12 13:16:50 -04:00
Sergei Zimmerman
711e738bf9
meson: Simplify asan-options handling even more
Instead of specifying env variables all the time
we can instead embed the __asan_default_options symbol
in all executables / shared objects. This reduces code
duplication.
2025-10-12 19:16:06 +03:00
John Ericson
0da430be35 Split out DerivationResolutionGoal
This prepares the way for fixing a few issues.

Take 2: was landed before in 8f4a739d0f.
2025-10-11 19:52:37 -04:00
Sergei Zimmerman
d26a337c09
meson: Move asan-options to common
This way we don't have to duplicate the subdir everywhere.
Less copy-pasta is good.
2025-10-11 16:08:35 +03:00
Eelco Dolstra
d591f17ecb
Merge pull request #14189 from NixOS/fix-exportReferencesGraph
exportReferencesGraph: Handle heterogeneous arrays
2025-10-08 21:19:30 +00:00
Eelco Dolstra
94f410b628 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"]]`.
2025-10-08 22:15:33 +02:00
Sergei Zimmerman
0619351326
tests: Move invalid nar tests from tests/functional to libutil-tests
Since 242f362567 we have better infrastructure
for this kind of tests.
2025-10-08 02:02:33 +03: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