main
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 poetry-core,
6 mediafile,
7 reflink,
8 toml,
9 typeguard,
10}:
11
12buildPythonPackage rec {
13 pname = "beets-filetote";
14 version = "1.1.1";
15 pyproject = true;
16
17 src = fetchPypi {
18 pname = "beets_filetote";
19 inherit version;
20 hash = "sha256-2u9Zhlwr/R7Q2Vxr4bs0B58lADg1n7qao8WRwRttCnk=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml --replace-fail "poetry-core<2.0.0" "poetry-core"
25 '';
26
27 build-system = [
28 poetry-core
29 ];
30
31 dependencies = [
32 mediafile
33 reflink
34 toml
35 typeguard
36 ];
37
38 # Don't check for beets dependency - it will be provided by the beets package
39 pythonRemoveDeps = [ "beets" ];
40
41 # Remove conflicting files from namespace package
42 postInstall = ''
43 rm -rf $out/lib/python*/site-packages/beetsplug/__init__.py
44 rm -rf $out/lib/python*/site-packages/beetsplug/__pycache__
45 '';
46
47 # Tests require a running beets setup
48 doCheck = false;
49
50 # Skip imports check - beets tries to create config dirs during import
51 pythonImportsCheck = [ ];
52
53 meta = with lib; {
54 description = "Beets plugin to copy/move non-music extra files, attachments, and artifacts during import";
55 homepage = "https://github.com/gtronset/beets-filetote";
56 license = licenses.mit;
57 maintainers = with maintainers; [ ];
58 };
59}