Skip to content

Commit

Permalink
Merge pull request #250111 from tjni/ansible-doctor
Browse files Browse the repository at this point in the history
ansible-doctor: use poetry-dynamic-versioning like upstream
  • Loading branch information
tjni authored Aug 22, 2023
2 parents f4ffbe5 + 42fa973 commit 098b992
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pkgs/tools/admin/ansible/doctor.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, fetchpatch
, python3
}:

Expand All @@ -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
];

Expand Down

0 comments on commit 098b992

Please sign in to comment.