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
43
pkgs/build-support/setup-hooks/copy-desktop-items.sh
Normal file
43
pkgs/build-support/setup-hooks/copy-desktop-items.sh
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
# Setup hook that installs specified desktop items.
|
||||
#
|
||||
# Example usage in a derivation:
|
||||
#
|
||||
# { …, makeDesktopItem, copyDesktopItems, … }:
|
||||
#
|
||||
# let desktopItem = makeDesktopItem { … }; in
|
||||
# stdenv.mkDerivation {
|
||||
# …
|
||||
# nativeBuildInputs = [ copyDesktopItems ];
|
||||
#
|
||||
# desktopItems = [ desktopItem ];
|
||||
# …
|
||||
# }
|
||||
#
|
||||
# This hook will copy files which are either given by full path
|
||||
# or all '*.desktop' files placed inside the 'share/applications'
|
||||
# folder of each `desktopItems` argument.
|
||||
|
||||
postInstallHooks+=(copyDesktopItems)
|
||||
|
||||
copyDesktopItems() {
|
||||
if [ "${dontCopyDesktopItems-}" = 1 ]; then return; fi
|
||||
|
||||
if [ -z "$desktopItems" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
applications="${!outputBin}/share/applications"
|
||||
for desktopItem in $desktopItems; do
|
||||
if [[ -f "$desktopItem" ]]; then
|
||||
echo "Copying '$desktopItem' into '${applications}'"
|
||||
install -D -m 444 -t "${applications}" "$desktopItem"
|
||||
else
|
||||
for f in "$desktopItem"/share/applications/*.desktop; do
|
||||
echo "Copying '$f' into '${applications}'"
|
||||
install -D -m 444 -t "${applications}" "$f"
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue