-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathflake.nix
More file actions
74 lines (68 loc) · 1.7 KB
/
Copy pathflake.nix
File metadata and controls
74 lines (68 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
description = "Hydra's builtin hydra-eval-jobs as a standalone";
inputs.nixpkgs.url = "https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz";
inputs.nix = {
url = "github:NixOS/nix/2.35-maintenance";
# We want to control the deps precisely
flake = false;
};
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
outputs =
{
self,
nixpkgs,
nix,
treefmt-nix,
}:
let
inherit (nixpkgs) lib;
systems = [
"aarch64-linux"
"riscv64-linux"
"x86_64-linux"
"aarch64-darwin"
];
eachSystem =
f:
lib.genAttrs systems (
system:
f system (
nixpkgs.legacyPackages.${system}.callPackage ./dev/nix-scope.nix {
inherit nix treefmt-nix self;
}
)
);
in
{
packages = eachSystem (
_system: scope: {
inherit (scope) nix-eval-jobs clangStdenv-nix-eval-jobs;
default = scope.nix-eval-jobs;
}
);
devShells = eachSystem (
_system: scope: {
default = scope.shell;
clang = scope.clangShell;
}
);
formatter = eachSystem (_system: scope: scope.treefmt.config.build.wrapper);
checks = eachSystem (
system: scope:
{
inherit (scope)
nix-eval-jobs
clangStdenv-nix-eval-jobs
shell
scheduler-spec
functional-tests
clang-tidy-fix
;
}
// lib.optionalAttrs (system != "riscv64-linux") {
treefmt = scope.treefmtCheck;
}
);
};
}