summaryrefslogtreecommitdiffstats
path: root/pkgs/tools
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-01-31 22:37:45 -0800
committerRobert Schütz <nix@dotlambda.de>2023-02-03 14:32:30 -0800
commit0349728efbdbb92e6880a560fc9ab82a8824d7bf (patch)
treeede4eb663822e72e389ea625b2f797d7864cc759 /pkgs/tools
parent01959f61f0fda94a9d85a01c777ae69568c8c311 (diff)
poetryPlugins.poetry-plugin-up: init at 0.2.1
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/package-management/poetry/default.nix2
-rw-r--r--pkgs/tools/package-management/poetry/plugins/poetry-plugin-up.nix43
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/package-management/poetry/default.nix b/pkgs/tools/package-management/poetry/default.nix
index e706f727c29b..3d9a2fe8c9aa 100644
--- a/pkgs/tools/package-management/poetry/default.nix
+++ b/pkgs/tools/package-management/poetry/default.nix
@@ -20,9 +20,11 @@ let
};
plugins = with python.pkgs; {
+ poetry-plugin-up = callPackage ./plugins/poetry-plugin-up.nix { };
};
# selector is a function mapping pythonPackages to a list of plugins
+ # e.g. poetry.withPlugins (ps: with ps; [ poetry-plugin-up ])
withPlugins = selector: let
selected = selector plugins;
in python.pkgs.toPythonApplication (python.pkgs.poetry.overridePythonAttrs (old: {
diff --git a/pkgs/tools/package-management/poetry/plugins/poetry-plugin-up.nix b/pkgs/tools/package-management/poetry/plugins/poetry-plugin-up.nix
new file mode 100644
index 000000000000..e84546573dac
--- /dev/null
+++ b/pkgs/tools/package-management/poetry/plugins/poetry-plugin-up.nix
@@ -0,0 +1,43 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, poetry-core
+, pytestCheckHook
+, pytest-mock
+, poetry
+}:
+
+buildPythonPackage rec {
+ pname = "poetry-plugin-up";
+ version = "0.2.1";
+ format = "pyproject";
+
+ src = fetchFromGitHub {
+ owner = "MousaZeidBaker";
+ repo = pname;
+ rev = "refs/tags/${version}";
+ hash = "sha256-16p0emvgWa56Km8U5HualCSStbulqyINbC3Jez9Y1n0=";
+ };
+
+ nativeBuildInputs = [
+ poetry-core
+ ];
+
+ nativeCheckInputs = [
+ pytestCheckHook
+ pytest-mock
+ poetry
+ ];
+
+ preCheck = ''
+ export HOME=$TMPDIR
+ '';
+
+ meta = with lib; {
+ description = "Poetry plugin to simplify package updates";
+ homepage = "https://github.com/MousaZeidBaker/poetry-plugin-up";
+ changelog = "https://github.com/MousaZeidBaker/poetry-plugin-up/releases/tag/${version}";
+ license = licenses.mit;
+ maintainers = [ maintainers.k900 ];
+ };
+}