mirror of
https://github.com/numtide/nixos-anywhere.git
synced 2024-09-11 13:15:44 +03:00
tests: fix running tests directly with nix-build
This commit is contained in:
parent
716988d42e
commit
1b976d803c
@ -1,5 +1,10 @@
|
||||
test:
|
||||
{ pkgs ? import <nixpkgs> { }, ... } @ args:
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, nixos-anywhere ? pkgs.callPackage ../../src { }
|
||||
, disko ? "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
|
||||
, kexec-installer ? builtins.fetchurl "https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz"
|
||||
, ...
|
||||
}@args:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
nixos-lib = import (pkgs.path + "/nixos/lib") { };
|
||||
@ -9,6 +14,6 @@ in
|
||||
# speed-up evaluation
|
||||
defaults.documentation.enable = lib.mkDefault false;
|
||||
# to accept external dependencies such as disko
|
||||
node.specialArgs.inputs = args;
|
||||
node.specialArgs.inputs = { inherit nixos-anywhere disko kexec-installer; };
|
||||
imports = [ test ];
|
||||
}).config.result
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
let
|
||||
disko = inputs.disko; #or "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix";
|
||||
kexec-installer = inputs.kexec-installer; # or builtins.fetchurl "https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz";
|
||||
disko = inputs.disko;
|
||||
kexec-installer = inputs.kexec-installer;
|
||||
system-to-install = pkgs.nixos [
|
||||
./system-to-install.nix
|
||||
disko
|
||||
|
Loading…
Reference in New Issue
Block a user