2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-12-27 14:24:52 +00:00
|
|
|
, buildPythonApplication
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, cli-helpers
|
|
|
|
, click
|
|
|
|
, configobj
|
|
|
|
, humanize
|
2021-08-05 21:33:18 +00:00
|
|
|
, prompt-toolkit
|
2020-12-27 14:24:52 +00:00
|
|
|
, psycopg2
|
|
|
|
, pygments
|
|
|
|
, sqlparse
|
|
|
|
, pgspecial
|
|
|
|
, setproctitle
|
|
|
|
, keyring
|
|
|
|
, pendulum
|
|
|
|
, pytestCheckHook
|
|
|
|
, mock
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "pgcli";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "3.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "6cde97e71996bf910a40b579e5285483c10ea04962a08def01c12433d5f7c6b7";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-12-27 14:24:52 +00:00
|
|
|
cli-helpers
|
|
|
|
click
|
|
|
|
configobj
|
|
|
|
humanize
|
2021-08-05 21:33:18 +00:00
|
|
|
prompt-toolkit
|
2020-12-27 14:24:52 +00:00
|
|
|
psycopg2
|
|
|
|
pygments
|
|
|
|
sqlparse
|
|
|
|
pgspecial
|
|
|
|
setproctitle
|
|
|
|
keyring
|
|
|
|
pendulum
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
checkInputs = [ pytestCheckHook mock ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# tests that expect output from an older version of cli-helpers
|
|
|
|
"test_format_output"
|
|
|
|
"test_format_output_auto_expand"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ "test_application_name_db_uri" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line interface for PostgreSQL";
|
|
|
|
longDescription = ''
|
|
|
|
Rich command-line interface for PostgreSQL with auto-completion and
|
|
|
|
syntax highlighting.
|
|
|
|
'';
|
|
|
|
homepage = "https://pgcli.com";
|
2021-09-18 10:52:07 +00:00
|
|
|
changelog = "https://github.com/dbcli/pgcli/raw/v${version}/changelog.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ dywedir ];
|
|
|
|
};
|
|
|
|
}
|