1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 14:47:06 +00:00
nixpkgs/pkgs/development/tools/database/pgcli/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2019-12-05 05:01:00 +00:00
{ buildPythonApplication, lib, fetchPypi, isPy3k
, cli-helpers, click, configobj, humanize, prompt_toolkit, psycopg2
, pygments, sqlparse, pgspecial, setproctitle, keyring, pytest, mock
}:
2017-05-24 04:12:55 +01:00
buildPythonApplication rec {
2018-11-07 03:37:44 +00:00
pname = "pgcli";
2019-12-05 05:01:00 +00:00
version = "2.2.0";
2017-05-24 04:12:55 +01:00
disabled = !isPy3k;
src = fetchPypi {
2018-11-07 03:37:44 +00:00
inherit pname version;
2019-12-05 05:01:00 +00:00
sha256 = "54138a31e6736a34c63b84a6d134c9292c9a73543cc0f66e80a0aaf79259d39b";
2017-05-24 04:12:55 +01:00
};
propagatedBuildInputs = [
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
];
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.
'';
homepage = https://pgcli.com;
license = licenses.bsd3;
2018-09-18 12:01:44 +01:00
maintainers = with maintainers; [ dywedir ];
2017-05-24 04:12:55 +01:00
};
}