depot/third_party/nixpkgs/pkgs/tools/audio/beets/plugins/copyartifacts.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

36 lines
985 B
Nix

{ lib, fetchFromGitHub, beets, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "beets-copyartifacts";
version = "0.1.5";
src = fetchFromGitHub {
repo = "beets-copyartifacts";
owner = "adammillerio";
rev = "v${version}";
sha256 = "sha256-UTZh7T6Z288PjxFgyFxHnPt0xpAH3cnr8/jIrlJhtyU=";
};
postPatch = ''
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
sed -i -e '/namespace_packages/d' setup.py
printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py
'';
pytestFlagsArray = [ "-r fEs" ];
nativeCheckInputs = [
python3Packages.pytestCheckHook
beets
];
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = {
description = "Beets plugin to move non-music files during the import process";
homepage = "https://github.com/adammillerio/beets-copyartifacts";
license = lib.licenses.mit;
inherit (beets.meta) platforms;
};
}