From 92c6003ad6877cdea48278684fca4f16ecfa86f4 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 16 Oct 2023 17:59:59 +0900 Subject: [PATCH 1/2] python311Packages.jinja2-git: unstable-2021-07-20 -> 1.3.0 Diff: https://github.com/wemake-services/jinja2-git/compare/c6d19b207eb6ac07182dc8fea35251d286c82512...1.3.0 Changelog: https://github.com/wemake-services/jinja2-git/blob/1.3.0/CHANGELOG.md --- pkgs/development/python-modules/jinja2-git/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/jinja2-git/default.nix b/pkgs/development/python-modules/jinja2-git/default.nix index 59b34f6a4fb3..c4b7e6cde0fa 100644 --- a/pkgs/development/python-modules/jinja2-git/default.nix +++ b/pkgs/development/python-modules/jinja2-git/default.nix @@ -7,17 +7,14 @@ buildPythonPackage rec { pname = "jinja2-git"; - version = "unstable-2021-07-20"; + version = "1.3.0"; format = "pyproject"; src = fetchFromGitHub { owner = "wemake-services"; repo = "jinja2-git"; - # this is master, we can't patch because of poetry.lock :( - # luckily, there appear to have been zero API changes since then, only - # dependency upgrades - rev = "c6d19b207eb6ac07182dc8fea35251d286c82512"; - sha256 = "0yw0318w57ksn8azmdyk3zmyzfhw0k281fddnxyf4115bx3aph0g"; + rev = "refs/tags/${version}"; + hash = "sha256-XuN2L3/HLcZ/WPWiCtufDOmkxj+q4I6IOgjrGQHfNLk="; }; nativeBuildInputs = [ poetry-core ]; From ab78f5523e25062da2f37cd2909eb48d06cb2625 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 17 Oct 2023 13:29:49 +0900 Subject: [PATCH 2/2] python311Packages.jinja2-git: refactor --- .../development/python-modules/jinja2-git/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/jinja2-git/default.nix b/pkgs/development/python-modules/jinja2-git/default.nix index c4b7e6cde0fa..518f62c54030 100644 --- a/pkgs/development/python-modules/jinja2-git/default.nix +++ b/pkgs/development/python-modules/jinja2-git/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, pythonOlder , jinja2 , poetry-core }: @@ -8,7 +9,9 @@ buildPythonPackage rec { pname = "jinja2-git"; version = "1.3.0"; - format = "pyproject"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "wemake-services"; @@ -18,12 +21,18 @@ buildPythonPackage rec { }; nativeBuildInputs = [ poetry-core ]; + propagatedBuildInputs = [ jinja2 ]; + + # the tests need to be run on the git repository + doCheck = false; + pythonImportsCheck = [ "jinja2_git" ]; meta = with lib; { homepage = "https://github.com/wemake-services/jinja2-git"; description = "Jinja2 extension to handle git-specific things"; + changelog = "https://github.com/wemake-services/jinja2-git/blob/${src.rev}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ cpcloud ]; };