diff --git a/pkgs/by-name/ph/phase-cli/package.nix b/pkgs/by-name/ph/phase-cli/package.nix new file mode 100644 index 000000000000..09468486e16c --- /dev/null +++ b/pkgs/by-name/ph/phase-cli/package.nix @@ -0,0 +1,58 @@ +{ + lib, + fetchFromGitHub, + python3Packages, + versionCheckHook, +}: + +python3Packages.buildPythonApplication rec { + pname = "phase-cli"; + version = "1.18.6"; + pyproject = true; + + src = fetchFromGitHub { + owner = "phasehq"; + repo = "cli"; + tag = "v${version}"; + hash = "sha256-4DvvTIXTV10euFSFpULcomrAhfZbOBZ0MKb5oR9GX64="; + }; + + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ + keyring + questionary + cffi + requests + pynacl + rich + pyyaml + toml + python-hcl2 + ]; + + nativeCheckInputs = [ + versionCheckHook + python3Packages.pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests/*.py" + ]; + + pythonRelaxDeps = true; + + versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}"; + versionCheckProgramArg = [ "--version" ]; + + meta = { + description = "Securely manage and sync environment variables with Phase"; + homepage = "https://github.com/phasehq/cli"; + changelog = "https://github.com/phasehq/cli/releases/tag/v${version}"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ genga898 ]; + mainProgram = "phase"; + }; +}