From dcc4fd6a68f7f33a676543667007d77222e50b18 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 28 Sep 2024 10:58:59 +0000 Subject: [PATCH 1/2] pass-git-helper: 2.0.0 -> 3.0.0 --- .../version-management/pass-git-helper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/pass-git-helper/default.nix b/pkgs/applications/version-management/pass-git-helper/default.nix index da2f159601121ed..0c35c459377e3dc 100644 --- a/pkgs/applications/version-management/pass-git-helper/default.nix +++ b/pkgs/applications/version-management/pass-git-helper/default.nix @@ -2,13 +2,13 @@ buildPythonApplication rec { pname = "pass-git-helper"; - version = "2.0.0"; + version = "3.0.0"; src = fetchFromGitHub { owner = "languitar"; repo = "pass-git-helper"; rev = "refs/tags/v${version}"; - sha256 = "sha256-IpMaCG6kPNrWtcl10Lh7A3PyIF4Mk0t2wLYON+zMLsE="; + sha256 = "sha256-DLH3l4wYfBlrc49swLgyHeZXebJ5JSzU7cHjD7Hmw0g="; }; propagatedBuildInputs = [ pyxdg ]; From 7758143808a58667b4909a1a39293b3cf59a81d5 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 6 Oct 2024 17:00:03 +0900 Subject: [PATCH 2/2] 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 0c35c459377e3dc..590d25428a80d8a 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";