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,57 @@
{lib, stdenv, asdf, which, bash, lisp ? null}:
stdenv.mkDerivation {
name = "cl-wrapper-script";
buildPhase="";
installPhase=''
mkdir -p "$out"/bin
export head="$(which head)"
export ls="$(which ls)"
substituteAll ${./common-lisp.sh} "$out"/bin/common-lisp.sh
substituteAll "${./build-with-lisp.sh}" "$out/bin/build-with-lisp.sh"
substituteAll "${./cl-wrapper.sh}" "$out/bin/cl-wrapper.sh"
patchShebangs "$out/bin"
chmod a+x "$out"/bin/*
substituteAll "${./setup-hook.sh}" "setup-hook-parsed"
addEnvHooks(){ true; };
source setup-hook-parsed
setLisp "${lisp}"
echo "$NIX_LISP"
mkdir -p "$out/lib/common-lisp/"
cp -r "${asdf}/lib/common-lisp"/* "$out/lib/common-lisp/"
chmod u+rw -R "$out/lib/common-lisp/"
NIX_LISP_PRELAUNCH_HOOK='
NIX_LISP_FASL_TYPE=lisp
nix_lisp_run_single_form "(progn
(uiop/lisp-build:compile-file* \"'"$out"'/lib/common-lisp/asdf/build/asdf.lisp\")
(asdf:load-system :uiop :force :all)
(asdf:load-system :asdf :force :all)
(ignore-errors (asdf:load-system :uiop/version :force :all))
)"' \
"$out/bin/common-lisp.sh"
'';
buildInputs = [which];
inherit asdf lisp bash;
stdenv_shell = stdenv.shell;
setupHook = ./setup-hook.sh;
dontUnpack = true;
ASDF_OUTPUT_TRANSLATIONS="${builtins.storeDir}/:${builtins.storeDir}";
passthru = {
inherit lisp;
};
meta = {
description = "Script used to wrap Common Lisp implementations";
maintainers = [lib.maintainers.raskin];
};
}