
Reverts commits bumping to macOS stuff to 10.12: commit ec1f78d1cb6ac86743ffb797bf88d4633b91e733. commit d0dc91d24f643ca2cb6901f80a641099db975966. commit a1d297374df55c30b8b74834a85924e9dc739dda. commit 425112151db3b05fec01e86cb10c90b4037e9367. commit e6f7f2928f668262577125290dc90ad8df12e724.
37 lines
985 B
Nix
37 lines
985 B
Nix
{ stdenv, appleDerivation, xcbuildHook
|
|
, Libc, xnu, libutil-new }:
|
|
|
|
appleDerivation {
|
|
nativeBuildInputs = [ xcbuildHook ];
|
|
buildInputs = [ libutil-new ];
|
|
|
|
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 i386
|
|
cp xnu-*/bsd/sys/disklabel.h sys
|
|
cp xnu-*/bsd/machine/disklabel.h machine
|
|
cp xnu-*/bsd/i386/disklabel.h i386
|
|
cp -r xnu-*/bsd/sys System
|
|
cp -r Libc-*/uuid System
|
|
'';
|
|
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 $file $out/bin/$(basename $f)
|
|
done
|
|
done
|
|
'';
|
|
|
|
meta = {
|
|
platforms = stdenv.lib.platforms.darwin;
|
|
maintainers = with stdenv.lib.maintainers; [ matthewbauer ];
|
|
};
|
|
}
|