diff options
author | Robert Hensing <robert@roberthensing.nl> | 2024-01-18 17:36:01 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2024-01-18 18:04:46 +0100 |
commit | d059ce52ceb58edf61dfd55aaa4cab0546aac916 (patch) | |
tree | 1fbe448daa305416e1484d5c21cee47189625b3c /pkgs/os-specific | |
parent | 71154a6e3046f58517941f7144062adec27e2316 (diff) | |
download | nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.tar nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.tar.gz nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.tar.bz2 nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.tar.lz nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.tar.xz nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.tar.zst nixlib-d059ce52ceb58edf61dfd55aaa4cab0546aac916.zip |
nixos-rebuild: Partially future-proof the repl test
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/nixos-rebuild/test/repl.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/nixos-rebuild/test/repl.nix b/pkgs/os-specific/linux/nixos-rebuild/test/repl.nix index 0a057f933255..1161ff84664d 100644 --- a/pkgs/os-specific/linux/nixos-rebuild/test/repl.nix +++ b/pkgs/os-specific/linux/nixos-rebuild/test/repl.nix @@ -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 runCommand "test-nixos-rebuild-repl" { nativeBuildInputs = [ @@ -88,7 +94,7 @@ runCommand "test-nixos-rebuild-repl" { EOF # Make the config pure - echo '{ nixpkgs.hostPlatform = "${stdenv.hostPlatform.system}"; }' > ~/hardware-configuration.nix + echo '{ nixpkgs.hostPlatform = "${linuxSystem}"; }' > ~/hardware-configuration.nix cat >~/flake.nix <<EOF { |