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
|
|
@ -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" ];
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue