1{
2 lib,
3 buildPythonPackage,
4 colorama,
5 fetchPypi,
6 pillow,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "ascii-magic";
13 version = "2.3.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "ascii_magic";
20 inherit version;
21 hash = "sha256-PtQaHLFn3u1cz8YotmnzWjoD9nvdctzBi+X/2KJkPYU=";
22 };
23
24 propagatedBuildInputs = [
25 colorama
26 pillow
27 ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "ascii_magic" ];
32
33 preCheck = ''
34 cd tests
35 '';
36
37 disabledTests = [
38 # Test requires network access
39 "test_from_url"
40 "test_quick_test"
41 "test_wrong_url"
42 # No clipboard in the sandbox
43 "test_from_clipboard"
44 ];
45
46 meta = with lib; {
47 description = "Python module to converts pictures into ASCII art";
48 homepage = "https://github.com/LeandroBarone/python-ascii_magic";
49 changelog = "https://github.com/LeandroBarone/python-ascii_magic#changelog";
50 license = licenses.mit;
51 maintainers = with maintainers; [ fab ];
52 };
53}