-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
76 lines (73 loc) · 1.98 KB
/
flake.nix
File metadata and controls
76 lines (73 loc) · 1.98 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
{
description = "flake for Go with Agent-skills";
inputs = {
nixpkgs = {
url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
agent-skills = {
url = "github:Kyure-A/agent-skills-nix";
};
anthropic-skills = {
url = "github:anthropics/skills";
flake = false;
};
};
outputs = { nixpkgs, flake-utils, agent-skills, anthropic-skills, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
agentLib = agent-skills.lib.agent-skills;
sources = {
anthropic = {
path = anthropic-skills;
subdir = "skills";
};
};
catalog = agentLib.discoverCatalog sources;
allowlist = agentLib.allowlistFor {
inherit catalog sources;
# Add Agent Skills
enable = [
"doc-coauthoring"
"skill-creator"
];
};
selection = agentLib.selectSkills {
inherit catalog allowlist sources;
skills = { };
};
bundle = agentLib.mkBundle { inherit pkgs selection; };
localTargets = {
claude = agentLib.defaultLocalTargets.claude // { enable = true; };
};
in
{
packages.default = pkgs.buildGoModule {
pname = "graftx";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-herMHZOw1VTTrIGOhmDnygi2LfRcqDpXEZEX6KsYoWI=";
# サンドボックス環境ではホームディレクトリが存在しないためテストをスキップ
doCheck = false;
};
apps = {
skills-install-local = {
type = "app";
program = "${agentLib.mkLocalInstallScript {inherit pkgs bundle; targets = localTargets; }}/bin/skills-install-local";
};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
uv
go
gotools
golangci-lint
];
};
}
);
}