From f3060e1468dbeafeb46f0455ea9ae9de4faee925 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 28 Feb 2025 09:11:01 +0100 Subject: [PATCH] beetsPackages.alternatives: modernize --- .../audio/beets/plugins/alternatives.nix | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/alternatives.nix b/pkgs/tools/audio/beets/plugins/alternatives.nix index d2520fcaca63..bcd35f8de701 100644 --- a/pkgs/tools/audio/beets/plugins/alternatives.nix +++ b/pkgs/tools/audio/beets/plugins/alternatives.nix @@ -3,6 +3,7 @@ fetchFromGitHub, beets, python3Packages, + writableTmpDirAsHomeHook, }: python3Packages.buildPythonApplication rec { @@ -13,28 +14,34 @@ python3Packages.buildPythonApplication rec { src = fetchFromGitHub { repo = "beets-alternatives"; owner = "geigerzaehler"; - rev = "refs/tags/v${version}"; - sha256 = "sha256-i67Bzdh84TuVwcgwo5SgHFp1W04KF3VA6cbrFz82je0="; + tag = "v${version}"; + hash = "sha256-i67Bzdh84TuVwcgwo5SgHFp1W04KF3VA6cbrFz82je0="; }; nativeBuildInputs = [ beets + ]; + + dependencies = [ python3Packages.poetry-core ]; - nativeCheckInputs = with python3Packages; [ - pytestCheckHook - pytest-cov - mock - typeguard - ]; - preCheck = '' - export HOME=$(mktemp -d) - ''; + nativeCheckInputs = + with python3Packages; + [ + pytestCheckHook + pytest-cov-stub + mock + typeguard + ] + ++ [ + writableTmpDirAsHomeHook + ]; meta = { description = "Beets plugin to manage external files"; homepage = "https://github.com/geigerzaehler/beets-alternatives"; + changelog = "https://github.com/geigerzaehler/beets-alternatives/blob/v${version}/CHANGELOG.md"; maintainers = with lib.maintainers; [ aszlig lovesegfault