File tree Expand file tree Collapse file tree 4 files changed +44
-131
lines changed Expand file tree Collapse file tree 4 files changed +44
-131
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44 inputs . nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
55
66 outputs =
7- {
8- self ,
9- nixpkgs ,
10- } :
7+ { self , nixpkgs } :
118 let
129 systems = [
1310 "aarch64-linux"
2219 pkgs = nixpkgs . legacyPackages . ${ system } ;
2320 }
2421 ) ;
22+ nix-vm-test-lib =
23+ let
24+ rev = "e34870b8dd2c2d203c05b4f931b8c33eaaf43b81" ;
25+ sha256 = "sha256:1qp1fq96kv9i1nj20m25057pfcs1b1c9bj4502xy7gnw8caqr30d" ;
26+ in
27+ "${
28+ builtins . fetchTarball {
29+ url = "https://github.com/numtide/nix-vm-test/archive/${ rev } .tar.gz" ;
30+ inherit sha256 ;
31+ }
32+ } /lib.nix" ;
2533 in
2634 {
2735 lib = import ./nix/lib.nix { inherit nixpkgs ; } ;
3947 } ;
4048 } ;
4149
50+ # Only useful for quick tests
51+ systemConfigs . default = self . lib . makeSystemConfig {
52+ modules = [ ./examples/example.nix ] ;
53+ } ;
54+
4255 formatter = eachSystem ( { pkgs , ... } : pkgs . treefmt ) ;
4356
4457 devShells = eachSystem (
4861 }
4962 ) ;
5063
51- checks = eachSystem (
52- { system , ... } :
53- {
54- system-manager = self . packages . ${ system } . default ;
55- }
64+ checks = (
65+ nixpkgs . lib . recursiveUpdate
66+ ( eachSystem (
67+ { system , ... } :
68+ {
69+ system-manager = self . packages . ${ system } . default ;
70+ }
71+ ) )
72+ {
73+ x86_64-linux =
74+ let
75+ system = "x86_64-linux" ;
76+ in
77+ ( import ./test/nix/modules {
78+ inherit system ;
79+ inherit ( nixpkgs ) lib ;
80+ nix-vm-test = import nix-vm-test-lib {
81+ inherit nixpkgs ;
82+ inherit system ;
83+ } ;
84+ system-manager = self ;
85+ } ) ;
86+ }
5687 ) ;
5788 } ;
5889}
Original file line number Diff line number Diff line change 33 system-manager ,
44 system ,
55 nix-vm-test ,
6- inputs ,
76} :
87
98let
3635 }
3736 )
3837 ] ;
39- extraSpecialArgs = { inherit inputs ; } ;
4038 }
4139 ) ;
4240 inherit ( toplevel . config ) hostPkgs ;
@@ -150,19 +148,16 @@ let
150148 }
151149 )
152150 ] ;
153- extraSpecialArgs = { inherit inputs ; } ;
154151 } ;
155152
156153in
157154
158155forEachUbuntuImage "example" {
159156 modules = [
160157 ( testModule "old" )
161- ../../../example.nix
162- ] ;
163- extraPathsToRegister = [
164- newConfig
158+ ../../../examples/example.nix
165159 ] ;
160+ extraPathsToRegister = [ newConfig ] ;
166161 testScriptFunction =
167162 { toplevel , hostPkgs , ... } :
168163 #python
@@ -256,7 +251,7 @@ forEachUbuntuImage "example" {
256251 forEachUbuntuImage "prepopulate" {
257252 modules = [
258253 ( testModule "old" )
259- ../../../example.nix
254+ ../../../examples/ example.nix
260255 ] ;
261256 extraPathsToRegister = [ newConfig ] ;
262257 testScriptFunction =
@@ -314,7 +309,7 @@ forEachUbuntuImage "example" {
314309 forEachUbuntuImage "system-path" {
315310 modules = [
316311 ( testModule "old" )
317- ../../../example.nix
312+ ../../../examples/ example.nix
318313 ] ;
319314 extraPathsToRegister = [ newConfig ] ;
320315 testScriptFunction =
You can’t perform that action at this time.
0 commit comments