From f13bfcaeef13bd3f277e89a2c5a9e2ece8ef70e2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 26 Jan 2025 09:26:11 -0500 Subject: [PATCH] ansible-later: 3.3.1 -> 4.0.8 Diff: https://github.com/thegeeklab/ansible-later/compare/refs/tags/v3.3.1...v4.0.8 Changelog: https://github.com/thegeeklab/ansible-later/releases/tag/v4.0.8 --- pkgs/tools/admin/ansible/later.nix | 62 +++++++++--------------------- 1 file changed, 19 insertions(+), 43 deletions(-) diff --git a/pkgs/tools/admin/ansible/later.nix b/pkgs/tools/admin/ansible/later.nix index aec0c0b80204..14fa7e514ab2 100644 --- a/pkgs/tools/admin/ansible/later.nix +++ b/pkgs/tools/admin/ansible/later.nix @@ -1,86 +1,62 @@ { lib, fetchFromGitHub, - fetchpatch, - python3, + python3Packages, }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "ansible-later"; - version = "3.3.1"; - format = "pyproject"; + version = "4.0.8"; + pyproject = true; src = fetchFromGitHub { owner = "thegeeklab"; repo = pname; - rev = "refs/tags/v${version}"; - hash = "sha256-7k81eEcM+BXNrln6+Lu0+1LjsZdYkUidrRQCdlBbQB8="; + tag = "v${version}"; + hash = "sha256-4ZHCnLeG5gr0UtKQLU+6xnTxUbxnLcmDd51Psnaa42I="; }; - patches = [ - # https://github.com/thegeeklab/ansible-later/pull/658 - (fetchpatch { - name = "poetry-dynamic-versioning-pep517.patch"; - url = "https://github.com/thegeeklab/ansible-later/commit/a2c278fb45769648df1439df5bb25883dddfc58a.patch"; - hash = "sha256-++CiwwHZoaPC8XHaYbNQeU3zqEi2a4eIYbuSQkO0jTI="; - }) - ]; - - pythonRelaxDeps = [ - "anyconfig" - "flake8" - "jsonschema" - "pathspec" - "python-json-logger" - "PyYAML" - "toolz" - "unidiff" - "yamllint" - ]; - - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3Packages; [ poetry-core poetry-dynamic-versioning ]; - propagatedBuildInputs = with python3.pkgs; [ - ansible + dependencies = with python3Packages; [ + pyyaml ansible-core + ansible anyconfig appdirs colorama - flake8 jsonschema nested-lookup pathspec python-json-logger - pyyaml toolz unidiff yamllint - distutils ]; - nativeCheckInputs = with python3.pkgs; [ + nativeCheckInputs = with python3Packages; [ pytest-cov-stub pytest-mock pytestCheckHook ]; - postInstall = '' - rm $out/lib/python*/site-packages/LICENSE - ''; - pythonImportsCheck = [ "ansiblelater" ]; - meta = with lib; { + preCheck = '' + export HOME="$TMPDIR" + ''; + + meta = { description = "Best practice scanner for Ansible roles and playbooks"; mainProgram = "ansible-later"; homepage = "https://github.com/thegeeklab/ansible-later"; - changelog = "https://github.com/thegeeklab/ansible-later/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ tboerger ]; + changelog = "https://github.com/thegeeklab/ansible-later/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ tboerger ]; }; }