uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,95 @@
{ stdenv
, aacgain
, essentia-extractor
, ffmpeg
, flac
, imagemagick
, keyfinder-cli
, lib
, mp3gain
, mp3val
, python3Packages
, ...
}: {
absubmit = {
enable = lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms;
wrapperBins = [ essentia-extractor ];
};
acousticbrainz.propagatedBuildInputs = [ python3Packages.requests ];
albumtypes = { };
aura.propagatedBuildInputs = with python3Packages; [ flask pillow ];
badfiles.wrapperBins = [ mp3val flac ];
bareasc = { };
beatport.propagatedBuildInputs = [ python3Packages.requests-oauthlib ];
bench = { };
bpd = { };
bpm = { };
bpsync = { };
bucket = { };
chroma.propagatedBuildInputs = [ python3Packages.pyacoustid ];
convert.wrapperBins = [ ffmpeg ];
deezer.propagatedBuildInputs = [ python3Packages.requests ];
discogs.propagatedBuildInputs = with python3Packages; [ discogs-client requests ];
duplicates = { };
edit = { };
embedart = {
propagatedBuildInputs = with python3Packages; [ pillow ];
wrapperBins = [ imagemagick ];
};
embyupdate.propagatedBuildInputs = [ python3Packages.requests ];
export = { };
fetchart = {
propagatedBuildInputs = with python3Packages; [ requests pillow ];
wrapperBins = [ imagemagick ];
};
filefilter = { };
fish = { };
freedesktop = { };
fromfilename = { };
ftintitle = { };
fuzzy = { };
gmusic = { };
hook = { };
ihate = { };
importadded = { };
importfeeds = { };
info = { };
inline = { };
ipfs = { };
keyfinder.wrapperBins = [ keyfinder-cli ];
kodiupdate.propagatedBuildInputs = [ python3Packages.requests ];
lastgenre.propagatedBuildInputs = [ python3Packages.pylast ];
lastimport.propagatedBuildInputs = [ python3Packages.pylast ];
loadext.propagatedBuildInputs = [ python3Packages.requests ];
lyrics.propagatedBuildInputs = [ python3Packages.beautifulsoup4 ];
mbcollection = { };
mbsubmit = { };
mbsync = { };
metasync = { };
missing = { };
mpdstats.propagatedBuildInputs = [ python3Packages.mpd2 ];
mpdupdate.propagatedBuildInputs = [ python3Packages.mpd2 ];
parentwork = { };
permissions = { };
play = { };
playlist.propagatedBuildInputs = [ python3Packages.requests ];
plexupdate = { };
random = { };
replaygain.wrapperBins = [ aacgain ffmpeg mp3gain ];
rewrite = { };
scrub = { };
smartplaylist = { };
sonosupdate.propagatedBuildInputs = [ python3Packages.soco ];
spotify = { };
subsonicplaylist.propagatedBuildInputs = [ python3Packages.requests ];
subsonicupdate.propagatedBuildInputs = [ python3Packages.requests ];
the = { };
thumbnails = {
propagatedBuildInputs = with python3Packages; [ pillow pyxdg ];
wrapperBins = [ imagemagick ];
};
types.testPaths = [ "test/test_types_plugin.py" ];
unimported = { };
web.propagatedBuildInputs = [ python3Packages.flask ];
zero = { };
}

View file

@ -0,0 +1,147 @@
{ stdenv
, bashInteractive
, diffPlugins
, glibcLocales
, gobject-introspection
, gst_all_1
, lib
, python3Packages
, runtimeShell
, writeScript
# plugin deps
, aacgain
, essentia-extractor
, ffmpeg
, flac
, imagemagick
, keyfinder-cli
, mp3gain
, mp3val
, src
, version
, pluginOverrides ? { }
, disableAllPlugins ? false
}@inputs:
let
inherit (lib) attrNames attrValues concatMap;
mkPlugin = { enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ ], wrapperBins ? [ ] }: {
inherit enable builtin propagatedBuildInputs testPaths wrapperBins;
};
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
allPlugins = lib.mapAttrs (_: mkPlugin) (lib.recursiveUpdate basePlugins pluginOverrides);
builtinPlugins = lib.filterAttrs (_: p: p.builtin) allPlugins;
enabledPlugins = lib.filterAttrs (_: p: p.enable) allPlugins;
disabledPlugins = lib.filterAttrs (_: p: !p.enable) allPlugins;
pluginWrapperBins = concatMap (p: p.wrapperBins) (attrValues enabledPlugins);
in
python3Packages.buildPythonApplication rec {
pname = "beets";
inherit src version;
patches = [
# Bash completion fix for Nix
./patches/bash-completion-always-print.patch
];
propagatedBuildInputs = with python3Packages; [
confuse
gobject-introspection
gst-python
jellyfish
mediafile
munkres
musicbrainzngs
mutagen
pygobject3
pyyaml
reflink
unidecode
] ++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins));
buildInputs = [
] ++ (with gst_all_1; [
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
]);
postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp extra/_beet $out/share/zsh/site-functions/
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
tmphome="$(mktemp -d)"
EDITOR="${writeScript "beetconfig.sh" ''
#!${runtimeShell}
cat > "$1" <<CFG
plugins: ${lib.concatStringsSep " " (attrNames enabledPlugins)}
CFG
''}" HOME="$tmphome" "$out/bin/beet" config -e
EDITOR=true HOME="$tmphome" "$out/bin/beet" config -e
runHook postInstallCheck
'';
makeWrapperArgs = [
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
"--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
"--prefix PATH : ${lib.makeBinPath pluginWrapperBins}"
];
checkInputs = with python3Packages; [
pytest
mock
rarfile
responses
] ++ pluginWrapperBins;
disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (n: v: v.testPaths ++ [ "test/test_${n}.py" ]) disabledPlugins));
checkPhase = ''
runHook preCheck
# Check for undefined plugins
find beetsplug -mindepth 1 \
\! -path 'beetsplug/__init__.py' -a \
\( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
| sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
| sort -u > plugins_available
${diffPlugins (attrNames builtinPlugins) "plugins_available"}
export BEETS_TEST_SHELL="${bashInteractive}/bin/bash --norc"
export HOME="$(mktemp -d)"
args=" -m pytest -r fEs"
eval "disabledTestPaths=($disabledTestPaths)"
for path in ''${disabledTestPaths[@]}; do
if [ -e "$path" ]; then
args+=" --ignore $path"
else
echo "Skipping non-existent test path '$path'"
fi
done
python $args
runHook postCheck
'';
meta = with lib; {
description = "Music tagger and library organizer";
homepage = "https://beets.io";
license = licenses.mit;
maintainers = with maintainers; [ aszlig doronbehar lovesegfault pjones ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,50 @@
{ lib
, callPackage
, fetchFromGitHub
}:
/*
** 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 ]; };
** }; }
*/
lib.makeExtensible (self: {
beets = self.beets-stable;
beets-stable = callPackage ./common.nix rec {
version = "1.6.0";
src = fetchFromGitHub {
owner = "beetbox";
repo = "beets";
rev = "v${version}";
hash = "sha256-fT+rCJJQR7bdfAcmeFRaknmh4ZOP4RCx8MXpq7/D8tM=";
};
};
beets-minimal = self.beets.override { disableAllPlugins = true; };
beets-unstable = callPackage ./common.nix {
version = "unstable-2022-05-08";
src = fetchFromGitHub {
owner = "beetbox";
repo = "beets";
rev = "e06cf7969bfdfa4773049699320471be45d56054";
hash = "sha256-yWwxYSzSSmx2UfCn0EBH23hQGZKSRn/c8ryvxLUeHdM=";
};
pluginOverrides = {
# unstable has a new plugin, so we register it here.
limit = { builtin = true; };
};
};
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; };
})

View file

@ -0,0 +1,44 @@
diff --git i/beets/ui/commands.py w/beets/ui/commands.py
index 3a337401..d08a6763 100755
--- i/beets/ui/commands.py
+++ w/beets/ui/commands.py
@@ -1759,21 +1759,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(map(os.path.isfile, BASH_COMPLETION_PATHS)):
- log.warning('Warning: Unable to find the bash-completion package. '
- 'Command line completion might not work.')
-
-
-BASH_COMPLETION_PATHS = map(syspath, [
- '/etc/bash_completion',
- '/usr/share/bash-completion/bash_completion',
- '/usr/local/share/bash-completion/bash_completion',
- # SmartOS
- '/opt/local/share/bash-completion/bash_completion',
- # Homebrew (before bash-completion2)
- '/usr/local/etc/bash_completion',
-])
-
def completion_script(commands):
"""Yield the full completion shell script as strings.
diff --git i/test/test_ui.py w/test/test_ui.py
index 9804b0a1..c3b53243 100644
--- i/test/test_ui.py
+++ w/test/test_ui.py
@@ -1229,12 +1229,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(util.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)

View file

@ -0,0 +1,32 @@
{ lib, fetchFromGitHub, beets, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "beets-alternatives";
version = "unstable-2021-02-01";
src = fetchFromGitHub {
repo = "beets-alternatives";
owner = "geigerzaehler";
rev = "288299e3aa9a1602717b04c28696fce5ce4259bf";
sha256 = "sha256-Xl7AHr33hXQqQDuFbWuj8HrIugeipJFPmvNXpCkU/mI=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "addopts = --cov --cov-report=term --cov-report=html" ""
'';
nativeBuildInputs = [ beets ];
checkInputs = with python3Packages; [
pytestCheckHook
mock
];
meta = with lib; {
description = "Beets plugin to manage external files";
homepage = "https://github.com/geigerzaehler/beets-alternatives";
maintainers = with maintainers; [ aszlig lovesegfault ];
license = licenses.mit;
};
}

View file

@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, beets, python3Packages }:
python3Packages.buildPythonApplication {
pname = "beets-copyartifacts";
version = "unstable-2020-02-15";
src = fetchFromGitHub {
repo = "beets-copyartifacts";
owner = "adammillerio";
rev = "85eefaebf893cb673fa98bfde48406ec99fd1e4b";
sha256 = "sha256-bkT2BZZ2gdcacgvyrVe2vMrOMV8iMAm8Q5xyrZzyqU0=";
};
postPatch = ''
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
sed -i -e '/namespace_packages/d' setup.py
printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py
'';
pytestFlagsArray = [ "-r fEs" ];
checkInputs = with python3Packages; [
pytestCheckHook
beets
six
];
meta = {
description = "Beets plugin to move non-music files during the import process";
homepage = "https://github.com/sbarakat/beets-copyartifacts";
license = lib.licenses.mit;
inherit (beets.meta) platforms;
};
}

View file

@ -0,0 +1,37 @@
{ lib, fetchFromGitHub, beets, python3Packages }:
python3Packages.buildPythonApplication {
pname = "beets-extrafiles";
version = "unstable-2020-12-13";
src = fetchFromGitHub {
repo = "beets-extrafiles";
owner = "Holzhaus";
rev = "a1d6ef9a9682b6bf7af9483541e56a3ff12247b8";
sha256 = "sha256-ajuEbieWjTCNjdRZuGUwvStZwjx260jmY0m+ZqNd7ec=";
};
postPatch = ''
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
sed -i -e '/namespace_packages/d' setup.py
sed -i -e 's/mediafile~=0.6.0/mediafile>=0.6.0/' setup.py
'';
propagatedBuildInputs = with python3Packages; [ mediafile ];
checkInputs = [
python3Packages.pytestCheckHook
beets
];
preCheck = ''
HOME="$(mktemp -d)"
'';
meta = {
homepage = "https://github.com/Holzhaus/beets-extrafiles";
description = "A plugin for beets that copies additional files and directories during the import process";
license = lib.licenses.mit;
inherit (beets.meta) platforms;
};
}