Files
nixpkgs/pkgs/development/python-modules/cmd2_3/default.nix
Jannik efd20a9f76 pythonPackages.cmd2_3: init at 3.5.1
Has been split off from the cmd2 package since that has breaking changes
that break other packages (i.e. pythonPackages.pysim). See discussion on
GitHub [1].

[1]: https://github.com/NixOS/nixpkgs/pull/445219#issuecomment-6397708218
2026-11-12 22:16:14 -05:00

66 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
glibcLocales,
gnureadline,
pyperclip,
pytest-cov-stub,
pytest-mock,
pytestCheckHook,
rich-argparse,
setuptools-scm,
}:
buildPythonPackage (finalAttrs: {
pname = "cmd2";
version = "3.5.1";
pyproject = true;
src = fetchFromGitHub {
owner = "python-cmd2";
repo = "cmd2";
tag = finalAttrs.version;
hash = "sha256-dntUbxlMVlss6TN8IhEaWcANqiqWgqxT35bGY7cWjcE=";
};
build-system = [ setuptools-scm ];
dependencies = [
pyperclip
rich-argparse
]
++ 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"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# does not work under darwin sandbox
"test_history_file_bad_compression"
"test_history_file_bad_json"
"test_path_completion_complete_user"
];
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/${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ teto ];
};
})