diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index a9cd1a9bdfb9..2a4540681f6f 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -57,6 +57,7 @@ lib.makeExtensible (self: { }; alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; }; + audible = callPackage ./plugins/audible.nix { beets = self.beets-minimal; }; copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; }; extrafiles = throw "extrafiles is unmaintained since 2020 and broken since beets 2.0.0"; diff --git a/pkgs/tools/audio/beets/plugins/audible.nix b/pkgs/tools/audio/beets/plugins/audible.nix new file mode 100644 index 000000000000..8ff8d78e5d3d --- /dev/null +++ b/pkgs/tools/audio/beets/plugins/audible.nix @@ -0,0 +1,45 @@ +{ + beets, + fetchFromGitHub, + lib, + nix-update-script, + python3Packages, +}: +python3Packages.buildPythonApplication rec { + pname = "beets-audible"; + version = "1.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Neurrone"; + repo = "beets-audible"; + rev = "v${version}"; + hash = "sha256-m955KPtYfjmtm9kHhkZLWoMYzVq0THOwvKCJYiVna7k="; + }; + + pythonRelaxDeps = true; + + build-system = with python3Packages; [ + hatchling + ]; + + dependencies = + [ beets ] + ++ (with python3Packages; [ + markdownify + natsort + tldextract + ]); + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Beets-audible: Organize Your Audiobook Collection With Beets"; + homepage = "https://github.com/Neurrone/beets-audible"; + platforms = with lib.platforms; linux ++ darwin ++ windows; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ jwillikers ]; + }; +}