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,41 @@
|
|||
{ lib, appleDerivation, xcbuildHook, Libc, stdenv, macosPackages_11_0_1, xnu
|
||||
, fetchurl, libutil }:
|
||||
|
||||
let
|
||||
xnu-src = if stdenv.isAarch64 then macosPackages_11_0_1.xnu.src else xnu.src;
|
||||
arch = if stdenv.isAarch64 then "arm" else "i386";
|
||||
in appleDerivation {
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ libutil ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I.";
|
||||
NIX_LDFLAGS = "-lutil";
|
||||
patchPhase = ''
|
||||
# ugly hacks for missing headers
|
||||
# most are bsd related - probably should make this a drv
|
||||
unpackFile ${Libc.src}
|
||||
unpackFile ${xnu-src}
|
||||
mkdir System sys machine ${arch}
|
||||
cp xnu-*/bsd/sys/disklabel.h sys
|
||||
cp xnu-*/bsd/machine/disklabel.h machine
|
||||
cp xnu-*/bsd/${arch}/disklabel.h ${arch}
|
||||
cp -r xnu-*/bsd/sys System
|
||||
cp -r Libc-*/uuid System
|
||||
substituteInPlace diskdev_cmds.xcodeproj/project.pbxproj \
|
||||
--replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' ""
|
||||
'';
|
||||
installPhase = ''
|
||||
install -D Products/Release/libdisk.a $out/lib/libdisk.a
|
||||
rm Products/Release/libdisk.a
|
||||
for f in Products/Release/*; do
|
||||
if [ -f $f ]; then
|
||||
install -D $f $out/bin/$(basename $f)
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.darwin;
|
||||
maintainers = with lib.maintainers; [ matthewbauer ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue