nixpkgs/pkgs/development/tools/database/pgcli/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2017-05-24 04:12:55 +01:00
{ lib, pythonPackages, fetchFromGitHub }:
pythonPackages.buildPythonApplication rec {
name = "pgcli-${version}";
2017-06-03 19:32:14 +01:00
version = "1.6.0";
2017-05-24 04:12:55 +01:00
src = fetchFromGitHub {
2017-06-03 19:32:14 +01:00
sha256 = "0f1zv4kwi2991pclf8chrhgjwf8jkqxdh5ndc9qx6igh56iyyncz";
2017-05-24 04:12:55 +01:00
rev = "v${version}";
repo = "pgcli";
owner = "dbcli";
};
buildInputs = with pythonPackages; [ pytest mock ];
checkPhase = ''
2017-06-03 19:32:14 +01:00
mkdir /tmp/homeless-shelter
HOME=/tmp/homeless-shelter py.test tests -k 'not test_missing_rc_dir and not test_quoted_db_uri and not test_port_db_uri'
2017-05-24 04:12:55 +01:00
'';
propagatedBuildInputs = with pythonPackages; [
click configobj humanize prompt_toolkit psycopg2
pygments sqlparse pgspecial setproctitle
];
postPatch = ''
substituteInPlace setup.py --replace "==" ">="
rm tests/test_rowlimit.py
'';
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;
};
}