2019-12-05 05:01:00 +00:00
|
|
|
{ buildPythonApplication, lib, fetchPypi, isPy3k
|
2019-10-05 20:48:36 +01:00
|
|
|
, cli-helpers, click, configobj, humanize, prompt_toolkit, psycopg2
|
|
|
|
, pygments, sqlparse, pgspecial, setproctitle, keyring, pytest, mock
|
|
|
|
}:
|
2017-05-24 04:12:55 +01:00
|
|
|
|
2019-10-05 20:48:36 +01:00
|
|
|
buildPythonApplication rec {
|
2018-11-07 03:37:44 +00:00
|
|
|
pname = "pgcli";
|
2020-04-13 04:56:25 +01:00
|
|
|
version = "3.0.0";
|
2017-05-24 04:12:55 +01:00
|
|
|
|
2019-10-05 20:48:36 +01:00
|
|
|
disabled = !isPy3k;
|
2018-11-30 07:19:51 +00:00
|
|
|
|
2019-10-05 20:48:36 +01:00
|
|
|
src = fetchPypi {
|
2018-11-07 03:37:44 +00:00
|
|
|
inherit pname version;
|
2020-04-13 04:56:25 +01:00
|
|
|
sha256 = "10j01bd031fys1vcihibsi5rrfd8w1kgahpcsbk4l07871c24829";
|
2017-05-24 04:12:55 +01:00
|
|
|
};
|
|
|
|
|
2019-10-05 20:48:36 +01:00
|
|
|
propagatedBuildInputs = [
|
2018-11-04 02:03:40 +00:00
|
|
|
cli-helpers click configobj humanize prompt_toolkit psycopg2
|
2018-09-18 12:01:44 +01:00
|
|
|
pygments sqlparse pgspecial setproctitle keyring
|
2017-05-24 04:12:55 +01:00
|
|
|
];
|
|
|
|
|
2019-12-21 06:19:54 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "prompt_toolkit>=2.0.6,<3.0.0" "prompt_toolkit"
|
|
|
|
'';
|
|
|
|
|
2019-10-05 20:48:36 +01:00
|
|
|
checkInputs = [ pytest mock ];
|
2018-11-07 03:37:44 +00:00
|
|
|
|
2019-12-05 05:01:00 +00:00
|
|
|
# `test_application_name_db_uri` fails: https://github.com/dbcli/pgcli/issues/1104
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --deselect=tests/test_main.py::test_application_name_db_uri
|
|
|
|
'';
|
2018-11-07 03:37:44 +00:00
|
|
|
|
2017-05-24 04:12:55 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Command-line interface for PostgreSQL";
|
|
|
|
longDescription = ''
|
|
|
|
Rich command-line interface for PostgreSQL with auto-completion and
|
|
|
|
syntax highlighting.
|
|
|
|
'';
|
2020-04-13 04:56:25 +01:00
|
|
|
homepage = "https://pgcli.com";
|
2017-05-24 04:12:55 +01:00
|
|
|
license = licenses.bsd3;
|
2018-09-18 12:01:44 +01:00
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2017-05-24 04:12:55 +01:00
|
|
|
};
|
|
|
|
}
|