mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
beets-unstable: unstable-2022-08-27 -> unstable-2023-07-05
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
7631229b5e
commit
d0a98a0fc2
@ -50,15 +50,7 @@ python3Packages.buildPythonApplication {
|
||||
pname = "beets";
|
||||
inherit src version;
|
||||
|
||||
patches = [
|
||||
# Bash completion fix for Nix
|
||||
./patches/bash-completion-always-print.patch
|
||||
(fetchpatch {
|
||||
# Fix unidecode>=1.3.5 compat
|
||||
url = "https://github.com/beetbox/beets/commit/5ae1e0f3c8d3a450cb39f7933aa49bb78c2bc0d9.patch";
|
||||
hash = "sha256-gqkrE+U1j3tt1qPRJufTGS/GftaSw/gweXunO/mCVG8=";
|
||||
})
|
||||
] ++ extraPatches;
|
||||
patches = extraPatches;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
confuse
|
||||
@ -72,6 +64,7 @@ python3Packages.buildPythonApplication {
|
||||
pyyaml
|
||||
reflink
|
||||
unidecode
|
||||
typing-extensions
|
||||
] ++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins));
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -28,31 +28,35 @@ lib.makeExtensible (self: {
|
||||
hash = "sha256-fT+rCJJQR7bdfAcmeFRaknmh4ZOP4RCx8MXpq7/D8tM=";
|
||||
};
|
||||
extraPatches = [
|
||||
# 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=";
|
||||
})
|
||||
|
||||
# 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
|
||||
./patches/stable-fix-embedart-imagick-7.1.1-12.patch
|
||||
./patches/fix-embedart-imagick-7.1.1-12.patch
|
||||
];
|
||||
};
|
||||
|
||||
beets-minimal = self.beets.override { disableAllPlugins = true; };
|
||||
|
||||
beets-unstable = callPackage ./common.nix {
|
||||
version = "unstable-2022-08-27";
|
||||
version = "unstable-2023-07-05";
|
||||
src = fetchFromGitHub {
|
||||
owner = "beetbox";
|
||||
repo = "beets";
|
||||
rev = "50bd693057de472470ab5175fae0cdb5b75811c6";
|
||||
hash = "sha256-91v1StaByG60ryhQqByBXu6sFCjk0qT0nsUPnocSEE4=";
|
||||
rev = "9481402b3c20739ca0b879d19adbfca22ccd6a44";
|
||||
hash = "sha256-AKmozMNVchysoQcUWd90Ic6bQBKQgylVn0E3i85dGb8=";
|
||||
};
|
||||
extraPatches = [
|
||||
(fetchpatch {
|
||||
# Fix embedart with ImageMagick 7.1.1-12
|
||||
# https://github.com/beetbox/beets/pull/4839
|
||||
name = "fix-embedart-imagick-7.1.1-12.patch";
|
||||
url = "https://github.com/beetbox/beets/commit/a873a191b9d25236774cec82df2ceb6399ed4ce3.patch";
|
||||
hash = "sha256-1b3igHx0jKQkyVUlwOx6Oo3O1f3w8oZDw4xpHFw0DO0=";
|
||||
})
|
||||
# Bash completion fix for Nix
|
||||
./patches/unstable-bash-completion-always-print.patch
|
||||
];
|
||||
pluginOverrides = {
|
||||
# unstable has a new plugin, so we register it here.
|
||||
|
@ -0,0 +1,43 @@
|
||||
diff --git a/beets/ui/commands.py b/beets/ui/commands.py
|
||||
index 1377ad0c..e178eeae 100755
|
||||
--- a/beets/ui/commands.py
|
||||
+++ b/beets/ui/commands.py
|
||||
@@ -1831,20 +1831,6 @@ default_commands.append(config_cmd)
|
||||
def print_completion(*args):
|
||||
for line in completion_script(default_commands + plugins.commands()):
|
||||
print_(line, end='')
|
||||
- if not any(os.path.isfile(syspath(p)) for p in BASH_COMPLETION_PATHS):
|
||||
- log.warning('Warning: Unable to find the bash-completion package. '
|
||||
- 'Command line completion might not work.')
|
||||
-
|
||||
-
|
||||
-BASH_COMPLETION_PATHS = [
|
||||
- b'/etc/bash_completion',
|
||||
- b'/usr/share/bash-completion/bash_completion',
|
||||
- b'/usr/local/share/bash-completion/bash_completion',
|
||||
- # SmartOS
|
||||
- b'/opt/local/share/bash-completion/bash_completion',
|
||||
- # Homebrew (before bash-completion2)
|
||||
- b'/usr/local/etc/bash_completion',
|
||||
-]
|
||||
|
||||
|
||||
def completion_script(commands):
|
||||
diff --git a/test/test_ui.py b/test/test_ui.py
|
||||
index f66917dc..f3d934c6 100644
|
||||
--- a/test/test_ui.py
|
||||
+++ b/test/test_ui.py
|
||||
@@ -1310,12 +1310,7 @@ class CompletionTest(_common.TestCase, TestHelper):
|
||||
stdout=subprocess.PIPE, env=env)
|
||||
|
||||
# Load bash_completion library.
|
||||
- for path in commands.BASH_COMPLETION_PATHS:
|
||||
- if os.path.exists(syspath(path)):
|
||||
- bash_completion = path
|
||||
- break
|
||||
- else:
|
||||
- self.skipTest('bash-completion script not found')
|
||||
+ self.skipTest('bash-completion script not found')
|
||||
try:
|
||||
with open(util.syspath(bash_completion), 'rb') as f:
|
||||
tester.stdin.writelines(f)
|
Loading…
Reference in New Issue
Block a user