Merge #8363: pure-darwin stdenv

This commit is contained in:
Vladimír Čunát
2015-06-18 22:23:55 +02:00
119 changed files with 11653 additions and 3864 deletions

View File

@@ -1,35 +0,0 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "ps-${version}";
version = "153";
src = fetchurl {
url = "http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-${version}.tar.gz";
sha256 = "174v6a4zkcm2pafzgdm6kvs48z5f911zl7k49hv7kjq6gm58w99v";
};
buildPhase = ''
cd ps
cc -Os -Wall -I. -c -o fmt.o fmt.c
cc -Os -Wall -I. -c -o keyword.o keyword.c
cc -Os -Wall -I. -c -o nlist.o nlist.c
cc -Os -Wall -I. -c -o print.o print.c
cc -Os -Wall -I. -c -o ps.o ps.c
cc -Os -Wall -I. -c -o tasks.o tasks.c
cc -o ps fmt.o keyword.o nlist.o print.o ps.o tasks.o
'';
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
cp ps $out/bin/ps
cp ps.1 $out/share/man/man1
'';
meta = {
platforms = stdenv.lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ gridaphobe ];
};
}

View File

@@ -2,10 +2,8 @@
appleDerivation {
# Will override the name until we provide all of adv_cmds
name = "ps-${version}";
buildPhase = ''
cd ps
pushd ps
cc -Os -Wall -I. -c -o fmt.o fmt.c
cc -Os -Wall -I. -c -o keyword.o keyword.c
cc -Os -Wall -I. -c -o nlist.o nlist.c
@@ -13,13 +11,20 @@ appleDerivation {
cc -Os -Wall -I. -c -o ps.o ps.c
cc -Os -Wall -I. -c -o tasks.o tasks.c
cc -o ps fmt.o keyword.o nlist.o print.o ps.o tasks.o
popd
pushd locale
c++ -o locale locale.cc
popd
'';
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
cp ps $out/bin/ps
cp ps.1 $out/share/man/man1
cp ps/ps $out/bin/ps
cp ps/ps.1 $out/share/man/man1
cp locale/locale $out/bin/locale
cp locale/locale.1 $out/share/man/man1
'';

View File

@@ -0,0 +1,39 @@
{ stdenv, binutils-raw, cctools }:
stdenv.mkDerivation {
name = "cctools-binutils-darwin";
buildCommand = ''
mkdir -p $out/bin $out/include
ln -s ${binutils-raw}/bin/c++filt $out/bin/c++filt
# We specifically need:
# - ld: binutils doesn't provide it on darwin
# - as: as above
# - ar: the binutils one prodices .a files that the cctools ld doesn't like
# - ranlib: for compatibility with ar
# - dsymutil: soon going away once it goes into LLVM (this one is fake anyway)
# - otool: we use it for some of our name mangling
# - install_name_tool: we use it to rewrite stuff in our bootstrap tools
# - strip: the binutils one seems to break mach-o files
# - lipo: gcc build assumes it exists
# - nm: the gnu one doesn't understand many new load commands
for i in ar ranlib as dsymutil install_name_tool ld strip otool lipo nm strings size; do
ln -sf "${cctools}/bin/$i" "$out/bin/$i"
done
for i in ${binutils-raw}/include/*.h; do
ln -s "$i" "$out/include/$(basename $i)"
done
for i in ${cctools}/include/*; do
ln -s "$i" "$out/include/$(basename $i)"
done
# FIXME: this will give us incorrect man pages for bits of cctools
ln -s ${binutils-raw}/share $out/share
ln -s ${binutils-raw}/lib $out/lib
ln -s ${cctools}/libexec $out/libexec
'';
}

View File

@@ -0,0 +1,34 @@
{ stdenv }:
# this tool only exists on darwin
assert stdenv.isDarwin;
stdenv.mkDerivation {
name = "derez";
src = "/usr/bin/DeRez";
unpackPhase = "true";
configurePhase = "true";
buildPhase = "true";
installPhase = ''
mkdir -p "$out/bin"
ln -s $src "$out/bin"
'';
meta = with stdenv.lib; {
description = "Decompiles resources";
homepage = "https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/DeRez.1.html";
maintainers = [ maintainers.lnl7 ];
platforms = platforms.darwin;
longDescription = ''
The DeRez tool decompiles the resource fork of resourceFile according to the type declarations
supplied by the type declaration files. The resource description produced by this decompilation
contains the resource definitions (resource and data statements) associated with these type
declarations. If for some reason it cannot reproduce the appropriate resource statements, DeRez
generates hexadecimal data statements instead.
'';
};
}

View File

@@ -0,0 +1,33 @@
{ stdenv }:
# this tool only exists on darwin
assert stdenv.isDarwin;
stdenv.mkDerivation {
name = "rez";
src = "/usr/bin/Rez";
unpackPhase = "true";
configurePhase = "true";
buildPhase = "true";
installPhase = ''
mkdir -p "$out/bin"
ln -s $src "$out/bin"
'';
meta = with stdenv.lib; {
description = "Compiles resources";
homepage = "https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/Rez.1.html";
maintainers = [ maintainers.lnl7 ];
platforms = platforms.darwin;
longDescription = ''
The Rez tool compiles the resource fork of a file according to the textual description contained in
the resource description files. These resource description files must contain both the type
declarations and the resource definitions needed to compile the resources. This data can come
directly from the resource description files.
'';
};
}

View File

@@ -11,7 +11,8 @@ stdenv.mkDerivation {
owner = "clbr";
};
buildInputs = [ pkgconfig gettext ncurses libdrm libpciaccess ];
buildInputs = [ ncurses libdrm libpciaccess ];
nativeBuildInputs = [ pkgconfig gettext ];
enableParallelBuilding = true;

View File

@@ -84,6 +84,26 @@ stdenv.mkDerivation rec {
url = "http://w1.fi/cgit/hostap/patch/?id=8a78e227df1ead19be8e12a4108e448887e64d6f";
sha256 = "1k2mcq1jv8xzi8061ixcz6j56n4i8wbq0vxcvml204q1syy2ika0";
})
(fetchpatch {
url = http://w1.fi/security/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch;
sha256 = "1cg4r638s4m9ar9lmzm534y657ppcm8bl1h363kjnng1zbzh8rfb";
})
(fetchpatch {
url = http://w1.fi/security/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch;
sha256 = "0ky850rg1k9lwd1p4wzyvl2dpi5g7k1mwx1ndjclp4x7bshb6w79";
})
(fetchpatch {
url = http://w1.fi/security/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch;
sha256 = "0hicw3vk1khk849xil75ckrg1xzbwcva7g01kp0lvab34dwhryy7";
})
(fetchpatch {
url = http://w1.fi/security/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch;
sha256 = "18d5r3zbwz96n4zzj9r27cv4kvc09zkj9x0p6qji68h8k2pcazxd";
})
(fetchpatch {
url = http://w1.fi/security/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch;
sha256 = "1ndzyfpnxpvryiqal4kdic02kg9dgznh65kaqydaqqfj3rbjdqip";
})
];
postInstall = ''