Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
86 lines (80 loc) · 2.06 KB
/
Copy pathflake.nix
File metadata and controls
86 lines (80 loc) · 2.06 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
75
76
77
78
79
80
81
82
83
84
85
86
{
description = "Agent-first development environment for the zed-sync contract matrix";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs, ... }:
let
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: import nixpkgs { inherit system; };
toolchainFor =
pkgs:
let
node = pkgs.lib.attrByPath [ "nodejs_22" ] pkgs.nodejs pkgs;
wasmBindgen = pkgs.lib.attrByPath [ "wasm-bindgen-cli_0_2_114" ] pkgs.wasm-bindgen-cli pkgs;
in
with pkgs;
[
actionlint
bash
cacert
dart
git
jdk17
jq
nix
nixfmt
node
rustup
shellcheck
shfmt
wasmBindgen
];
in
{
formatter = forAllSystems (system: (pkgsFor system).nixfmt);
packages = forAllSystems (
system:
let
pkgs = pkgsFor system;
agentCheck = pkgs.writeShellApplication {
name = "agent-check";
runtimeInputs = toolchainFor pkgs;
text = builtins.readFile ./.nix/agent-check.sh;
};
in
{
inherit agentCheck;
default = agentCheck;
}
);
apps = forAllSystems (system: {
agent-check = {
type = "app";
program = "${self.packages.${system}.agentCheck}/bin/agent-check";
};
default = self.apps.${system}.agent-check;
});
checks = forAllSystems (system: {
agentCheck = self.packages.${system}.agentCheck;
});
devShells = forAllSystems (
system:
let
pkgs = pkgsFor system;
in
{
default = import ./.nix/dev-shell.nix {
inherit pkgs;
agentCheck = self.packages.${system}.agentCheck;
toolchain = toolchainFor pkgs;
};
}
);
};
}