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,63 @@
{ stdenv
, lib
, gfortran
, flex
, bison
, jre8
, blas
, lapack
, curl
, readline
, expat
, pkg-config
, buildPackages
, targetPackages
, libffi
, binutils
, mkOpenModelicaDerivation
}:
let
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
nativeOMCompiler = buildPackages.openmodelica.omcompiler;
in
mkOpenModelicaDerivation ({
pname = "omcompiler";
omtarget = "omc";
omdir = "OMCompiler";
omdeps = [ ];
omautoconf = true;
nativeBuildInputs = [
jre8
gfortran
flex
bison
pkg-config
] ++ lib.optional isCross nativeOMCompiler;
buildInputs = [ targetPackages.stdenv.cc.cc blas lapack curl readline expat libffi binutils ];
postPatch = ''
sed -i -e '/^\s*AR=ar$/ s/ar/${stdenv.cc.targetPrefix}ar/
/^\s*ar / s/ar /${stdenv.cc.targetPrefix}ar /
/^\s*ranlib/ s/ranlib /${stdenv.cc.targetPrefix}ranlib /' \
$(find ./OMCompiler -name 'Makefile*')
'';
preFixup = ''
for entry in $(find $out -name libipopt.so); do
patchelf --shrink-rpath --allowed-rpath-prefixes /nix/store $entry
patchelf --set-rpath '$ORIGIN':"$(patchelf --print-rpath $entry)" $entry
done
'';
meta = with lib; {
description = "Modelica compiler from OpenModelica suite";
homepage = "https://openmodelica.org";
license = licenses.gpl3Only;
maintainers = with maintainers; [ balodja smironov ];
platforms = platforms.linux;
};
} // lib.optionalAttrs isCross {
configureFlags = [ "--with-omc=${nativeOMCompiler}/bin/omc" ];
})