1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
Commit graph

20253 commits

Author SHA1 Message Date
Sergei Zimmerman
d555d6b404
tests/functional: Add more language tests for builtins.match
These tests have been collected from nixpkgs f870c6ccc8951fc48aeb293cf3e98ade6ac42668
usage of builtins.match for x86_64-linux eval system. At most 2 matching and
non-matching cases are included for each encountered regex. This should
hopefully add more confidence when possibly trying to switch the regex implementation
in the future.
2025-05-27 22:28:13 +00:00
John Ericson
de71cebc3a
Merge pull request #13281 from NixOS/freebsd-utils
Prepare for FreeBSD sandboxing support
2025-05-27 15:37:18 -04:00
John Ericson
625dce659a Prepare for FreeBSD sandboxing support
This is the utility changes from #9968, which were easier to rebase
first.

I (@Ericson2314) didn't write this code; I just rebased it.

Co-Authored-By: Artemis Tosini <me@artem.ist>
Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
2025-05-27 14:54:50 -04:00
John Ericson
653a93ac0f
Merge pull request #13276 from NixOS/split-derivation-builder
Move platform-specific code out of `DerivationBuilder`
2025-05-27 13:39:02 -04:00
Eelco Dolstra
cf9d962086 Remove unused variable 2025-05-27 17:54:02 +02:00
Jörg Thalheim
f7c94cd908
Merge pull request #13278 from DeterminateSystems/gustavderdrache/system-builderror
Make platform checks throw BuildError like other failures
2025-05-27 16:39:55 +02:00
Jörg Thalheim
9ddac1b516
Merge pull request #13277 from zimbatm/flake-archive-no-check-sigs
nix flake archive: add --no-check-sigs option
2025-05-27 16:38:42 +02:00
Jörg Thalheim
161bf86457
Merge pull request #13279 from DeterminateSystems/gustavderdrache/trace-import-from-derivation
Emit warnings for IFDs with new `trace-import-from-derivation` option
2025-05-27 16:37:29 +02:00
Eelco Dolstra
f9fdf94e12 Fix macOS build 2025-05-27 15:25:51 +02:00
gustavderdrache
d80f0fb15a Add test for output warning to ensure stability
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-27 09:18:51 -04:00
gustavderdrache
ce89c8c114 Log warnings on IFD with new option
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-27 09:18:51 -04:00
gustavderdrache
b04962b33b Make platform checks throw BuildError like other failures
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2025-05-27 08:57:13 -04:00
Eelco Dolstra
352ca238a9 Move cgroup support 2025-05-27 14:06:32 +02:00
Eelco Dolstra
b27e684ca5 Inline initTmpDir() 2025-05-27 14:00:28 +02:00
Eelco Dolstra
774678b87f Get rid of tmpDirInSandbox variable 2025-05-27 14:00:21 +02:00
Eelco Dolstra
c9b55fa3f0 Move autoDelChroot 2025-05-27 14:00:16 +02:00
Eelco Dolstra
9e2151d839 Move seccomp code 2025-05-27 14:00:12 +02:00
Eelco Dolstra
b623fe8d14 Move doBind() 2025-05-27 14:00:07 +02:00
Eelco Dolstra
9f8f3968e3 Eliminate useChroot 2025-05-27 13:59:40 +02:00
Eelco Dolstra
67408807d8 Move pathsInChroot 2025-05-27 13:57:41 +02:00
Eelco Dolstra
5653bf5e0a DerivationBuilder: Move Linux/Darwin-specific code into subclasses 2025-05-27 13:42:22 +02:00
zimbatm
80a4293486 nix flake archive: add --no-check-sigs option
Allows to copy the archive to a remote host and not get

    error: cannot add path '/nix/store/01x2k4nlxcpyd85nnr0b9gm89rm8ff4x-source' because it lacks a signature by a trusted key
2025-05-27 10:05:21 +00:00
John Ericson
74a107d364
Merge pull request #13270 from NixOS/no-optional-drv-type
DerivationBuilderImpl: Drop std::optional from derivationType
2025-05-27 03:46:06 -04:00
Eelco Dolstra
aaca9711fc DerivationBuilderImpl: Drop std::optional from derivationType
No point in computing this lazily, since it's pretty much the first
thing the DerivationBuilder does.
2025-05-27 09:04:29 +02:00
Jörg Thalheim
6adee1145f
Merge pull request #13275 from RossComputerGuy/fix/static-deps-nix
Remove propagated-build-inputs when static
2025-05-27 09:01:12 +02:00
Tristan Ross
d07852b5f3
Remove propagated-build-inputs when static 2025-05-26 21:54:19 -07:00
John Ericson
a2f65dd43b
Merge pull request #13274 from NixOS/drop-magic-nix-cache
Drop magic-nix-cache
2025-05-26 20:44:10 -04:00
Eelco Dolstra
9cc8be2674 Drop magic-nix-cache
This no longer works, see https://determinate.systems/posts/magic-nix-cache-free-tier-eol/.
2025-05-26 23:30:16 +02:00
John Ericson
32d19040e7
Merge pull request #13268 from NixOS/derivation-builder-cleanup
Remove `buildUser` from `DerivationBuilder`
2025-05-26 12:10:57 -04:00
Eelco Dolstra
93ae95be83 Remove duplicate comments on DerivationBuilderImpl overriden methods
Having the exact same doc comments isn't very useful/maintainable.
2025-05-26 16:05:54 +02:00
Eelco Dolstra
69914e4b3c Remove buildUser from DerivationBuilder
The use of a `buildUser` is an implementation detail of some types of
sandboxes that shouldn't exposed.
2025-05-26 16:05:35 +02:00
Jörg Thalheim
ed3e2a71ea
Merge pull request #12994 from fricklerhandwerk/reword-derivation
glossary: re-introduce "derivation"
2025-05-26 14:58:52 +02:00
Eelco Dolstra
170f6021cf
Merge pull request #13265 from Mic92/fix-shallow-clone-subset
Improve errors when we are trying to access a git repository with partial history (+ fix fetchGit on these repos)
2025-05-26 14:53:08 +02:00
Jörg Thalheim
5419d82547 tests/fetchGit: work around something that looks a bash parsing quirk.
Before we got something like this but only inside the VM test:

 vm-test-run-functional-tests-on-nixos_user> machine # fetchGit.sh: line 286: unexpected EOF while looking for matching `)'

We now try to do not too much in a single line, so that the bash parser does not get confused.
This also seems more readable and better quoted.
2025-05-26 12:44:31 +02:00
Jörg Thalheim
b1ccfaa080 git/revCount: improve error message when we have incomplete git history 2025-05-26 12:44:31 +02:00
Jörg Thalheim
0479db934c fetchGit: don't compute revCount on shallow repository
This can never work and leads to a crash bug.
2025-05-26 09:56:44 +02:00
Jörg Thalheim
247f166f87
Merge pull request #13245 from stefanboca/sb/push-yoorqzwsxmzn
nix-profile{,-daemon}.fish: check for profile in XDG_DATA_HOME
2025-05-26 00:14:40 +02:00
Jörg Thalheim
d929eed168
Merge pull request #13262 from xokdvium/typos
Fix various typos in source code
2025-05-25 23:42:21 +02:00
Sergei Zimmerman
114de63d88
Fix various typos in source code
This only touches code comments, class names, documentation,
enumeration names and tests.
2025-05-25 20:14:11 +00:00
Jörg Thalheim
4777734974
Merge pull request #13261 from xokdvium/eval-profiler-derivations
libexpr: Include derivation names in the call stack profile
2025-05-25 21:15:54 +02:00
Sergei Zimmerman
9e97ecabb6
libexpr: Include derivation names in the call stack profile
This makes the profiler much more useful by actually distiguishing
different derivations being evaluated. This does make the implementation
a bit more convoluted, but I think it's worth it.
2025-05-25 15:53:01 +00:00
Sergei Zimmerman
a76c76a9d5
libexpr: Make getAttr a member function of EvalState 2025-05-25 15:52:58 +00:00
Sergei Zimmerman
128750225d
libexpr: Pass mutable EvalState to EvalProfiler
Sometimes the profiler might want to do evaluation (e.g. for getting
derivation names). This is not ideal, but is really necessary
to make the profiler stack traces useful for end users.
2025-05-25 15:52:56 +00:00
Jörg Thalheim
543cee1c92
Merge pull request #13244 from stefanboca/sb/push-lmnqpuztqxmz
nix-profile{,-daemon}.fish: fix do not source twice
2025-05-25 17:48:25 +02:00
Stefan Boca
751f50f4ad nix-profile{,-daemon}.fish: check for profile in XDG_DATA_HOME
...and also NIX_STATE_HOME in nix-profile.fish. This is directly
translated from the bash scripts and makes the fish scripts equivalent
in functionality to the bash scripts.

Note that nix-profile.fish checks for NIX_STATE_HOME and
nix-profile-daemon.fish does not, so the two scripts are no longer
identical.
2025-05-25 17:15:32 +02:00
Jörg Thalheim
087f268615
Merge pull request #13256 from NixOS/fix-substitution-crash
Fix nlohmann error in fromStructuredAttrs()
2025-05-25 07:54:28 +02:00
tomberek
68f8e1c32e
Merge pull request #13257 from NixOS/robust-s3-test
Make the S3 test more robust
2025-05-24 14:10:54 -04:00
Eelco Dolstra
ca9696748a Make the S3 test more robust
Waiting for the minio unit is apparently not reliable enough, so let's
also wait for the port.
2025-05-24 01:30:51 +02:00
Eelco Dolstra
c66eb9cef7 Add test 2025-05-24 00:40:06 +02:00
Eelco Dolstra
d877b0c0cc fromStructuredAttrs(): Don't crash if exportReferencesGraph is a string
Fixes

  error: [json.exception.type_error.302] type must be array, but is string

and other crashes.

Fixes #13254.
2025-05-24 00:17:03 +02:00