diff options
| author | Nicolas Benes <nbenes.gh@xandea.de> | 2023-06-12 12:32:32 +0200 |
|---|---|---|
| committer | Nicolas Benes <nbenes.gh@xandea.de> | 2023-06-14 17:45:08 +0200 |
| commit | e9c0042b5b7665c4d1c2928f0330db20310c9e36 (patch) | |
| tree | 1f5057b29402b15bb8eefb048eddf1a53062a568 | |
| parent | Merge pull request #234752 from NixOS/backport-232913-to-release-23.05 (diff) | |
| download | nixpkgs-e9c0042b5b7665c4d1c2928f0330db20310c9e36.tar.gz | |
python3Packages.click-aliases: init at 1.0.1
(cherry picked from commit 2423529216312570d302553e74bd0feeb9723f16)
3 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/click-aliases/0001-Fix-quotes-in-test.patch b/pkgs/development/python-modules/click-aliases/0001-Fix-quotes-in-test.patch new file mode 100644 index 000000000000..13cc6a68e8d3 --- /dev/null +++ b/pkgs/development/python-modules/click-aliases/0001-Fix-quotes-in-test.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nicolas Benes <nbenes.gh@xandea.de> +Date: Mon, 12 Jun 2023 11:29:32 +0200 +Subject: [PATCH] Fix quotes in test + + +diff --git a/tests/test_basic.py b/tests/test_basic.py +index 077e6c0..90bbdc3 100644 +--- a/tests/test_basic.py ++++ b/tests/test_basic.py +@@ -43,8 +43,8 @@ def test_foobar(runner): + + TEST_INVALID = """Usage: cli [OPTIONS] COMMAND [ARGS]... + {} +-Error: No such command "bar". +-""".format('Try "cli --help" for help.\n' if _click7 else '') ++Error: No such command 'bar'. ++""".format("Try 'cli --help' for help.\n" if _click7 else '') + + + def test_invalid(runner): +diff --git a/tests/test_foobar.py b/tests/test_foobar.py +index fd6c4e6..ab0ad5d 100644 +--- a/tests/test_foobar.py ++++ b/tests/test_foobar.py +@@ -44,8 +44,8 @@ def test_foobar(runner): + + TEST_INVALID = """Usage: cli [OPTIONS] COMMAND [ARGS]... + {} +-Error: No such command "baz". +-""".format('Try "cli --help" for help.\n' if _click7 else '') ++Error: No such command 'baz'. ++""".format("Try 'cli --help' for help.\n" if _click7 else '') + + + def test_invalid(runner): +-- +2.40.1 + diff --git a/pkgs/development/python-modules/click-aliases/default.nix b/pkgs/development/python-modules/click-aliases/default.nix new file mode 100644 index 000000000000..677cb1309fd7 --- /dev/null +++ b/pkgs/development/python-modules/click-aliases/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, click +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "click-aliases"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "click-contrib"; + repo = "click-aliases"; + rev = "v${version}"; + hash = "sha256-vzWlCb4m9TdRaVz4DrlRRZ60+9gj60NoiALgvaIG0gA="; + }; + + patches = [ + ./0001-Fix-quotes-in-test.patch + ]; + + propagatedBuildInputs = [ + click + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "click_aliases" ]; + + meta = with lib; { + homepage = "https://github.com/click-contrib/click-aliases"; + description = "Enable aliases for click"; + license = licenses.mit; + maintainers = with maintainers; [ panicgh ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4f35925d5617..5fb41539a55a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1857,6 +1857,8 @@ self: super: with self; { clickclick = callPackage ../development/python-modules/clickclick { }; + click-aliases = callPackage ../development/python-modules/click-aliases { }; + click-command-tree = callPackage ../development/python-modules/click-command-tree { }; click-completion = callPackage ../development/python-modules/click-completion { }; |
