blob: f951b2b1e294bd4ca3fd52d5178ae89e9897bf69 (
plain) (
blame)
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
|
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
stdenv,
darwin,
}:
rustPlatform.buildRustPackage rec {
pname = "code2prompt";
version = "1.1.0";
src = fetchFromGitHub {
owner = "mufeedvh";
repo = "code2prompt";
rev = "v${version}";
hash = "sha256-KZqh0Vq4Mn56PhUO1JUzVpNBAGOZqUAsj31Cj5K+Lyk=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
# src is missing Cargo.lock
ln -s ${./Cargo.lock} Cargo.lock
'';
nativeBuildInputs = [ pkg-config ];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.AppKit
];
meta = {
description = "A CLI tool that converts your codebase into a single LLM prompt with a source tree, prompt templating, and token counting";
homepage = "https://github.com/mufeedvh/code2prompt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ heisfer ];
mainProgram = "code2prompt";
};
}
|