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
28
pkgs/build-support/setup-hooks/make-symlinks-relative.sh
Normal file
28
pkgs/build-support/setup-hooks/make-symlinks-relative.sh
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
fixupOutputHooks+=(_makeSymlinksRelative)
|
||||
|
||||
# For every symlink in $output that refers to another file in $output
|
||||
# ensure that the symlink is relative. This removes references to the output
|
||||
# has from the resulting store paths and thus the NAR files.
|
||||
_makeSymlinksRelative() {
|
||||
local symlinkTarget
|
||||
|
||||
if [ -n "${dontRewriteSymlinks-}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
while IFS= read -r -d $'\0' f; do
|
||||
symlinkTarget=$(readlink "$f")
|
||||
if [[ "$symlinkTarget"/ != "$prefix"/* ]]; then
|
||||
# skip this symlink as it doesn't point to $prefix
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ ! -e "$symlinkTarget" ]; then
|
||||
echo "the symlink $f is broken, it points to $symlinkTarget (which is missing)"
|
||||
fi
|
||||
|
||||
echo "rewriting symlink $f to be relative to $prefix"
|
||||
ln -snrf "$symlinkTarget" "$f"
|
||||
|
||||
done < <(find $prefix -type l -print0)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue