mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Add eval-system option
`eval-system` option overrides just the value of `builtins.currentSystem`. This is more useful than overriding `system` since you can build these derivations on remote builders which can work on the given system. Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
This commit is contained in:
parent
fc0accf3dc
commit
bcbdb09ccf
5 changed files with 40 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "eval-settings.hh"
|
||||
#include "memory-input-accessor.hh"
|
||||
|
||||
#include "tests/libexpr.hh"
|
||||
|
@ -631,7 +632,7 @@ namespace nix {
|
|||
|
||||
TEST_F(PrimOpTest, currentSystem) {
|
||||
auto v = eval("builtins.currentSystem");
|
||||
ASSERT_THAT(v, IsStringEq(settings.thisSystem.get()));
|
||||
ASSERT_THAT(v, IsStringEq(evalSettings.getCurrentSystem()));
|
||||
}
|
||||
|
||||
TEST_F(PrimOpTest, derivation) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue