1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 cli-helpers,
7 click,
8 configobj,
9 prompt-toolkit,
10 psycopg,
11 pygments,
12 sqlparse,
13 pgspecial,
14 setproctitle,
15 keyring,
16 pendulum,
17 pytestCheckHook,
18 sshtunnel,
19 mock,
20}:
21
22# this is a pythonPackage because of the ipython line magics in pgcli.magic
23# integrating with ipython-sql
24buildPythonPackage rec {
25 pname = "pgcli";
26 version = "4.0.1";
27 format = "setuptools";
28
29 src = fetchPypi {
30 inherit pname version;
31 hash = "sha256-8v7qIJnOGtXoqdXZOw7a9g3GHpeyG3XpHZcjk5zlO9I=";
32 };
33
34 propagatedBuildInputs = [
35 cli-helpers
36 click
37 configobj
38 prompt-toolkit
39 psycopg
40 pygments
41 sqlparse
42 pgspecial
43 setproctitle
44 keyring
45 pendulum
46 sshtunnel
47 ];
48
49 nativeCheckInputs = [
50 pytestCheckHook
51 mock
52 ];
53
54 disabledTests = lib.optionals stdenv.isDarwin [ "test_application_name_db_uri" ];
55
56 meta = with lib; {
57 description = "Command-line interface for PostgreSQL";
58 mainProgram = "pgcli";
59 longDescription = ''
60 Rich command-line interface for PostgreSQL with auto-completion and
61 syntax highlighting.
62 '';
63 homepage = "https://pgcli.com";
64 changelog = "https://github.com/dbcli/pgcli/raw/v${version}/changelog.rst";
65 license = licenses.bsd3;
66 maintainers = with maintainers; [
67 dywedir
68 SuperSandro2000
69 ];
70 };
71}