mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
beets: Check plugin definitions against package.
The reason for doing this is in order to not forget about possible dependencies in new upstream releases, so if upstream is introducing a new plugin where we're lacking dependencies, the build will fail on our side and we can check whether we'll need those. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
f2364772b8
commit
740da53c72
|
@ -115,6 +115,23 @@ in buildPythonPackage rec {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
preCheck = ''
|
||||
(${concatMapStrings (s: "echo \"${s}\";") allPlugins}) \
|
||||
| sort -u > plugins_defined
|
||||
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
|
||||
|
||||
if ! mismatches="$(diff -y plugins_defined plugins_available)"; then
|
||||
echo "The the list of defined plugins (left side) doesn't match" \
|
||||
"the list of available plugins (right side):" >&2
|
||||
echo "$mismatches" >&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
|
|
Loading…
Reference in a new issue