From 42fa97340b1fa390f9252fb1f5968acf21704007 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 18 Aug 2023 22:59:15 -0700 Subject: [PATCH] ansible-doctor: use poetry-dynamic-versioning like upstream --- pkgs/tools/admin/ansible/doctor.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/admin/ansible/doctor.nix b/pkgs/tools/admin/ansible/doctor.nix index e51d2faced9d..ef7ef6aabb85 100644 --- a/pkgs/tools/admin/ansible/doctor.nix +++ b/pkgs/tools/admin/ansible/doctor.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchpatch , python3 }: @@ -15,15 +16,20 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-nZv1PdR0kGrke2AjcDWjDWBdsw64UpHYFNDFAe/UoJo="; }; - pythonRelaxDeps = true; + patches = [ + # https://github.com/thegeeklab/ansible-doctor/pull/541 + (fetchpatch { + name = "poetry-dynamic-versioning-pep517.patch"; + url = "https://github.com/thegeeklab/ansible-doctor/commit/b77ba9dccaef4b386bd54b128136c948665eb61a.patch"; + hash = "sha256-XfdTkRk9B857V5DQnxlbwxTb098YwHzKGzNQBTQzWCM="; + }) + ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'version = "0.0.0"' 'version = "${version}"' - ''; + pythonRelaxDeps = true; nativeBuildInputs = with python3.pkgs; [ poetry-core + poetry-dynamic-versioning pythonRelaxDepsHook ];