From 2bcfe88606b1313be541297962398a8820b08768 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 9 May 2026 01:05:36 +0200 Subject: [PATCH] python3Packages.countryinfo: clean-up --- .../python-modules/countryinfo/default.nix | 22 +++++++++---------- .../countryinfo/fix-pyproject-file.patch | 11 ---------- 2 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 pkgs/development/python-modules/countryinfo/fix-pyproject-file.patch diff --git a/pkgs/development/python-modules/countryinfo/default.nix b/pkgs/development/python-modules/countryinfo/default.nix index 574e41ec04d7..40d190b2003a 100644 --- a/pkgs/development/python-modules/countryinfo/default.nix +++ b/pkgs/development/python-modules/countryinfo/default.nix @@ -4,10 +4,11 @@ fetchFromGitHub, poetry-core, pydantic, - typer, pytestCheckHook, + typer, }: -buildPythonPackage rec { + +buildPythonPackage (finalAttrs: { pname = "countryinfo"; version = "1.0.1"; pyproject = true; @@ -15,31 +16,28 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "porimol"; repo = "countryinfo"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-PE9XiVH6XE+OSySL5Lo0MPWyIEX8xgeHQB7MttMfmz8="; }; - build-system = [ poetry-core ]; + pythonRelaxDeps = [ "typer" ]; - patches = [ ./fix-pyproject-file.patch ]; + build-system = [ poetry-core ]; dependencies = [ pydantic typer ]; - pythonRelaxDeps = [ "typer" ]; - pythonImportsCheck = [ "countryinfo" ]; nativeCheckInputs = [ pytestCheckHook ]; meta = { - homepage = "https://github.com/porimol/countryinfo"; description = "Data about countries, ISO info and states/provinces within them"; + homepage = "https://github.com/porimol/countryinfo"; + changelog = "https://github.com/porimol/countryinfo/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ - cizniarova - ]; + maintainers = with lib.maintainers; [ cizniarova ]; }; -} +}) diff --git a/pkgs/development/python-modules/countryinfo/fix-pyproject-file.patch b/pkgs/development/python-modules/countryinfo/fix-pyproject-file.patch deleted file mode 100644 index a07a02b15d26..000000000000 --- a/pkgs/development/python-modules/countryinfo/fix-pyproject-file.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/pyproject.toml b/pyproject.toml -index f31c9e3..31fa9c8 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,3 +1,6 @@ -+[project] -+name = "countryinfo" -+ - [tool.poetry] - name = "countryinfo" - version = "1.0.0"