diff --git a/pkgs/development/python-modules/single-version/0001-set-poetry-core.patch b/pkgs/development/python-modules/single-version/0001-set-poetry-core.patch new file mode 100644 index 000000000000..4c6f869c0c27 --- /dev/null +++ b/pkgs/development/python-modules/single-version/0001-set-poetry-core.patch @@ -0,0 +1,21 @@ +From d949b37151cd538d4c6a15e1ba6c1343f8bff76d Mon Sep 17 00:00:00 2001 +From: "P. R. d. O" +Date: Mon, 6 Dec 2021 15:26:19 -0600 +Subject: [PATCH] set poetry-core + +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index d3fdc52..bd7ddc2 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -27,4 +27,4 @@ black = "^19.10b0" + + [build-system] + requires = ["poetry>=0.12"] +-build-backend = "poetry.masonry.api" ++build-backend = "poetry.core.masonry.api" +-- +2.33.1 diff --git a/pkgs/development/python-modules/single-version/default.nix b/pkgs/development/python-modules/single-version/default.nix new file mode 100644 index 000000000000..39cd92f5f67e --- /dev/null +++ b/pkgs/development/python-modules/single-version/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchFromGitHub, poetry-core, pytestCheckHook }: + +buildPythonPackage rec { + pname = "single-version"; + version = "1.5.1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "hongquan"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-I8ATQzPRH9FVjqPoqrNjYMBU5azpmkLjRmHcz943C10="; + }; + + patches = [ + ./0001-set-poetry-core.patch + ]; + + nativeBuildInputs = [ poetry-core ]; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "single_version" ]; + + meta = with lib; { + description = "Utility to let you have a single source of version in your code base"; + homepage = "https://github.com/hongquan/single-version"; + license = licenses.mit; + maintainers = with maintainers; [ wolfangaukang ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b72a6fb062d9..a99399e8befe 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9196,6 +9196,8 @@ in { simpy = callPackage ../development/python-modules/simpy { }; + single-version = callPackage ../development/python-modules/single-version { }; + signify = callPackage ../development/python-modules/signify { }; siosocks = callPackage ../development/python-modules/siosocks { };