at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 # build-system 6 setuptools, 7 llm, 8 # dependencies 9 prompt-toolkit, 10 pygments, 11 # tests 12 pytestCheckHook, 13 llm-cmd, 14}: 15 16buildPythonPackage rec { 17 pname = "llm-cmd"; 18 version = "0.2a0"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "simonw"; 23 repo = "llm-cmd"; 24 tag = version; 25 hash = "sha256-RhwQEllpee/XP1p0nrgL4m+KjSZzf61J8l1jJGlg94E="; 26 }; 27 28 # Only needed until https://github.com/simonw/llm-cmd/pull/18 is merged and released 29 patches = [ ./fix-test.patch ]; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 llm 35 prompt-toolkit 36 pygments 37 ]; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 ]; 42 43 pythonImportsCheck = [ 44 "llm_cmd" 45 ]; 46 47 passthru.tests = llm.mkPluginTest llm-cmd; 48 49 meta = { 50 description = "Use LLM to generate and execute commands in your shell"; 51 homepage = "https://github.com/simonw/llm-cmd"; 52 changelog = "https://github.com/simonw/llm-cmd/releases/tag/${version}"; 53 license = lib.licenses.asl20; 54 maintainers = with lib.maintainers; [ 55 erethon 56 philiptaron 57 ]; 58 }; 59}