1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-09 10:31:02 +01:00
Commit graph

21520 commits

Author SHA1 Message Date
Eelco Dolstra
803d461e95 Add external builders
These are helper programs that execute derivations for specified
system types (e.g. using QEMU to emulate another system type).

To use, set `external-builders`:

  external-builders = [{"systems": ["aarch64-linux"], "program": "/path/to/external-builder.py"}]

The external builder gets one command line argument, the path to a JSON file containing all necessary information about the derivation:

  {
    "args": [...],
    "builder": "/nix/store/kwcyvgdg98n98hqapaz8sw92pc2s78x6-bash-5.2p37/bin/bash",
    "env": {
      "HOME": "/homeless-shelter",
      ...
    },
    "realStoreDir": "/tmp/nix/nix/store",
    "storeDir": "/nix/store",
    "tmpDir": "/tmp/nix-shell.dzQ2hE/nix-build-patchelf-0.14.3.drv-46/build",
    "tmpDirInSandbox": "/build"
  }
2025-06-17 08:34:34 -07:00
Eelco Dolstra
95f87abf66 Cleanup 2025-06-17 08:34:34 -07:00
Eelco Dolstra
d0a263711a Remove unused variable 2025-06-17 08:34:34 -07:00
Eelco Dolstra
21fd152279 Fix macOS build 2025-06-17 08:34:34 -07:00
Eelco Dolstra
ab18d8ca5f Move cgroup support 2025-06-17 08:34:34 -07:00
Eelco Dolstra
c9bb16a741 Inline initTmpDir() 2025-06-17 08:34:34 -07:00
Eelco Dolstra
492b684b9e Get rid of tmpDirInSandbox variable 2025-06-17 08:34:34 -07:00
Eelco Dolstra
f5176500be Move autoDelChroot 2025-06-17 08:34:34 -07:00
Eelco Dolstra
5d96e55e91 Move seccomp code 2025-06-17 08:34:34 -07:00
Eelco Dolstra
1acdb9168d Move doBind() 2025-06-17 08:34:34 -07:00
Eelco Dolstra
305a9680e4 Eliminate useChroot 2025-06-17 08:34:34 -07:00
Eelco Dolstra
2d5d3e44dd Move pathsInChroot 2025-06-17 08:34:34 -07:00
Eelco Dolstra
3733f95ae5 DerivationBuilder: Move Linux/Darwin-specific code into subclasses 2025-06-17 08:22:32 -07:00
Eelco Dolstra
af1b580ff6 DerivationBuilderImpl: Drop std::optional from derivationType
No point in computing this lazily, since it's pretty much the first
thing the DerivationBuilder does.
2025-06-17 08:22:32 -07:00
Eelco Dolstra
189fdfa776 Remove duplicate comments on DerivationBuilderImpl overriden methods
Having the exact same doc comments isn't very useful/maintainable.
2025-06-17 08:22:32 -07:00
Eelco Dolstra
c6617d6f2e Remove buildUser from DerivationBuilder
The use of a `buildUser` is an implementation detail of some types of
sandboxes that shouldn't exposed.
2025-06-17 08:22:32 -07:00
Eelco Dolstra
bb32fcdf30
Merge pull request #13368 from wolfgangwalther/race-state-creation
libstore: fix race condition when creating state directories
2025-06-17 11:33:29 +02:00
Eelco Dolstra
59c7dac867 Git fetcher: Do not consider a null revision (i.e. workdir) to be locked 2025-06-17 10:55:23 +02:00
Wolfgang Walther
d64c922164
libstore: fix race condition when creating state directories
Running parallel nix in nix can lead to multiple instances trying to
create the state directories and failing on the `createSymlink` step,
because the link already exists.

`replaceSymlink` is already idempotent, so let's use that.

Resolves #2706
2025-06-17 08:45:29 +02:00
John Ericson
cdb417854b
Merge pull request #13366 from drupol/push-smvorxlvxusx
docker: add basics OpenContainers labels
2025-06-16 18:11:53 -04:00
Eelco Dolstra
3a4e6cadeb Improve regression testing for uncachable source paths
These now throw an error by default in the test suite.
2025-06-16 23:59:33 +02:00
Eelco Dolstra
a175c67def Fix rootFS fingerprint in the impure case 2025-06-16 23:59:33 +02:00
Eelco Dolstra
5329a45ade Git fetcher: Make dirty repos with no commits cacheable 2025-06-16 23:59:33 +02:00
Graham Christensen
7469e7aa57
Merge pull request #119 from DeterminateSystems/release-v3.6.5/c7ec4397-7427-42b1-87fb-1266bc444391
Release v3.6.5
2025-06-16 21:29:31 +00:00
Graham Christensen
0f3892185d Add a final newline in the generated release notes 2025-06-16 17:21:26 -04:00
Graham Christensen
c0e53f3312 Move the 3.6.4 notes over 2025-06-16 17:20:06 -04:00
Graham Christensen
97e2e9159b Fixup generar->te in commit automation 2025-06-16 17:17:42 -04:00
Graham Christensen
fe6972f6f0 Fixup type (generare) 2025-06-16 17:16:25 -04:00
github-actions[bot]
fd4ed4c9f5
Generare release notes for 3.6.5 2025-06-16 21:08:42 +00:00
github-actions[bot]
11d7250448
Set .version-determinate to 3.6.5 2025-06-16 21:08:37 +00:00
github-actions[bot]
2190f6ce66
Prepare release v3.6.5 2025-06-16 21:08:34 +00:00
Graham Christensen
7f21086ce6
Merge pull request #115 from DeterminateSystems/fetchToStore-cache-hashes
fetchToStore() cache: Use content hashes instead of store paths
2025-06-16 20:37:40 +00:00
Graham Christensen
408d4a0505
Merge pull request #118 from DeterminateSystems/push-lrtmozosxrvy
Use GHA runners for VMs since they have KVM
2025-06-16 20:19:11 +00:00
Graham Christensen
20742e63e2 Use GHA runners for VMs since they have KVM 2025-06-16 16:10:07 -04:00
Graham Christensen
1aadf1e96c
Increase the nixos test timeout to 10 minutes, up from 5
Most tests complete within 4m, one test -- the docker test -- takes approximately 6m45s. Ten gives us plenty of room ...?
2025-06-16 13:29:47 -04:00
Eelco Dolstra
b2905dc08e fetchToStore(): Address a FIXME 2025-06-16 12:27:44 -04:00
Eelco Dolstra
e3fa4faff9 fetchToStore(): Don't require a valid path in dry run mode 2025-06-16 12:27:44 -04:00
Eelco Dolstra
af5815fd54 Give unit tests access to a $HOME directory
Also, don't try to access cache.nixos.org in the libstore unit tests.
2025-06-16 12:27:44 -04:00
Eelco Dolstra
dc5e620032 fetchToStore() cache: Use content hashes instead of store paths
We can always compute the store path from the content hash, but not
vice versa. Storing the content hash allows `hashPath()` to be
replaced by `fetchToStore(...FetchMode::DryRun...)`, which gets us
caching in lazy-trees mode.
2025-06-16 12:27:44 -04:00
Graham Christensen
b0aa12df25
Merge pull request #116 from DeterminateSystems/push-zrwpvlwurrkr
Don't build fallback-paths if we didn't build aarch64-linux and x86 d…   …arwin
2025-06-16 16:01:06 +00:00
Graham Christensen
eba6cd8488 Don't build fallback-paths if we didn't build aarch64-linux and x86 darwin 2025-06-16 11:50:13 -04:00
Graham Christensen
151456a999 Change the aarch64 linux / x86 darwin condition to exclude pull request, since we do want to build them on every other trigger 2025-06-16 11:50:13 -04:00
Graham Christensen
d41480dc45
Merge pull request #114 from DeterminateSystems/push-zlvvuopvyszo
Parallelize the flake regression suite
2025-06-16 14:49:31 +00:00
Graham Christensen
cf11e27047 Don't stall on a stuck nixos vm test build forever 2025-06-16 10:31:52 -04:00
Graham Christensen
97dc226cae Use fewer runners 2025-06-16 10:31:52 -04:00
Graham Christensen
6185afef92 Run onnamespace, use their cache 2025-06-16 10:31:52 -04:00
Graham Christensen
b0a325d8db Run on GHA runners, not blacksmith due to timeouts 2025-06-16 10:31:52 -04:00
Graham Christensen
f764c9eae3 Add retry to the eval steps, split out m since it takes a while on its own 2025-06-16 10:31:52 -04:00
Graham Christensen
c7d80871ac Parallelize the flake regression suite 2025-06-16 10:31:52 -04:00
tomberek
af01fea5d6
Merge pull request #12623 from xokdvium/ord-safe-sort
Switch builtins.sort to a custom stable PeekSort
2025-06-16 05:11:23 -04:00