File tree Expand file tree Collapse file tree 7 files changed +187
-6
lines changed
Expand file tree Collapse file tree 7 files changed +187
-6
lines changed Original file line number Diff line number Diff line change 4444 - run : nix flake update den
4545 - run : nix run .#write-flake
4646 - run : nix flake metadata
47- - run : nix flake check
47+ - run : nix flake check -L
Original file line number Diff line number Diff line change 4343 nixpkgs-lib . follows = "nixpkgs" ;
4444 nixpkgs-stable . url = "github:nixos/nixpkgs/release-25.05" ;
4545 systems . url = "github:nix-systems/default" ;
46+ theirs = {
47+ inputs = {
48+ den . follows = "den" ;
49+ flake-aspects . follows = "flake-aspects" ;
50+ flake-parts . follows = "flake-parts" ;
51+ import-tree . follows = "import-tree" ;
52+ nixpkgs . follows = "nixpkgs" ;
53+ } ;
54+ url = "path:./modules/_example/ci/_theirs" ;
55+ } ;
4656 } ;
4757
4858}
Original file line number Diff line number Diff line change 1+ {
2+ outputs = inputs : inputs . flake-parts . lib . mkFlake { inherit inputs ; } ( inputs . import-tree ./modules ) ;
3+
4+ inputs = {
5+ nixpkgs . url = "github:nixos/nixpkgs/nixpkgs-unstable" ;
6+ flake-parts . url = "github:hercules-ci/flake-parts" ;
7+ flake-parts . inputs . nixpkgs-lib . follows = "nixpkgs" ;
8+
9+ import-tree . url = "github:vic/import-tree" ;
10+ flake-aspects . url = "github:vic/flake-aspects" ;
11+ den . url = "github:vic/den" ;
12+ } ;
13+ }
Original file line number Diff line number Diff line change 1+ # This flake is for testing by ci/namespace.nix
2+ { inputs , ... } :
3+ {
4+ systems = [
5+ "x86_64-linux"
6+ "aarch64-darwin"
7+ ] ;
8+ imports = [
9+ inputs . den . flakeModule
10+ ( inputs . den . namespace "sim" true )
11+ ] ;
12+
13+ sim . a . _ . b . _ . c . _ . d = {
14+ nixos . sims = [ "theirs abcd" ] ;
15+ } ;
16+
17+ sim . ul . _ . a . _ . tion = {
18+ nixos . sims = [ "theirs simulation" ] ;
19+ } ;
20+
21+ }
Original file line number Diff line number Diff line change 1717 # enable <angle/bracket> syntax for finding aspects.
1818 _module . args . __findFile = den . lib . __findFile ;
1919
20+ # example "external" flake to import some aspects from.
21+ flake-file . inputs . theirs = {
22+ url = "path:./modules/_example/ci/_theirs" ;
23+ inputs . nixpkgs . follows = "nixpkgs" ;
24+ inputs . flake-parts . follows = "flake-parts" ;
25+ inputs . import-tree . follows = "import-tree" ;
26+ inputs . flake-aspects . follows = "flake-aspects" ;
27+ inputs . den . follows = "den" ;
28+ } ;
29+
2030 imports = [
2131 # create a local namespace and output at flake.denful.eg
2232 ( inputs . den . namespace "eg" true )
3444 inputA
3545 inputB
3646 exposeToFlake
47+ inputs . theirs # from actual external flake
3748 ]
3849 )
3950 ] ;
7182 "inputB simulation"
7283 "local namespace"
7384 "local simulation"
85+ "theirs simulation"
7486 ] ;
7587 actual = lib . sort ( a : b : a < b ) rockhopper . config . sims ;
7688 in
77- expected == actual
89+ expected == ( builtins . trace actual actual )
7890 ) ;
7991
8092 } ;
You can’t perform that action at this time.
0 commit comments