From 7758143808a58667b4909a1a39293b3cf59a81d5 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 6 Oct 2024 17:00:03 +0900 Subject: [PATCH] pass-git-helper: modernize --- .../pass-git-helper/default.nix | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/version-management/pass-git-helper/default.nix b/pkgs/applications/version-management/pass-git-helper/default.nix index 0c35c459377e..590d25428a80 100644 --- a/pkgs/applications/version-management/pass-git-helper/default.nix +++ b/pkgs/applications/version-management/pass-git-helper/default.nix @@ -1,8 +1,9 @@ -{ lib, buildPythonApplication, fetchFromGitHub, pyxdg, pytest, pytest-mock }: +{ lib, buildPythonApplication, fetchFromGitHub, pyxdg, pytestCheckHook, pytest-cov-stub, pytest-mock, setuptools }: buildPythonApplication rec { pname = "pass-git-helper"; version = "3.0.0"; + pyproject = true; src = fetchFromGitHub { owner = "languitar"; @@ -11,11 +12,19 @@ buildPythonApplication rec { sha256 = "sha256-DLH3l4wYfBlrc49swLgyHeZXebJ5JSzU7cHjD7Hmw0g="; }; - propagatedBuildInputs = [ pyxdg ]; - nativeCheckInputs = [ pytest pytest-mock ]; - preCheck = '' - export HOME=$(mktemp -d) - ''; + build-system = [ setuptools ]; + + dependencies = [ pyxdg ]; + + env.HOME = "$TMPDIR"; + + pythonImportsCheck = [ "passgithelper" ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + pytest-mock + ]; meta = with lib; { homepage = "https://github.com/languitar/pass-git-helper";