mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
85c2e0daf5
Apples fix
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
{
|
|
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";
|
|
};
|
|
}
|