nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 44 lines 1.2 kB view raw
1{ buildPythonApplication, lib, fetchPypi, isPy3k 2, cli-helpers, click, configobj, humanize, prompt_toolkit, psycopg2 3, pygments, sqlparse, pgspecial, setproctitle, keyring, pytest, mock 4}: 5 6buildPythonApplication rec { 7 pname = "pgcli"; 8 version = "2.2.0"; 9 10 disabled = !isPy3k; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "54138a31e6736a34c63b84a6d134c9292c9a73543cc0f66e80a0aaf79259d39b"; 15 }; 16 17 propagatedBuildInputs = [ 18 cli-helpers click configobj humanize prompt_toolkit psycopg2 19 pygments sqlparse pgspecial setproctitle keyring 20 ]; 21 22 postPatch = '' 23 substituteInPlace setup.py \ 24 --replace "prompt_toolkit>=2.0.6,<3.0.0" "prompt_toolkit" 25 ''; 26 27 checkInputs = [ pytest mock ]; 28 29 # `test_application_name_db_uri` fails: https://github.com/dbcli/pgcli/issues/1104 30 checkPhase = '' 31 pytest --deselect=tests/test_main.py::test_application_name_db_uri 32 ''; 33 34 meta = with lib; { 35 description = "Command-line interface for PostgreSQL"; 36 longDescription = '' 37 Rich command-line interface for PostgreSQL with auto-completion and 38 syntax highlighting. 39 ''; 40 homepage = https://pgcli.com; 41 license = licenses.bsd3; 42 maintainers = with maintainers; [ dywedir ]; 43 }; 44}