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