1{
2 lib,
3 fetchFromGitHub,
4 python3Packages,
5 versionCheckHook,
6}:
7
8python3Packages.buildPythonApplication rec {
9 pname = "phase-cli";
10 version = "1.19.2";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "phasehq";
15 repo = "cli";
16 tag = "v${version}";
17 hash = "sha256-XicOP/V9j74kogu6KEUyk06D0kCq/oG5N635h6X1eng=";
18 };
19
20 build-system = with python3Packages; [
21 setuptools
22 ];
23
24 dependencies = with python3Packages; [
25 keyring
26 questionary
27 cffi
28 requests
29 pynacl
30 rich
31 pyyaml
32 toml
33 python-hcl2
34 ];
35
36 nativeCheckInputs = [
37 versionCheckHook
38 python3Packages.pytestCheckHook
39 ];
40
41 enabledTestPaths = [
42 "tests/*.py"
43 ];
44
45 pythonRelaxDeps = true;
46
47 versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
48 versionCheckProgramArg = "--version";
49
50 meta = {
51 description = "Securely manage and sync environment variables with Phase";
52 homepage = "https://github.com/phasehq/cli";
53 changelog = "https://github.com/phasehq/cli/releases/tag/${src.tag}";
54 license = lib.licenses.gpl3Only;
55 maintainers = with lib.maintainers; [ genga898 ];
56 mainProgram = "phase";
57 };
58}