1{ lib, stdenv
2, buildPythonApplication
3, fetchPypi
4, isPy3k
5, cli-helpers
6, click
7, configobj
8, humanize
9, prompt-toolkit
10, psycopg2
11, pygments
12, sqlparse
13, pgspecial
14, setproctitle
15, keyring
16, pendulum
17, pytestCheckHook
18, mock
19}:
20
21buildPythonApplication rec {
22 pname = "pgcli";
23 version = "3.2.0";
24
25 disabled = !isPy3k;
26
27 src = fetchPypi {
28 inherit pname version;
29 sha256 = "6cde97e71996bf910a40b579e5285483c10ea04962a08def01c12433d5f7c6b7";
30 };
31
32 propagatedBuildInputs = [
33 cli-helpers
34 click
35 configobj
36 humanize
37 prompt-toolkit
38 psycopg2
39 pygments
40 sqlparse
41 pgspecial
42 setproctitle
43 keyring
44 pendulum
45 ];
46
47 checkInputs = [ pytestCheckHook mock ];
48
49 disabledTests = [
50 # tests that expect output from an older version of cli-helpers
51 "test_format_output"
52 "test_format_output_auto_expand"
53 ] ++ lib.optionals stdenv.isDarwin [ "test_application_name_db_uri" ];
54
55 meta = with lib; {
56 description = "Command-line interface for PostgreSQL";
57 longDescription = ''
58 Rich command-line interface for PostgreSQL with auto-completion and
59 syntax highlighting.
60 '';
61 homepage = "https://pgcli.com";
62 changelog = "https://github.com/dbcli/pgcli/raw/v${version}/changelog.rst";
63 license = licenses.bsd3;
64 maintainers = with maintainers; [ dywedir ];
65 };
66}