nixpkgs/pkgs/tools/admin/mycli/default.nix

60 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
2018-08-07 06:40:56 +00:00
, python3
, glibcLocales
}:
2018-08-07 06:40:56 +00:00
with python3.pkgs;
buildPythonApplication rec {
pname = "mycli";
2021-03-05 08:09:51 +00:00
version = "1.24.1";
src = fetchPypi {
inherit pname version;
2021-03-05 08:09:51 +00:00
sha256 = "sha256-dI2Yvj2llI9TlMFbs35ijYeFuGqoTovZyRh+ILhNMmY=";
};
propagatedBuildInputs = [
2021-01-15 13:50:31 +00:00
cli-helpers
click
configobj
2021-03-05 08:09:51 +00:00
importlib-resources
2021-01-15 13:50:31 +00:00
paramiko
prompt-toolkit
2021-03-05 08:09:51 +00:00
pyaes
2021-01-15 13:50:31 +00:00
pycrypto
pygments
pymysql
pyperclip
sqlparse
];
2018-08-07 06:40:56 +00:00
checkInputs = [ pytest mock glibcLocales ];
checkPhase = ''
export HOME=.
export LC_ALL="en_US.UTF-8"
2020-07-27 10:28:48 +00:00
py.test \
--ignore=mycli/packages/paramiko_stub/__init__.py
2020-07-01 10:30:23 +00:00
'';
postPatch = ''
substituteInPlace setup.py \
2021-03-05 08:09:51 +00:00
--replace "sqlparse>=0.3.0,<0.4.0" "sqlparse" \
--replace "importlib_resources >= 5.0.0" "importlib_resources"
'';
meta = with lib; {
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";
license = licenses.bsd3;
maintainers = with maintainers; [ jojosch ];
};
}