2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, glibcLocales
|
|
|
|
}:
|
|
|
|
|
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "mycli";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.27.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-0R2k5hRkAJbqgGZEPXWUb48oFxTKMKiQZckf3F+VC3I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-01-15 22:18:51 +00:00
|
|
|
cli-helpers
|
|
|
|
click
|
|
|
|
configobj
|
2021-03-09 03:18:52 +00:00
|
|
|
importlib-resources
|
2021-01-15 22:18:51 +00:00
|
|
|
paramiko
|
2021-08-05 21:33:18 +00:00
|
|
|
prompt-toolkit
|
2021-03-09 03:18:52 +00:00
|
|
|
pyaes
|
2021-01-15 22:18:51 +00:00
|
|
|
pycrypto
|
|
|
|
pygments
|
|
|
|
pymysql
|
|
|
|
pyperclip
|
2022-10-21 18:38:19 +00:00
|
|
|
sqlglot
|
2021-01-15 22:18:51 +00:00
|
|
|
sqlparse
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook glibcLocales ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export HOME=.
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
2020-07-18 16:06:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-10-23 06:41:50 +00:00
|
|
|
# fails at checkphase due to the below test paths
|
|
|
|
# disabling it specifically does not work, so we disable checking altogether
|
|
|
|
doCheck = false;
|
2023-02-09 11:40:11 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"mycli/packages/paramiko_stub/__init__.py"
|
|
|
|
];
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2022-10-21 18:38:19 +00:00
|
|
|
--replace "cryptography == 36.0.2" "cryptography"
|
2020-12-09 12:39:15 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit version;
|
|
|
|
description = "Command-line interface for MySQL";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mycli";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|