Files
nixpkgs/pkgs/development/python-modules/cmd2/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

64 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
glibcLocales,
gnureadline,
pyperclip,
pytest-cov-stub,
pytest-mock,
pytestCheckHook,
pythonOlder,
rich-argparse,
setuptools-scm,
wcwidth,
}:
buildPythonPackage rec {
pname = "cmd2";
version = "2.7.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-gdgTW0YhDh0DpagQuvhZBppiIUeIzu7DWI9E7thvvus=";
};
build-system = [ setuptools-scm ];
dependencies = [
pyperclip
rich-argparse
wcwidth
]
++ lib.optional stdenv.hostPlatform.isDarwin gnureadline;
doCheck = true;
nativeCheckInputs = [
glibcLocales
pytestCheckHook
pytest-cov-stub
pytest-mock
];
disabledTests = [
# Don't require vim for tests, it causes lots of rebuilds
"test_find_editor_not_specified"
"test_transcript"
];
pythonImportsCheck = [ "cmd2" ];
meta = {
description = "Enhancements for standard library's cmd module";
homepage = "https://github.com/python-cmd2/cmd2";
changelog = "https://github.com/python-cmd2/cmd2/releases/tag/${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ teto ];
};
}