From 960f59ba72e533430d4c61fa8d9d070a53d58e36 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 1 Sep 2021 07:51:12 -0400 Subject: [PATCH 1/2] poetry-semver: init at 0.1.0 --- .../python-modules/poetry-semver/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/poetry-semver/default.nix diff --git a/pkgs/development/python-modules/poetry-semver/default.nix b/pkgs/development/python-modules/poetry-semver/default.nix new file mode 100644 index 000000000000..2318a2cf60be --- /dev/null +++ b/pkgs/development/python-modules/poetry-semver/default.nix @@ -0,0 +1,24 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "poetry-semver"; + version = "0.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-2Am2Eqons5vy0PydMbT0gJsOlyZGxfGc+kbHJbdjiBA="; + }; + + checkInputs = [ pytestCheckHook ]; + + meta = with lib; { + description = "A semantic versioning library for Python."; + homepage = "https://github.com/python-poetry/semver"; + license = licenses.mit; + maintainers = with maintainers; [ cpcloud ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dcd3f7d2312a..0488bbbdc4db 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5566,6 +5566,8 @@ in { poetry-core = callPackage ../development/python-modules/poetry-core { }; + poetry-semver = callPackage ../development/python-modules/poetry-semver { }; + poezio = callPackage ../applications/networking/instant-messengers/poezio { }; polib = callPackage ../development/python-modules/polib { }; From b27bd16bd95e64966e881def7f95968e84a9aaea Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 1 Sep 2021 07:51:27 -0400 Subject: [PATCH 2/2] poetry2conda: init at 0.3.0 --- .../python-modules/poetry2conda/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/poetry2conda/default.nix diff --git a/pkgs/development/python-modules/poetry2conda/default.nix b/pkgs/development/python-modules/poetry2conda/default.nix new file mode 100644 index 000000000000..7f5268a23dc4 --- /dev/null +++ b/pkgs/development/python-modules/poetry2conda/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, pytest-mock +, pytestCheckHook +, toml +, poetry +, poetry-semver +, pyyaml +}: + +buildPythonApplication rec { + pname = "poetry2conda"; + version = "0.3.0"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "dojeda"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-UqNoEGgStvqtxhYwExk7wO4SvATaM2kGaFbB5ViJa7U="; + }; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ + poetry-semver + toml + ]; + + checkInputs = [ + pytest-mock + pytestCheckHook + pyyaml + ]; + + meta = with lib; { + description = "A script to convert a Python project declared on a pyproject.toml to a conda environment"; + homepage = "https://github.com/dojeda/poetry2conda"; + license = licenses.mit; + maintainers = with maintainers; [ cpcloud ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9aad0cf0b4d3..feb7fdea5b8b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12939,6 +12939,8 @@ with pkgs; inherit pkgs lib; }; + poetry2conda = python3Packages.callPackage ../development/python-modules/poetry2conda { }; + pipenv = callPackage ../development/tools/pipenv {}; pipewire = callPackage ../development/libraries/pipewire {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0488bbbdc4db..70c1760da3cf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5568,6 +5568,8 @@ in { poetry-semver = callPackage ../development/python-modules/poetry-semver { }; + poetry2conda = callPackage ../development/python-modules/poetry2conda { }; + poezio = callPackage ../applications/networking/instant-messengers/poezio { }; polib = callPackage ../development/python-modules/polib { };