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:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
29
pkgs/build-support/plugins.nix
Normal file
29
pkgs/build-support/plugins.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib }:
|
||||
# helper functions for packaging programs with plugin systems
|
||||
{
|
||||
|
||||
/* Takes a list of expected plugin names
|
||||
* and compares it to the found plugins given in the file,
|
||||
* one plugin per line.
|
||||
* If the lists differ, the build fails with a nice message.
|
||||
*
|
||||
* This is helpful to ensure maintainers don’t miss
|
||||
* the addition or removal of a plugin.
|
||||
*/
|
||||
diffPlugins = expectedPlugins: foundPluginsFilePath: ''
|
||||
# sort both lists first
|
||||
plugins_expected=$(mktemp)
|
||||
(${lib.concatMapStrings (s: "echo \"${s}\";") expectedPlugins}) \
|
||||
| sort -u > "$plugins_expected"
|
||||
plugins_found=$(mktemp)
|
||||
sort -u "${foundPluginsFilePath}" > "$plugins_found"
|
||||
|
||||
if ! mismatches="$(diff -y "$plugins_expected" "$plugins_found")"; then
|
||||
echo "The the list of expected plugins (left side) doesn't match" \
|
||||
"the list of plugins we found (right side):" >&2
|
||||
echo "$mismatches" >&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue