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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
2018-08-07 07:40:56 +01:00
, python3
2023-05-25 19:37:59 +01:00
, fetchPypi
2018-08-07 07:40:56 +01:00
, glibcLocales
}:
2018-08-07 07:40:56 +01:00
with python3.pkgs;
buildPythonApplication rec {
pname = "mycli";
2022-10-10 11:54:40 +01:00
version = "1.26.1";
src = fetchPypi {
inherit pname version;
2022-10-10 11:54:40 +01:00
sha256 = "sha256-jAMDXJtFJtv6CwhZZU4pdKDndZKp6bJ/QPWo2q6DvrE=";
};
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
2022-10-10 11:54:40 +01:00
sqlglot
2021-01-15 13:50:31 +00:00
sqlparse
];
nativeCheckInputs = [ pytestCheckHook glibcLocales ];
2018-08-07 07:40:56 +01:00
preCheck = ''
2018-08-07 07:40:56 +01:00
export HOME=.
export LC_ALL="en_US.UTF-8"
2020-07-01 11:30:23 +01:00
'';
disabledTestPaths = [
"mycli/packages/paramiko_stub/__init__.py"
];
disabledTests = [
# Note: test_auto_escaped_col_names is currently failing due to a bug upstream.
# TODO: re-enable this test once there is a fix upstream. See
# https://github.com/dbcli/mycli/issues/1103 for details.
"test_auto_escaped_col_names"
];
postPatch = ''
substituteInPlace setup.py \
2022-10-10 11:54:40 +01:00
--replace "cryptography == 36.0.2" "cryptography"
'';
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 ];
};
}