beetsPackages.copyartifacts: refactor

This commit is contained in:
Fabian Affolter
2025-03-27 07:15:41 +01:00
parent 68feba21e9
commit bf3ba3053b
@@ -1,19 +1,21 @@
{
lib,
fetchFromGitHub,
beets,
fetchFromGitHub,
python3Packages,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "beets-copyartifacts";
version = "0.1.5";
pyproject = true;
src = fetchFromGitHub {
repo = "beets-copyartifacts";
owner = "adammillerio";
tag = "v${version}";
sha = "sha256-UTZh7T6Z288PjxFgyFxHnPt0xpAH3cnr8/jIrlJhtyU=";
hash = "sha256-UTZh7T6Z288PjxFgyFxHnPt0xpAH3cnr8/jIrlJhtyU=";
};
postPatch = ''
@@ -26,15 +28,17 @@ python3Packages.buildPythonApplication rec {
sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py
'';
pytestFlagsArray = [ "-r fEs" ];
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [ six ];
nativeCheckInputs = [
python3Packages.pytestCheckHook
beets
writableTmpDirAsHomeHook
];
preCheck = ''
export HOME=$(mktemp -d)
'';
pytestFlagsArray = [ "-r fEs" ];
meta = {
description = "Beets plugin to move non-music files during the import process";