Robert Hensing
15fa95f925
Merge pull request #13052 from rhendric/rhendric/increase-429-delay
...
libstore: increase retry delay for 429
2025-04-21 00:31:15 +02:00
John Ericson
bebef8f0c4
Merge pull request #13010 from obsidiansystems/bump-nixpkgs
...
flake.lock: Update Nixpkgs
2025-04-20 17:59:15 -04:00
mergify[bot]
933ed27dd9
Merge pull request #13054 from roberth/fix-non-virt-dtor
...
Fix non-virtual destructor warning
2025-04-20 21:50:32 +00:00
Robert Hensing
047f2bc1af
refactor: Extract RETRY_TIME constants in filetransfer
2025-04-20 23:29:22 +02:00
John Ericson
ef36806898
Explain the use of "2" in the overlay
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2025-04-20 17:20:54 -04:00
Robert Hensing
363ee6dfcb
Fix non-virtual destructor warning
2025-04-20 23:05:21 +02:00
Robert Hensing
b257ea94e3
Fix pkgs.nixVersions and installTests
...
... by moving our stuff out of the way from upstream's
`nixComponents` and `nixDependencies` attrsets.
(I prefer not to use overlays, but let's make it work this way
first)
2025-04-20 22:20:52 +02:00
John Ericson
f186491db9
Merge pull request #13047 from obsidiansystems/derivation-building-2
...
Remove double indirection from `DerivationBuilder` params
2025-04-20 15:19:35 -04:00
Ryan Hendrickson
85420b8537
libstore: increase retry delay for 429
...
A 429 (Too Many Requests) error should not be retried after a quarter of
a second; that's just silly. GitHub recommends a minute.
2025-04-20 14:49:03 -04:00
John Ericson
5eeeb44f79
Remove double indirection from DerivationBuilder params
...
Now that `DerivationBuilder` is created after the underlying data has
already been initialized, we can just refer this data normally, with a
direct reference.
Only `parsedDrv` takes a (borrowing) pointer, because independent of
initialization the derivation may or may not have structured attrs.
2025-04-18 12:26:05 -04:00
John Ericson
2b2ea218d9
Delay constructing a DerivationBuilder until we're about to build
...
This makes the simplification in the following commit possible.
2025-04-18 12:26:05 -04:00
John Ericson
27907e6cac
Add documentation for DerivationBuilder::{parsedDrv, drvOptions}
2025-04-18 12:26:05 -04:00
Jörg Thalheim
f683a555bf
Merge pull request #12423 from ilya-bobyr/fish-profile-local-state-bin-in-PATH
...
nix-profile.fish: Add local state bin to $PATH
2025-04-18 07:27:04 +02:00
Eelco Dolstra
75679b323b
Merge pull request #13043 from Mic92/fix-build
...
CI / eval (push) Has been cancelled
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Has been cancelled
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Has been cancelled
CI / Check Docker secrets present for installer tests (push) Has been cancelled
CI / vm_tests (push) Has been cancelled
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Has been cancelled
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Has been cancelled
CI / docker_push_image (push) Has been cancelled
CI / flake_regressions (push) Has been cancelled
fix armv7/i686 build
2025-04-17 17:03:19 +02:00
Jörg Thalheim
b3bbbd2e71
fix armv7/i686 build
2025-04-17 13:56:11 +02:00
Jörg Thalheim
e27d804929
Merge pull request #13039 from obsidiansystems/derivation-builder-in-separate-file
...
CI / eval (push) Waiting to run
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Waiting to run
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Waiting to run
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Blocked by required conditions
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Blocked by required conditions
CI / Check Docker secrets present for installer tests (push) Waiting to run
CI / docker_push_image (push) Blocked by required conditions
CI / vm_tests (push) Waiting to run
CI / flake_regressions (push) Blocked by required conditions
Move `DerivationBuilder` to its own files
2025-04-17 13:25:37 +02:00
Jörg Thalheim
6dcbac4278
Merge pull request #13040 from ilya-bobyr/fish-profile-set-MANPATH
...
nix-profile-daemon.fish: Set MANPATH
2025-04-17 10:24:19 +02:00
Jörg Thalheim
6fe0545bf3
Merge pull request #13041 from ilya-bobyr/fish-profile-do-not-test-USER
...
nix-profile.fish: Do not check $USER
2025-04-17 10:23:59 +02:00
Illia Bobyr
66ae8f4f44
nix-profile.fish: Do not check $USER
...
While it seems unlikely that `$USER` will be unset while `$HOME` is set,
as `$USER` is not used in the script and as `nix-profile-daemon.fish` is
not checking `$USER`, it seems better to remove this check.
`nix-profile.fish` and `nix-profile-daemon.fish` now become identical.
2025-04-16 17:16:51 -07:00
Illia Bobyr
470c521bcc
nix-profile-daemon.fish: Set MANPATH
...
There seems to be no good reason for `nix-profile.fish` to set
`$MANPATH` while it being unset when `nix-profile-daemon.fish` is used.
2025-04-16 17:14:47 -07:00
Illia Bobyr
fc8c11be48
nix-profile.fish: Add local state dir bin to $PATH
...
It seems reasonable to add both `$HOME/.profile/bin` and
`@localstatedir@/nix/profiles/default/bin` to `$PATH` for both user
local and daemon based nix execution. Nix daemon execution mode does
not affect these path.
2025-04-16 17:11:56 -07:00
John Ericson
9792d6bbd9
Move DerivationBuilder to its own file/header
...
The building logic is now free of the scheduling logic!
(The interface between them is just what is in the new header. This
makes it much easier to audit, and shrink over time.)
2025-04-16 18:59:17 -04:00
John Ericson
6c2a7fdc49
Copy local-derivation-goal.cc to derivation-builder.{cc,hh}
...
This is done to prior to splitting, just like
05cc5a8587 for
68f4c728ec .
2025-04-16 18:59:17 -04:00
mergify[bot]
b509502bd5
Merge pull request #12663 from obsidiansystems/local-derivation-goal-encapsulation
...
CI / eval (push) Waiting to run
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Waiting to run
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Waiting to run
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Blocked by required conditions
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Blocked by required conditions
CI / Check Docker secrets present for installer tests (push) Waiting to run
CI / docker_push_image (push) Blocked by required conditions
CI / vm_tests (push) Waiting to run
CI / flake_regressions (push) Blocked by required conditions
Separate derivation building from the scheduler
2025-04-16 22:33:25 +00:00
John Ericson
d98c0dbe99
Start separating scheduling from building
...
We have a new `DerivationBuilder` struct, and `DerivationBuilderParams`
`DerivationBuilderCallbacks` supporting it.
`LocalDerivationGoal` doesn't subclass any of these, so we are ready to
now move them out to a new file!
2025-04-16 17:54:56 -04:00
John Ericson
f81c06accf
Gut LocalDerivationGoal::tryLocalBuild
...
Now, most of it is in two new functions:
`LocalDerivationGoal::{,un}repareBuild`.
This might seems like a step backwards from coroutines --- now we have
more functions, and are stuck with class vars --- but I don't think it
needs to be.
There's a few options here:
- (Re)introduce coroutines for the isolated building logic. We could use the
same coroutines types, or simpler ones specialized to this use-case.
The `tryLocalBuild` caller can still use `Goal::Co`, and just will
manually "pump" this inner coroutine.
- Return closures from each step. This is sort of like coroutines by
hand, but it still allows us to stop writing down the local variables
in each type.
Being able to fully-use RAII again would be very nice!
- Keep top-level first-order functions like now, but make more
functional. Instead of having one state object (`DerivationBuilder`)
for all steps (setup, run, teardown), we can have separate structs for
the live variables at each point we consume and return.
This at least avoids "are these variables active at this time?"
questions, but doesn't give us the full benefit of RAII as we must
manually ensure FIFO create/destroy orders still.
One thing to note is that by keeping the `outputLock` unlocking in
`tryLocalBuild`, we are arguably uncovering a rebuild scheduling vs
building distinction, as the output locks are pretty squarely a
scheduling concern. It's nice that the builder doesn't need to know
about them at all.
2025-04-16 17:39:45 -04:00
John Ericson
ae7f411a18
Remove some unused includes
...
This is unreleated to the other commits in this PR.
2025-04-16 17:39:22 -04:00
John Ericson
e83ef7a477
Make appendLogTailErrorMsg as class method after all
...
The other parameters it took were somewhat implementation-specific.
2025-04-16 15:40:59 -04:00
Jörg Thalheim
89ba6dff66
Merge pull request #13032 from obsidiansystems/more-outputs-test
...
CI / eval (push) Has been cancelled
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Has been cancelled
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Has been cancelled
CI / Check Docker secrets present for installer tests (push) Has been cancelled
CI / vm_tests (push) Has been cancelled
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Has been cancelled
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Has been cancelled
CI / docker_push_image (push) Has been cancelled
CI / flake_regressions (push) Has been cancelled
Improve derivation "advanced attrs" test, fix almost-bug
2025-04-15 19:08:35 +02:00
Jörg Thalheim
009ff8e5a7
Merge pull request #13013 from NaN-git/fix-ceil-floor
...
libexpr: fix UB in builtins.ceil and builtins.floor
2025-04-15 18:56:46 +02:00
Jörg Thalheim
cf6da9234c
Merge pull request #12410 from obsidiansystems/derivation-options-2
...
Scrap `ParsedDerivation` for parts
2025-04-15 18:36:11 +02:00
John Ericson
32409dd7d7
Remove stray assignment side affect in lambda
...
This was almost a bug! It wasn't simply because another assignment would
clobber it later.
2025-04-15 12:29:17 -04:00
John Ericson
a0b2b75f59
Derivation "advanced attrs" test: Ensure fields are set to distinct values
...
We had fields set to the same values before in our test data. This is
not a problem per-se, but does mean we wouldn't catch certain mixups.
Now, the fields are set to distinct values (where possible), which makes
the test more robust.
2025-04-15 12:29:14 -04:00
Jörg Thalheim
99a16c5203
Merge pull request #13026 from roberth/issue-13018
...
CI / eval (push) Waiting to run
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Waiting to run
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Waiting to run
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Blocked by required conditions
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Blocked by required conditions
CI / Check Docker secrets present for installer tests (push) Waiting to run
CI / docker_push_image (push) Blocked by required conditions
CI / vm_tests (push) Waiting to run
CI / flake_regressions (push) Blocked by required conditions
Fix issue #13018 , `sourceInfo` strict in `outputs`
2025-04-15 13:51:02 +02:00
Jörg Thalheim
22c928f9c0
Merge pull request #12992 from DeterminateSystems/input-cache
...
Rename FlakeCache to InputCache and move it to libfetchers
2025-04-15 13:32:39 +02:00
Jörg Thalheim
13a0853f04
Merge pull request #13024 from obsidiansystems/derivation-options-exportReferencesGraph
...
Move `exportReferencesGraph` to `DerivationOptions`
2025-04-15 13:28:00 +02:00
Jörg Thalheim
995d4f4aa7
Merge pull request #13022 from obsidiansystems/derivation-options
...
Test derivation options with content-addressing too
2025-04-15 13:27:09 +02:00
Robert Hensing
2109a5a206
fix: Evaluate flake parent source without evaluating its outputs
...
This requires that we refer to the `sourceInfo` instead of the
`result`. However, `sourceInfo` does not create a chain of basedir
resolution, so we add that back with `flakeDir`.
2025-04-15 13:22:53 +02:00
Robert Hensing
9de9410f29
call-flake.nix: allNodes.${key} -> allNodes.${key}.result
2025-04-15 13:22:53 +02:00
Robert Hensing
674375b021
call-flake.nix: refactor: Bring mapAttrs into scope
2025-04-15 13:22:53 +02:00
John Ericson
d8be4f618f
Scrap ParsedDerivation for parts
...
Only a much smaller `StructuredAttrs` remains, the rest is is now moved
to `DerivationOptions`.
This gets us quite close to `std::optional<StructuredAttrs>` and
`DerivationOptions` being included in `Derivation` as fields.
2025-04-14 16:14:41 -04:00
John Ericson
1e31b60043
Limit ParsedDerivation just to the derivation's environment
...
This moves us towards getting rid of `ParsedDerivation` and just having
`DerivationOptions`.
Co-Authored-By: HaeNoe <git@haenoe.party>
2025-04-14 15:46:55 -04:00
John Ericson
d285b80033
Move exportReferencesGraph to DerivationOptions
...
Tests are updated accordingly.
2025-04-14 14:24:36 -04:00
John Ericson
307dbe9914
Test derivation options with content-addressing too
...
Now, both the unit and functional tests relating to derivation options
are tested both ways -- with input addressing and content-addressing
derivations.
2025-04-14 13:43:46 -04:00
John Ericson
7acc229c8f
Use the same variable for content addressing in functional tests
...
`CONTENT_ADDRESSED` -> `NIX_TESTS_CA_BY_DEFAULT`
2025-04-14 11:20:07 -04:00
Eelco Dolstra
b3aa07009d
Merge pull request #13019 from NixOS/mention-blake3
...
CI / eval (push) Waiting to run
CI / tests ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Waiting to run
CI / tests ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Waiting to run
CI / installer test ${{ matrix.scenario }} (darwin, macos-14, on macos) (push) Blocked by required conditions
CI / installer test ${{ matrix.scenario }} (linux, ubuntu-24.04, on ubuntu) (push) Blocked by required conditions
CI / Check Docker secrets present for installer tests (push) Waiting to run
CI / docker_push_image (push) Blocked by required conditions
CI / vm_tests (push) Waiting to run
CI / flake_regressions (push) Blocked by required conditions
Mention BLAKE3 in the Nix 2.27 release notes
2025-04-14 15:47:38 +02:00
Eelco Dolstra
c0ed07755a
Mention BLAKE3 in the Nix 2.27 release notes
2025-04-14 15:18:29 +02:00
Eelco Dolstra
4966217b6a
Move the InputCache to EvalState
2025-04-14 14:29:14 +02:00
mergify[bot]
b1fe93fab7
Merge pull request #13015 from obsidiansystems/derivation-options
...
`ParsedDerivation`: don't take `drvPath`
2025-04-14 11:14:34 +00:00
Jörg Thalheim
3f3fd2c94b
Merge pull request #12976 from picnoir/pic/multisign
...
store URI: introduce multiple signatures support
2025-04-14 11:20:41 +02:00