1{
2 lib,
3 click,
4 setuptools,
5 fetchFromGitHub,
6 buildPythonPackage,
7 pytestCheckHook,
8 versionCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "files-to-prompt";
13 version = "0.6";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "simonw";
18 repo = "files-to-prompt";
19 tag = version;
20 hash = "sha256-LWp/DNP3bsh7/goQGkpi4x2N11tRuhLVh2J8H6AUH0w=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [ click ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 versionCheckHook
30 ];
31
32 versionCheckProgramArg = "--version";
33
34 meta = {
35 mainProgram = "files-to-prompt";
36 description = "Concatenate a directory full of files into a single prompt for use with LLMs";
37 homepage = "https://github.com/simonw/files-to-prompt";
38 changelog = "https://github.com/simonw/files-to-prompt/releases/tag/${src.tag}";
39 license = lib.licenses.asl20;
40 maintainers = with lib.maintainers; [
41 erethon
42 philiptaron
43 ];
44 };
45}