blob: 414f1734bd9967177bf45d1ef906cf2300f8856f (
plain)
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
|
{
lib,
stdenv,
buildGoModule,
git,
makeWrapper,
installShellFiles,
version,
src,
}:
buildGoModule {
pname = "skills";
inherit version src;
vendorHash = "sha256-7K17JaXFsjf163g5PXCb5ng2gYdotnZ2IDKk8KFjNj0=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
nativeBuildInputs = [
makeWrapper
installShellFiles
];
postInstall = ''
wrapProgram $out/bin/skills --prefix PATH : ${lib.makeBinPath [ git ]}
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd skills \
--bash <($out/bin/skills completion bash) \
--fish <($out/bin/skills completion fish) \
--zsh <($out/bin/skills completion zsh)
'';
meta = {
description = "Install and update agent skills from git repositories";
homepage = "https://git.simenandre.no/skills/about/";
license = lib.licenses.mit;
mainProgram = "skills";
};
}
|