tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
codegrab: init at 1.0.7
Taha YASSINE
8 months ago
b1b8bb11
6fc2f2e4
+49
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
co
codegrab
package.nix
+49
pkgs/by-name/co/codegrab/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
buildGoModule,
4
4
+
fetchFromGitHub,
5
5
+
}:
6
6
+
7
7
+
buildGoModule (finalAttrs: {
8
8
+
pname = "codegrab";
9
9
+
version = "1.0.7";
10
10
+
11
11
+
src = fetchFromGitHub {
12
12
+
owner = "epilande";
13
13
+
repo = "codegrab";
14
14
+
tag = "v${finalAttrs.version}";
15
15
+
hash = "sha256-gKxvPcAZ8TnECAs3iMkFfZKdaq8vkLz/T9MUBWk4MfQ=";
16
16
+
leaveDotGit = true;
17
17
+
postFetch = ''
18
18
+
cd "$out"
19
19
+
git rev-parse --short HEAD > $out/COMMIT
20
20
+
find "$out" -name .git -print0 | xargs -0 rm -rf
21
21
+
'';
22
22
+
};
23
23
+
24
24
+
vendorHash = "sha256-u9pVOZOwK6xLdR4tlWN2eBoJZ2ziPEdJv78uCV0Suus=";
25
25
+
26
26
+
checkFlags = [
27
27
+
"-skip=TestParseSizeString"
28
28
+
];
29
29
+
30
30
+
ldflags = [
31
31
+
"-s"
32
32
+
"-w"
33
33
+
"-X=github.com/epilande/codegrab/internal/utils.Version=${finalAttrs.version}"
34
34
+
];
35
35
+
36
36
+
# ldflags based on metadata from git and source
37
37
+
preBuild = ''
38
38
+
ldflags+=" -X=github.com/epilande/codegrab/internal/utils.CommitSHA=$(cat COMMIT)"
39
39
+
'';
40
40
+
41
41
+
meta = {
42
42
+
description = "Interactive CLI tool for selecting and bundling code into a single, LLM-ready output file";
43
43
+
homepage = "https://github.com/epilande/codegrab";
44
44
+
changelog = "https://github.com/epilande/codegrab/releases/tag/${finalAttrs.src.tag}";
45
45
+
license = lib.licenses.mit;
46
46
+
maintainers = with lib.maintainers; [ taha-yassine ];
47
47
+
mainProgram = "grab";
48
48
+
};
49
49
+
})