add: nix-based test system
This commit is contained in:
parent
009258d3cd
commit
3a0b8a5c3f
2 changed files with 7 additions and 3 deletions
1
assignment1/test.nix
Normal file
1
assignment1/test.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
|
|
@ -13,15 +13,18 @@
|
|||
];
|
||||
|
||||
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
in {
|
||||
packages = eachSystem (system:
|
||||
|
||||
importFromSubdirs = file: eachSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in pkgs.lib.mergeAttrsList
|
||||
(builtins.map (d:
|
||||
builtins.mapAttrs
|
||||
(_: v: pkgs.callPackage v {})
|
||||
(import ./${d}))
|
||||
(import ./${d}/${file}))
|
||||
subdirs));
|
||||
in {
|
||||
packages = importFromSubdirs "default.nix";
|
||||
checks = importFromSubdirs "test.nix";
|
||||
|
||||
devShells = eachSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue