2022-05-07 20:42:01 +00:00
|
|
|
{ lib
|
|
|
|
, callPackage
|
2021-12-18 15:33:00 +00:00
|
|
|
, fetchFromGitHub
|
2024-03-10 17:44:05 +00:00
|
|
|
, fetchPypi
|
2023-07-05 16:58:49 +00:00
|
|
|
, fetchpatch
|
2023-10-26 21:29:31 +00:00
|
|
|
, python3Packages
|
2014-12-30 21:53:00 +00:00
|
|
|
}:
|
2022-05-09 19:20:20 +00:00
|
|
|
/*
|
|
|
|
** To customize the enabled beets plugins, use the pluginOverrides input to the
|
|
|
|
** derivation.
|
|
|
|
** Examples:
|
|
|
|
**
|
|
|
|
** Disabling a builtin plugin:
|
|
|
|
** beets.override { pluginOverrides = { beatport.enable = false; }; }
|
|
|
|
**
|
|
|
|
** Enabling an external plugin:
|
|
|
|
** beets.override { pluginOverrides = {
|
|
|
|
** alternatives = { enable = true; propagatedBuildInputs = [ beetsPackages.alternatives ]; };
|
|
|
|
** }; }
|
|
|
|
*/
|
2024-03-10 17:44:05 +00:00
|
|
|
let
|
|
|
|
legacyMediafilePython3Packages = python3Packages.override {
|
|
|
|
overrides = self: super: {
|
|
|
|
mediafile = super.mediafile.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.10.1";
|
|
|
|
format = "pyproject";
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "mediafile";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-kpZCoX7lAjuQhiIc6AzcLFHQYCGokNRDOwvVvTLysp8=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in lib.makeExtensible (self: {
|
2022-05-07 20:42:01 +00:00
|
|
|
beets = self.beets-stable;
|
|
|
|
|
|
|
|
beets-stable = callPackage ./common.nix rec {
|
2024-03-10 17:44:05 +00:00
|
|
|
python3Packages = legacyMediafilePython3Packages;
|
2024-01-19 11:54:37 +00:00
|
|
|
# NOTE: ./builtin-plugins.nix and ./common.nix can have some conditionals
|
|
|
|
# be removed when stable version updates
|
2022-05-07 20:42:01 +00:00
|
|
|
version = "1.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "beetbox";
|
|
|
|
repo = "beets";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-fT+rCJJQR7bdfAcmeFRaknmh4ZOP4RCx8MXpq7/D8tM=";
|
|
|
|
};
|
2023-07-05 16:58:49 +00:00
|
|
|
extraPatches = [
|
2023-07-08 21:03:03 +00:00
|
|
|
# Bash completion fix for Nix
|
|
|
|
./patches/bash-completion-always-print.patch
|
|
|
|
|
|
|
|
# Fix unidecode>=1.3.5 compat
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/beetbox/beets/commit/5ae1e0f3c8d3a450cb39f7933aa49bb78c2bc0d9.patch";
|
|
|
|
hash = "sha256-gqkrE+U1j3tt1qPRJufTGS/GftaSw/gweXunO/mCVG8=";
|
|
|
|
})
|
|
|
|
|
2023-07-05 16:58:49 +00:00
|
|
|
# Fix embedart with ImageMagick 7.1.1-12
|
|
|
|
# https://github.com/beetbox/beets/pull/4839
|
|
|
|
# The upstream patch does not apply on 1.6.0, as the related code has been refactored since
|
2023-07-08 21:03:03 +00:00
|
|
|
./patches/fix-embedart-imagick-7.1.1-12.patch
|
2023-10-26 20:31:37 +00:00
|
|
|
# Pillow 10 compatibility fix, a backport of
|
|
|
|
# https://github.com/beetbox/beets/pull/4868, which doesn't apply now
|
|
|
|
./patches/fix-pillow10-compat.patch
|
2023-11-19 21:07:04 +00:00
|
|
|
|
|
|
|
# Sphinx 6 compatibility fix.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/beetbox/beets/commit/2106f471affd1dab35b4b26187b9c74d034528c5.patch";
|
|
|
|
hash = "sha256-V/886dYJW/O55VqU8sd+x/URIFcKhP6j5sUhTGMoxL8=";
|
|
|
|
})
|
2023-07-05 16:58:49 +00:00
|
|
|
];
|
2023-10-26 21:02:58 +00:00
|
|
|
disabledTests = [
|
|
|
|
# This issue is present on this version alone, and can be removed on the
|
|
|
|
# next stable version version bump. Since this is fixed in branch master,
|
|
|
|
# we don't have a bug ticket open for this. As of writing, it also seems
|
|
|
|
# hard to find a patch that can be backported to v1.6.0 that would fix
|
|
|
|
# the failure, as the master branch has gone through too many changes
|
|
|
|
# now.
|
|
|
|
"test_get_single_item_by_path"
|
|
|
|
];
|
2014-12-30 02:23:37 +00:00
|
|
|
};
|
|
|
|
|
2022-05-07 20:42:01 +00:00
|
|
|
beets-minimal = self.beets.override { disableAllPlugins = true; };
|
|
|
|
|
|
|
|
beets-unstable = callPackage ./common.nix {
|
2023-10-26 21:29:31 +00:00
|
|
|
inherit python3Packages;
|
2024-03-17 14:11:41 +00:00
|
|
|
version = "unstable-2024-03-16";
|
2022-05-07 20:42:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "beetbox";
|
|
|
|
repo = "beets";
|
2024-03-17 14:11:41 +00:00
|
|
|
rev = "b09806e0df8f01b9155017d3693764ae7beedcd5";
|
|
|
|
hash = "sha256-jE6nZLOEFufqclT6p1zK7dW+vt69q2ulaRsUldL7cSQ=";
|
2022-05-07 20:42:01 +00:00
|
|
|
};
|
2023-07-05 16:58:49 +00:00
|
|
|
extraPatches = [
|
2023-07-08 21:03:03 +00:00
|
|
|
# Bash completion fix for Nix
|
|
|
|
./patches/unstable-bash-completion-always-print.patch
|
2023-07-05 16:58:49 +00:00
|
|
|
];
|
2022-05-07 20:42:01 +00:00
|
|
|
pluginOverrides = {
|
2023-10-26 20:51:27 +00:00
|
|
|
# unstable has new plugins, so we register them here.
|
2022-05-31 23:00:02 +00:00
|
|
|
limit = { builtin = true; };
|
2023-10-26 20:51:27 +00:00
|
|
|
substitute = { builtin = true; };
|
|
|
|
advancedrewrite = { builtin = true; };
|
|
|
|
autobpm = { builtin = true; };
|
2022-05-07 20:42:01 +00:00
|
|
|
};
|
2023-10-26 20:51:27 +00:00
|
|
|
extraNativeBuildInputs = [
|
|
|
|
python3Packages.pydata-sphinx-theme
|
|
|
|
];
|
2019-12-07 06:08:54 +00:00
|
|
|
};
|
|
|
|
|
2022-05-08 23:23:45 +00:00
|
|
|
alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; };
|
|
|
|
copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; };
|
|
|
|
extrafiles = callPackage ./plugins/extrafiles.nix { beets = self.beets-minimal; };
|
2022-05-07 20:42:01 +00:00
|
|
|
})
|