diff --git a/pkgs/by-name/ap/apm-cli/package.nix b/pkgs/by-name/ap/apm-cli/package.nix new file mode 100644 index 000000000000..d7bb92755741 --- /dev/null +++ b/pkgs/by-name/ap/apm-cli/package.nix @@ -0,0 +1,77 @@ +{ + lib, + python3Packages, + fetchFromGitHub, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "apm-cli"; + version = "0.15.0"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "apm"; + tag = "v${finalAttrs.version}"; + hash = "sha256-xKY1ESX683uFqfiLqAK2ALpO+2NYs6ecqa4S639c1+k="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail '"llm-github-models>=0.1.0",' "" + ''; + + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ + click + colorama + filelock + gitpython + llm + # Not in nixpkgs and the game is not worth the candle for this package. + # llm-github-models + python-frontmatter + pyyaml + requests + rich + rich-click + ruamel-yaml + toml + tomli + watchdog + ]; + + optional-dependencies = with python3Packages; { + build = [ + pyinstaller + ]; + dev = [ + jsonschema + mypy + pylint + pytest + pytest-cov + pytest-split + pytest-xdist + ruff + ]; + }; + + pythonImportsCheck = [ + "apm_cli" + ]; + + meta = { + description = "Agent Package Manager"; + homepage = "https://github.com/microsoft/apm"; + changelog = "https://github.com/microsoft/apm/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ drupol ]; + mainProgram = "apm-cli"; + }; +})