nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 65 lines 1.3 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 rich-argparse, 13 setuptools-scm, 14 wcwidth, 15 python, 16}: 17 18buildPythonPackage rec { 19 pname = "cmd2"; 20 version = if python.isPy313 then "3.1.0" else "3.2.1"; 21 pyproject = true; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = 26 if python.isPy313 then 27 "sha256-zOOuzgGLCxBVmIraoraHrJwd84v9Kr/Cnb61GpcH3jM=" 28 else 29 "sha256-bGNyobJs0Uu2IJZTyJ1zAP58FDno3KMPW2tv/bXyFPo="; 30 }; 31 32 build-system = [ setuptools-scm ]; 33 34 dependencies = [ 35 pyperclip 36 rich-argparse 37 wcwidth 38 ] 39 ++ lib.optional stdenv.hostPlatform.isDarwin gnureadline; 40 41 doCheck = true; 42 43 nativeCheckInputs = [ 44 glibcLocales 45 pytestCheckHook 46 pytest-cov-stub 47 pytest-mock 48 ]; 49 50 disabledTests = [ 51 # Don't require vim for tests, it causes lots of rebuilds 52 "test_find_editor_not_specified" 53 "test_transcript" 54 ]; 55 56 pythonImportsCheck = [ "cmd2" ]; 57 58 meta = { 59 description = "Enhancements for standard library's cmd module"; 60 homepage = "https://github.com/python-cmd2/cmd2"; 61 changelog = "https://github.com/python-cmd2/cmd2/releases/tag/${version}"; 62 license = with lib.licenses; [ mit ]; 63 maintainers = with lib.maintainers; [ teto ]; 64 }; 65}