2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, glibcLocales
|
2020-12-09 12:39:15 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "mycli";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "1.22.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "1lq2x95553vdmhw13cxcgsd2g2i32izhsb7hxd4m1iwf9b3msbpv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
paramiko pymysql configobj sqlparse prompt_toolkit pygments click pycrypto cli-helpers
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [ pytest mock glibcLocales ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export HOME=.
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
py.test \
|
|
|
|
--ignore=mycli/packages/paramiko_stub/__init__.py
|
2020-07-18 16:06:22 +00:00
|
|
|
'';
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
patches = [
|
|
|
|
# TODO: remove with next release (v1.22.3 or v1.23)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dbcli/mycli/commit/17f093d7b70ab2d9f3c6eababa041bf76f029aac.patch";
|
|
|
|
sha256 = "sha256-VwfbtzUtElV+ErH+NJb+3pRtSaF0yVK8gEWCvlzZNHI=";
|
|
|
|
excludes = [ "changelog.md" "mycli/AUTHORS" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "sqlparse>=0.3.0,<0.4.0" "sqlparse"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit version;
|
|
|
|
description = "Command-line interface for MySQL";
|
|
|
|
longDescription = ''
|
|
|
|
Rich command-line interface for MySQL with auto-completion and
|
|
|
|
syntax highlighting.
|
|
|
|
'';
|
|
|
|
homepage = "http://mycli.net";
|
2020-12-09 12:39:15 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jojosch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|