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