From a0fea4f1bd227945bfd1e7771ee4a2976cb2e5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 5 Jan 2025 05:19:48 -0800 Subject: [PATCH] poetryPlugins.poetry-plugin-shell: init at 1.0.0 --- pkgs/by-name/po/poetry/package.nix | 1 + .../po/poetry/plugins/poetry-plugin-shell.nix | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 pkgs/by-name/po/poetry/plugins/poetry-plugin-shell.nix diff --git a/pkgs/by-name/po/poetry/package.nix b/pkgs/by-name/po/poetry/package.nix index 8bfd4547c756..730fdbbc7140 100644 --- a/pkgs/by-name/po/poetry/package.nix +++ b/pkgs/by-name/po/poetry/package.nix @@ -54,6 +54,7 @@ let poetry-plugin-export = callPackage ./plugins/poetry-plugin-export.nix { }; poetry-plugin-up = callPackage ./plugins/poetry-plugin-up.nix { }; poetry-plugin-poeblix = callPackage ./plugins/poetry-plugin-poeblix.nix { }; + poetry-plugin-shell = callPackage ./plugins/poetry-plugin-shell.nix { }; }; # selector is a function mapping pythonPackages to a list of plugins diff --git a/pkgs/by-name/po/poetry/plugins/poetry-plugin-shell.nix b/pkgs/by-name/po/poetry/plugins/poetry-plugin-shell.nix new file mode 100644 index 000000000000..ff3abe44fc67 --- /dev/null +++ b/pkgs/by-name/po/poetry/plugins/poetry-plugin-shell.nix @@ -0,0 +1,50 @@ +{ + buildPythonPackage, + fetchFromGitHub, + lib, + pexpect, + poetry, + poetry-core, + pytest-mock, + pytest-xdist, + pytestCheckHook, + shellingham, +}: + +buildPythonPackage rec { + pname = "poetry-plugin-shell"; + version = "1.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "python-poetry"; + repo = "poetry-plugin-shell"; + tag = version; + hash = "sha256-ynbZCzic6bAIwtG0rGk4oMPc8pm59UFboNAGUb0qJnE="; + }; + + build-system = [ poetry-core ]; + + buildInputs = [ + poetry + ]; + + dependencies = [ + pexpect + shellingham + ]; + + nativeCheckInputs = [ + pytest-mock + pytest-xdist + pytestCheckHook + ]; + + meta = { + changelog = "https://github.com/python-poetry/poetry-plugin-shell/blob/${src.tag}/CHANGELOG.md"; + description = "Poetry plugin to run subshell with virtual environment activated"; + homepage = "https://github.com/python-poetry/poetry-plugin-shell"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +}