forked from numtide/llm-agents.nix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.nix
More file actions
49 lines (44 loc) · 1.23 KB
/
package.nix
File metadata and controls
49 lines (44 loc) · 1.23 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
{
buildNpmPackage,
fetchurl,
lib,
fetchNpmDepsWithPackuments,
npmConfigHook,
runCommand,
}:
let
versionData = lib.importJSON ./hashes.json;
version = versionData.version;
# Create a source with the vendored package-lock.json included
srcWithLock = runCommand "openspec-src-with-lock" { } ''
mkdir -p $out
tar -xzf ${
fetchurl {
url = "https://registry.npmjs.org/@fission-ai/openspec/-/openspec-${version}.tgz";
hash = versionData.sourceHash;
}
} -C $out --strip-components=1
cp ${./package-lock.json} $out/package-lock.json
'';
in
buildNpmPackage {
inherit npmConfigHook version;
pname = "openspec";
src = srcWithLock;
npmDeps = fetchNpmDepsWithPackuments {
src = srcWithLock;
name = "openspec-${version}-npm-deps";
hash = versionData.npmDepsHash;
fetcherVersion = 2;
};
makeCacheWritable = true;
dontNpmBuild = true;
meta = {
description = "Spec-driven development for AI coding assistants";
homepage = "https://github.com/Fission-AI/OpenSpec";
downloadPage = "https://www.npmjs.com/package/@fission-ai/openspec";
license = lib.licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
mainProgram = "openspec";
};
}