1{
2 lib,
3 callPackage,
4 config,
5 fetchFromGitHub,
6 python3Packages,
7}:
8/*
9 ** To customize the enabled beets plugins, use the pluginOverrides input to the
10 ** derivation.
11 ** Examples:
12 **
13 ** Disabling a builtin plugin:
14 ** beets.override { pluginOverrides = { beatport.enable = false; }; }
15 **
16 ** Enabling an external plugin:
17 ** beets.override { pluginOverrides = {
18 ** alternatives = { enable = true; propagatedBuildInputs = [ beetsPackages.alternatives ]; };
19 ** }; }
20*/
21let
22 extraPatches = [
23 # Bash completion fix for Nix
24 ./patches/bash-completion-always-print.patch
25 ];
26in
27lib.makeExtensible (
28 self:
29 {
30 beets = self.beets-stable;
31
32 beets-stable = callPackage ./common.nix rec {
33 inherit python3Packages extraPatches;
34 version = "2.3.1";
35 src = fetchFromGitHub {
36 owner = "beetbox";
37 repo = "beets";
38 tag = "v${version}";
39 hash = "sha256-INxL2XDn8kwRYYcZATv/NdLmAtfQvxVDWKB1OYo8dxY=";
40 };
41 };
42
43 beets-minimal = self.beets.override { disableAllPlugins = true; };
44
45 beets-unstable = callPackage ./common.nix {
46 inherit python3Packages;
47 version = "2.3.1";
48 src = fetchFromGitHub {
49 owner = "beetbox";
50 repo = "beets";
51 rev = "d487d675b9115672c484eab8a6729b1f0fd24b68";
52 hash = "sha256-INxL2XDn8kwRYYcZATv/NdLmAtfQvxVDWKB1OYo8dxY=";
53 };
54 };
55
56 alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; };
57 audible = callPackage ./plugins/audible.nix { beets = self.beets-minimal; };
58 copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; };
59 filetote = callPackage ./plugins/filetote.nix { beets = self.beets-minimal; };
60 }
61 // lib.optionalAttrs config.allowAliases {
62 extrafiles = throw "extrafiles is unmaintained since 2020 and broken since beets 2.0.0";
63 }
64)