nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, python3
3, glibcLocales
4}:
5
6with python3.pkgs;
7
8buildPythonApplication rec {
9 pname = "mycli";
10 version = "1.26.1";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "sha256-jAMDXJtFJtv6CwhZZU4pdKDndZKp6bJ/QPWo2q6DvrE=";
15 };
16
17 propagatedBuildInputs = [
18 cli-helpers
19 click
20 configobj
21 importlib-resources
22 paramiko
23 prompt-toolkit
24 pyaes
25 pycrypto
26 pygments
27 pymysql
28 pyperclip
29 sqlglot
30 sqlparse
31 ];
32
33 checkInputs = [ pytest glibcLocales ];
34
35 checkPhase = ''
36 export HOME=.
37 export LC_ALL="en_US.UTF-8"
38
39 py.test \
40 --ignore=mycli/packages/paramiko_stub/__init__.py
41 '';
42
43 postPatch = ''
44 substituteInPlace setup.py \
45 --replace "cryptography == 36.0.2" "cryptography"
46 '';
47
48 meta = with lib; {
49 inherit version;
50 description = "Command-line interface for MySQL";
51 longDescription = ''
52 Rich command-line interface for MySQL with auto-completion and
53 syntax highlighting.
54 '';
55 homepage = "http://mycli.net";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ jojosch ];
58 };
59}