Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 glibcLocales, 7 gnureadline, 8 pyperclip, 9 pytest-cov-stub, 10 pytest-mock, 11 pytestCheckHook, 12 pythonOlder, 13 rich-argparse, 14 setuptools-scm, 15 wcwidth, 16}: 17 18buildPythonPackage rec { 19 pname = "cmd2"; 20 version = "2.7.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.9"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-gdgTW0YhDh0DpagQuvhZBppiIUeIzu7DWI9E7thvvus="; 28 }; 29 30 build-system = [ setuptools-scm ]; 31 32 dependencies = [ 33 pyperclip 34 rich-argparse 35 wcwidth 36 ] 37 ++ lib.optional stdenv.hostPlatform.isDarwin gnureadline; 38 39 doCheck = true; 40 41 nativeCheckInputs = [ 42 glibcLocales 43 pytestCheckHook 44 pytest-cov-stub 45 pytest-mock 46 ]; 47 48 disabledTests = [ 49 # Don't require vim for tests, it causes lots of rebuilds 50 "test_find_editor_not_specified" 51 "test_transcript" 52 ]; 53 54 pythonImportsCheck = [ "cmd2" ]; 55 56 meta = with lib; { 57 description = "Enhancements for standard library's cmd module"; 58 homepage = "https://github.com/python-cmd2/cmd2"; 59 changelog = "https://github.com/python-cmd2/cmd2/releases/tag/${version}"; 60 license = with licenses; [ mit ]; 61 maintainers = with maintainers; [ teto ]; 62 }; 63}