mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-29 08:38:18 +03:00
nixos-rebuild: Partially future-proof the repl test
This commit is contained in:
parent
71154a6e30
commit
d059ce52ce
@ -24,6 +24,12 @@ let
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# In case we want/need to evaluate packages or the assertions or whatever,
|
||||||
|
# we want to have a linux system.
|
||||||
|
# TODO: make the non-flake test use thise.
|
||||||
|
linuxSystem = lib.replaceStrings ["darwin"] ["linux"] stdenv.hostPlatform.system;
|
||||||
|
|
||||||
in
|
in
|
||||||
runCommand "test-nixos-rebuild-repl" {
|
runCommand "test-nixos-rebuild-repl" {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -88,7 +94,7 @@ runCommand "test-nixos-rebuild-repl" {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Make the config pure
|
# Make the config pure
|
||||||
echo '{ nixpkgs.hostPlatform = "${stdenv.hostPlatform.system}"; }' > ~/hardware-configuration.nix
|
echo '{ nixpkgs.hostPlatform = "${linuxSystem}"; }' > ~/hardware-configuration.nix
|
||||||
|
|
||||||
cat >~/flake.nix <<EOF
|
cat >~/flake.nix <<EOF
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user