1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

Merge pull request #17957 from shlevy/staging-revert-fix

Revert "Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs""
This commit is contained in:
Gabriel Ebner 2016-08-24 13:51:32 +02:00 committed by GitHub
commit e5dd89f24b
13 changed files with 169 additions and 169 deletions

View file

@ -1,34 +1,24 @@
{ fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }: { fetchurl, stdenv, lib, precision ? "double" }:
with lib; with lib;
assert elem precision [ "single" "double" "long-double" "quad-precision" ]; assert elem precision [ "single" "double" "long-double" "quad-precision" ];
let version = "3.3.5-rc1"; in let version = "3.3.5"; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "fftw-${precision}-${version}"; name = "fftw-${precision}-${version}";
src = fetchFromGitHub { src = fetchurl {
owner = "FFTW"; url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz";
repo = "fftw3"; sha256 = "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf";
rev = "fftw-${version}";
sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4";
}; };
nativeBuildInputs = [ ocaml perl indent transfig ghostscript texinfo libtool gettext automake autoconf ];
# remove the ./configure lines, so we can use nix's configureFlags
patchPhase = "sed -e '27,29d' -i bootstrap.sh";
preConfigurePhases = "./bootstrap.sh";
outputs = [ "dev" "out" "doc" ]; # it's dev-doc only outputs = [ "dev" "out" "doc" ]; # it's dev-doc only
outputBin = "dev"; # fftw-wisdom outputBin = "dev"; # fftw-wisdom
configureFlags = configureFlags =
[ "--enable-maintainer-mode" [ "--enable-shared" "--disable-static"
"--enable-shared" "--disable-static"
"--enable-threads" "--enable-threads"
] ]
++ optional (precision != "double") "--enable-${precision}" ++ optional (precision != "double") "--enable-${precision}"

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }: { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libdrm-2.4.68"; name = "libdrm-2.4.70";
src = fetchurl { src = fetchurl {
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
sha256 = "5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df"; sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b";
}; };
outputs = [ "dev" "out" ]; outputs = [ "dev" "out" ];

View file

@ -1,13 +1,12 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook, substituteAll { stdenv, fetchurl, fetchpatch
, file, expat, libdrm, xorg, wayland, libudev, llvmPackages, libffi, libomxil-bellagio , pkgconfig, intltool, autoreconfHook, substituteAll
, libvdpau, libelf, libva , file, expat, libdrm, xorg, wayland, libudev
, grsecEnabled , llvmPackages, libffi, libomxil-bellagio, libva
, libelf, libvdpau, python
, grsecEnabled ? false
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
}: }:
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
else
/** Packaging design: /** Packaging design:
- The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now). - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now).
@ -20,11 +19,15 @@ else
- libOSMesa is in $osmesa (~4 MB) - libOSMesa is in $osmesa (~4 MB)
*/ */
with { inherit (stdenv.lib) optional optionalString; }; with stdenv.lib;
if ! lists.elem stdenv.system platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
else
let let
version = "11.2.2"; version = "12.0.1";
# this is the default search path for DRI drivers branch = head (splitString "." version);
driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
in in
@ -34,20 +37,20 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
urls = [ urls = [
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
(with stdenv.lib; ''ftp://ftp.freedesktop.org/pub/mesa/older-versions/'' "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
+ head (splitString "." version) + ''.x/${version}/mesa-${version}.tar.xz'')
"https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
]; ];
sha256 = "40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4"; sha256 = "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms";
}; };
prePatch = "patchShebangs ."; prePatch = "patchShebangs .";
# TODO:
# revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved
# ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
patches = [ patches = [
./glx_ro_text_segm.patch # fix for grsecurity/PaX ./glx_ro_text_segm.patch # fix for grsecurity/PaX
./symlink-drivers.patch ./symlink-drivers.patch
# TODO: revive ./dricore-gallium.patch when it gets ported (from Ubuntu),
# as it saved ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
] ++ optional stdenv.isLinux ] ++ optional stdenv.isLinux
(substituteAll { (substituteAll {
src = ./dlopen-absolute-paths.diff; src = ./dlopen-absolute-paths.diff;
@ -61,61 +64,59 @@ stdenv.mkDerivation {
outputs = [ "dev" "out" "drivers" "osmesa" ]; outputs = [ "dev" "out" "drivers" "osmesa" ];
# TODO: Figure out how to enable opencl without having a runtime dependency on clang
configureFlags = [ configureFlags = [
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--with-dri-driverdir=$(drivers)/lib/dri" "--with-dri-driverdir=$(drivers)/lib/dri"
"--with-dri-searchpath=${driverLink}/lib/dri" "--with-dri-searchpath=${driverLink}/lib/dri"
"--with-egl-platforms=x11,wayland,drm"
(optionalString (stdenv.system != "armv7l-linux")
"--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast")
(optionalString (stdenv.system != "armv7l-linux")
"--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast")
(enableFeature enableTextureFloats "texture-float")
(enableFeature grsecEnabled "glx-rts")
(enableFeature stdenv.isLinux "dri3")
(enableFeature stdenv.isLinux "nine") # Direct3D in Wine
"--enable-dri"
"--enable-driglx-direct"
"--enable-gles1" "--enable-gles1"
"--enable-gles2" "--enable-gles2"
"--enable-dri"
] ++ optional stdenv.isLinux "--enable-dri3"
++ [
"--enable-glx" "--enable-glx"
"--enable-glx-tls"
"--enable-gallium-osmesa" # used by wine "--enable-gallium-osmesa" # used by wine
"--enable-gallium-llvm"
"--enable-egl" "--enable-egl"
"--enable-xa" # used in vmware driver "--enable-xa" # used in vmware driver
"--enable-gbm" "--enable-gbm"
] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine
++ [
"--enable-xvmc" "--enable-xvmc"
"--enable-vdpau" "--enable-vdpau"
#"--enable-omx"
#"--enable-va"
# TODO: Figure out how to enable opencl without having a runtime dependency on clang
"--disable-opencl"
(if "armv7l-linux" == stdenv.system
then null
else "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast")
"--enable-shared-glapi" "--enable-shared-glapi"
"--enable-sysfs" "--enable-sysfs"
"--enable-driglx-direct" # seems enabled anyway
"--enable-glx-tls"
(if "armv7l-linux" == stdenv.system
then "--with-dri-drivers="
else "--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast")
"--with-egl-platforms=x11,wayland,drm"
"--enable-gallium-llvm"
"--enable-llvm-shared-libs" "--enable-llvm-shared-libs"
] ++ optional enableTextureFloats "--enable-texture-float" "--enable-omx"
++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec "--enable-va"
"--disable-opencl"
];
nativeBuildInputs = [ pkgconfig file ]; nativeBuildInputs = [ pkgconfig file ];
propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ] propagatedBuildInputs = with xorg;
[ libXdamage libXxf86vm ]
++ optional stdenv.isLinux libdrm; ++ optional stdenv.isLinux libdrm;
buildInputs = with xorg; [ buildInputs = with xorg; [
autoreconfHook intltool expat llvmPackages.llvm autoreconfHook intltool expat llvmPackages.llvm
glproto dri2proto dri3proto presentproto glproto dri2proto dri3proto presentproto
libX11 libXext libxcb libXt libXfixes libxshmfence libX11 libXext libxcb libXt libXfixes libxshmfence
libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */ libffi wayland libvdpau libelf libXvMC
libomxil-bellagio libva libpthreadstubs
(python.withPackages (ps: [ ps.Mako ]))
] ++ optional stdenv.isLinux libudev; ] ++ optional stdenv.isLinux libudev;
enableParallelBuilding = true; enableParallelBuilding = true;
doCheck = false; doCheck = false;
@ -124,42 +125,42 @@ stdenv.mkDerivation {
"localstatedir=\${TMPDIR}" "localstatedir=\${TMPDIR}"
]; ];
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM; # TODO: probably not all .la files are completely fixed, but it shouldn't matter;
# also move libOSMesa to $osmesa, as it's relatively big postInstall = ''
# ToDo: probably not all .la files are completely fixed, but it shouldn't matter # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
postInstall = with stdenv.lib; '' mv -t "$drivers/lib/" \
mv -t "$drivers/lib/" \ $out/lib/libXvMC* \
$out/lib/libXvMC* \ $out/lib/d3d \
$out/lib/d3d \ $out/lib/vdpau \
$out/lib/vdpau \ $out/lib/bellagio \
$out/lib/libxatracker* $out/lib/libxatracker* \
mv $out/lib/dri/* $drivers/lib/dri
# move libOSMesa to $osmesa, as it's relatively big
mkdir -p {$osmesa,$drivers}/lib/ mkdir -p {$osmesa,$drivers}/lib/
mv -t $osmesa/lib/ \ mv -t $osmesa/lib/ $out/lib/libOSMesa*
$out/lib/libOSMesa*
'' + /* now fix references in .la files */ '' # now fix references in .la files
sed "/^libdir=/s,$out,$osmesa," -i \ sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la
$osmesa/lib/libOSMesa*.la
'' + /* set the default search path for DRI drivers; used e.g. by X server */ '' # set the default search path for DRI drivers; used e.g. by X server
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
''; '';
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */
postFixup = # TODO:
# @vcunat isn't sure if drirc will be found when in $out/etc/;
# check $out doesn't depend on llvm: builder failures are ignored
# for some reason grep -qv '${llvmPackages.llvm}' -R "$out";
postFixup = ''
# add RPATH so the drivers can find the moved libgallium and libdricore9 # add RPATH so the drivers can find the moved libgallium and libdricore9
# moved here to avoid problems with stripping patchelfed files # moved here to avoid problems with stripping patchelfed files
''
for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
if [[ ! -L "$lib" ]]; then if [[ ! -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
fi fi
done done
''; '';
# ToDo + /* check $out doesn't depend on llvm */ ''
# builder failures are ignored for some reason
# grep -qv '${llvmPackages.llvm}' -R "$out"
passthru = { inherit libdrm version driverLink; }; passthru = { inherit libdrm version driverLink; };

View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
import setuptools import setuptools
import tokenize import tokenize

View file

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, ed, unifdef, Libc_old }: { stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }:
appleDerivation { appleDerivation {
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];
@ -13,6 +13,8 @@ appleDerivation {
export PRIVATE_HEADERS_FOLDER_PATH=include export PRIVATE_HEADERS_FOLDER_PATH=include
bash xcodescripts/headers.sh bash xcodescripts/headers.sh
cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include
# Ugh Apple stopped releasing this stuff so we need an older one... # Ugh Apple stopped releasing this stuff so we need an older one...
cp ${Libc_old}/include/spawn.h $out/include cp ${Libc_old}/include/spawn.h $out/include
cp ${Libc_old}/include/setjmp.h $out/include cp ${Libc_old}/include/setjmp.h $out/include

View file

@ -5,42 +5,7 @@
appleDerivation rec { appleDerivation rec {
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];
buildInputs = [ cpio libpthread ]; buildInputs = [ cpio ];
systemlibs = [ "cache"
"commonCrypto"
"compiler_rt"
"copyfile"
"corecrypto"
"dispatch"
"dyld"
"keymgr"
"kxld"
"launch"
"macho"
"quarantine"
"removefile"
"system_asl"
"system_blocks"
# "system_c" # special re-export here to hide newer functions
"system_configuration"
"system_dnssd"
"system_info"
# "system_kernel" # special re-export here to hide newer functions
"system_m"
"system_malloc"
"system_network"
"system_notify"
"system_platform"
"system_pthread"
"system_sandbox"
# does not exist in El Capitan beta
# FIXME: does anything on yosemite actually need this?
# "system_stats"
"unc"
"unwind"
"xpc"
];
installPhase = '' installPhase = ''
export NIX_ENFORCE_PURITY= export NIX_ENFORCE_PURITY=
@ -54,7 +19,7 @@ appleDerivation rec {
for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \ for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \
${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do ${Libnotify} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do
(cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
done done
@ -91,33 +56,9 @@ appleDerivation rec {
# The startup object files # The startup object files
cp ${Csu}/lib/* $out/lib cp ${Csu}/lib/* $out/lib
# selectively re-export functions from libsystem_c and libsystem_kernel # OMG impurity
# to provide a consistent interface across OSX verions ln -s /usr/lib/libSystem.B.dylib $out/lib/libSystem.B.dylib
mkdir -p $out/lib/system ln -s /usr/lib/libSystem.dylib $out/lib/libSystem.dylib
ld -macosx_version_min 10.7 -arch x86_64 -dylib \
-o $out/lib/system/libsystem_c.dylib \
/usr/lib/libSystem.dylib \
-reexported_symbols_list ${./system_c_symbols}
ld -macosx_version_min 10.7 -arch x86_64 -dylib \
-o $out/lib/system/libsystem_kernel.dylib \
/usr/lib/libSystem.dylib \
-reexported_symbols_list ${./system_kernel_symbols}
# Set up the actual library link
clang -c -o CompatibilityHacks.o -Os CompatibilityHacks.c
clang -c -o init.o -Os init.c
ld -macosx_version_min 10.7 \
-arch x86_64 \
-dylib \
-o $out/lib/libSystem.dylib \
CompatibilityHacks.o init.o \
-compatibility_version 1.0 \
-current_version 1197.1.1 \
-reexport_library $out/lib/system/libsystem_c.dylib \
-reexport_library $out/lib/system/libsystem_kernel.dylib \
${stdenv.lib.concatStringsSep " "
(map (l: "-reexport_library /usr/lib/system/lib${l}.dylib") systemlibs)}
# Set up links to pretend we work like a conventional unix (Apple's design, not mine!) # Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do

View file

@ -3,7 +3,7 @@
appleDerivation { appleDerivation {
meta.broken = stdenv.cc.nativeLibc; meta.broken = stdenv.cc.nativeLibc;
buildInputs = [ launchd bootstrap_cmds xnu ppp IOKit eap8021x ]; buildInputs = [ launchd bootstrap_cmds ppp IOKit eap8021x ];
propagatedBuildInputs = [ Security ]; propagatedBuildInputs = [ Security ];
@ -12,6 +12,11 @@ appleDerivation {
''; '';
patchPhase = '' patchPhase = ''
HACK=$PWD/hack
mkdir $HACK
cp -r ${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/net $HACK
substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \ substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \
--replace '#include <xpc/xpc.h>' "" --replace '#include <xpc/xpc.h>' ""
@ -172,9 +177,9 @@ appleDerivation {
cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c LinkConfiguration.c -o LinkConfiguration.o cc -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c VLANConfiguration.c -o VLANConfiguration.o cc -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
@ -183,8 +188,8 @@ appleDerivation {
cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BondConfiguration.c -o BondConfiguration.o cc -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o
cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BridgeConfiguration.c -o BridgeConfiguration.o cc -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgs }: { stdenv, fetchurl, fetchzip, pkgs }:
let let
# This attrset can in theory be computed automatically, but for that to work nicely we need # This attrset can in theory be computed automatically, but for that to work nicely we need
@ -6,9 +6,13 @@ let
# a stdenv out of something like this. With some care we can probably get rid of this, but for # a stdenv out of something like this. With some care we can probably get rid of this, but for
# now it's staying here. # now it's staying here.
versions = { versions = {
"osx-10.11.2" = { "osx-10.11.6" = {
dtrace = "168"; dtrace = "168";
xnu = "3248.20.55"; xnu = "3248.60.10";
libpthread = "138.10.4";
};
"osx-10.11.5" = {
Libc = "1082.50.1"; # 10.11.6 still unreleased :/
}; };
"osx-10.10.5" = { "osx-10.10.5" = {
adv_cmds = "158"; adv_cmds = "158";
@ -185,13 +189,18 @@ let
CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {}; CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {};
Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {}; Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {};
dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {}; dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {};
dtracen = applePackage "dtrace" "osx-10.11.2" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; dtracen = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {};
dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {}; dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {};
eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {}; eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {};
IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; }; IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; };
launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {}; launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};
libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {}; libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {};
Libc = applePackage "Libc" "osx-10.9.5" "1jz5bx9l4q484vn28c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {}; Libc = applePackage "Libc" "osx-10.11.5" "1qv7r0dgz06jy9i5agbqzxgdibb0m8ylki6g5n5pary88lzrawfd" {
Libc_10-9 = fetchzip {
url = "http://www.opensource.apple.com/tarballs/Libc/Libc-997.90.3.tar.gz";
sha256 = "1xchgxkxg5288r2b9yfrqji2gsgdap92k4wx2dbjwslixws12pq7";
};
};
Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {}; Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {};
libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {}; libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {};
libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {}; libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {};
@ -199,7 +208,7 @@ let
Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {}; Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {};
Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {}; Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {};
Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {}; Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {};
libpthread = applePackage "libpthread" "osx-10.10.5" "1p2y6xvsfqyakivr6d48fgrd163b5m9r045cxyfwrf8w0r33nfn3" {}; libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {};
libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {}; libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {};
Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {}; Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {};
libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {}; libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {};
@ -209,7 +218,7 @@ let
ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {}; ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {};
removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {}; removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {};
Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
xnu = applePackage "xnu" "osx-10.9.5" "1ssw5fzvgix20bw6y13c39ib0zs7ykpig3irlwbaccpjpci5jl0s" {}; xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {};
# Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions
# here so we can work on them. # here so we can work on them.

View file

@ -6,8 +6,14 @@ appleDerivation {
propagatedBuildInputs = [ libdispatch xnu ]; propagatedBuildInputs = [ libdispatch xnu ];
installPhase = '' installPhase = ''
mkdir -p $out/include/pthread mkdir -p $out/include/pthread/
mkdir -p $out/include/sys/_types
cp pthread/*.h $out/include/pthread/ cp pthread/*.h $out/include/pthread/
cp private/*.h $out/include/pthread/
# This overwrites qos.h, and is probably not necessary, but I'll leave it here for now
# cp private/*.h $out/include/pthread/
cp -r sys $out/include
cp -r sys/_pthread/*.h $out/include/sys/_types/
''; '';
} }

View file

@ -30,11 +30,12 @@ appleDerivation {
substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \ substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \
--replace "/usr/include" "/include" \ --replace "/usr/include" "/include" \
--replace "/usr/local/include" "/include" \ --replace "/usr/local/include" "/include" \
--replace "MIG=" "# " \ --replace 'MIG=`' "# " \
--replace "MIGCC=" "# " \ --replace 'MIGCC=`' "# " \
--replace " -o 0" "" \ --replace " -o 0" "" \
--replace '$SRC/$mig' '-I$DSTROOT/include $SRC/$mig' \ --replace '$SRC/$mig' '-I$DSTROOT/include $SRC/$mig' \
--replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs' --replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs' \
--replace '$BUILT_PRODUCTS_DIR/mig_hdr' '$BUILT_PRODUCTS_DIR'
patchShebangs . patchShebangs .
''; '';
@ -46,9 +47,9 @@ appleDerivation {
cat > sdk/usr/local/libexec/availability.pl <<EOF cat > sdk/usr/local/libexec/availability.pl <<EOF
#!$SHELL #!$SHELL
if [ "\$1" == "--macosx" ]; then if [ "\$1" == "--macosx" ]; then
echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11
elif [ "\$1" == "--ios" ]; then elif [ "\$1" == "--ios" ]; then
echo 2.0 2.1 2.2 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 5.1 6.0 6.1 7.0 echo 2.0 2.1 2.2 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 5.1 6.0 6.1 7.0 8.0 9.0
fi fi
EOF EOF
chmod +x sdk/usr/local/libexec/availability.pl chmod +x sdk/usr/local/libexec/availability.pl
@ -56,7 +57,7 @@ appleDerivation {
export SDKROOT_RESOLVED=$PWD/sdk export SDKROOT_RESOLVED=$PWD/sdk
export HOST_SDKROOT_RESOLVED=$PWD/sdk export HOST_SDKROOT_RESOLVED=$PWD/sdk
export PLATFORM=MacOSX export PLATFORM=MacOSX
export SDKVERSION=10.7 export SDKVERSION=10.11
export CC=cc export CC=cc
export CXX=c++ export CXX=c++
@ -87,13 +88,13 @@ appleDerivation {
make installhdrs make installhdrs
mv $out/usr/include $out mv $out/usr/include $out
rmdir $out/usr
# TODO: figure out why I need to do this # TODO: figure out why I need to do this
cp libsyscall/wrappers/*.h $out/include cp libsyscall/wrappers/*.h $out/include
mkdir -p $out/include/os mkdir -p $out/include/os
cp libsyscall/os/tsd.h $out/include/os/tsd.h cp libsyscall/os/tsd.h $out/include/os/tsd.h
cp EXTERNAL_HEADERS/AssertMacros.h $out/include cp EXTERNAL_HEADERS/AssertMacros.h $out/include
cp EXTERNAL_HEADERS/Availability*.h $out/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/
# Build the mach headers we crave # Build the mach headers we crave
export MIGCC=cc export MIGCC=cc
@ -101,11 +102,21 @@ appleDerivation {
export SRCROOT=$PWD/libsyscall export SRCROOT=$PWD/libsyscall
export DERIVED_SOURCES_DIR=$out/include export DERIVED_SOURCES_DIR=$out/include
export SDKROOT=$out export SDKROOT=$out
export OBJROOT=$PWD
export BUILT_PRODUCTS_DIR=$out
libsyscall/xcodescripts/mach_install_mig.sh libsyscall/xcodescripts/mach_install_mig.sh
# Get rid of the System prefix # Get rid of the System prefix
mv $out/System/* $out/ mv $out/System/* $out/
# TODO: do I need this?
mv $out/internal_hdr/include/mach/*.h $out/include/mach
# Get rid of some junk lying around
rm -rf $out/internal_hdr
rm -rf $out/usr
rm -rf $out/local
# Add some symlinks # Add some symlinks
ln -s $out/Library/Frameworks/System.framework/Versions/B \ ln -s $out/Library/Frameworks/System.framework/Versions/B \
$out/Library/Frameworks/System.framework/Versions/Current $out/Library/Frameworks/System.framework/Versions/Current

View file

@ -0,0 +1,32 @@
{ stdenv, fetchFromGitHub, python, ninja, libxml2 }:
stdenv.mkDerivation {
name = "swift-corefoundation";
src = fetchFromGitHub {
owner = "apple";
repo = "swift-corelibs-foundation";
rev = "dce4233f583ec15190b240d6116396bf9641cd57";
sha256 = "0i2ldvy14x05k2vgl5z0g5l2i5llifdfbij5zwfdwb8jmmq215qr";
};
buildInputs = [ ninja python libxml2 ];
patchPhase = ''
substituteInPlace CoreFoundation/build.py \
--replace '-I''${SYSROOT}/usr/include/libxml2' '-I${libxml2.dev}/include/libxml2' \
'';
configurePhase = ":";
buildPhase = ''
cd CoreFoundation
../configure --sysroot unused
ninja
'';
installPhase = ''
mkdir -p $out/lib
cp ../Build/CoreFoundation/libCoreFoundation.a $out/lib
'';
}

View file

@ -29,7 +29,6 @@ in rec {
# C standard library stuff # C standard library stuff
cp -d ${darwin.Libsystem}/lib/*.o $out/lib/ cp -d ${darwin.Libsystem}/lib/*.o $out/lib/
cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/ cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/
cp -d ${darwin.Libsystem}/lib/system/*.dylib $out/lib/
# Resolv is actually a link to another package, so let's copy it properly # Resolv is actually a link to another package, so let's copy it properly
rm $out/lib/libresolv.9.dylib rm $out/lib/libresolv.9.dylib
@ -93,7 +92,7 @@ in rec {
cp -d ${xz.out}/lib/liblzma*.* $out/lib cp -d ${xz.out}/lib/liblzma*.* $out/lib
# Copy binutils. # Copy binutils.
for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do
cp ${darwin.cctools}/bin/$i $out/bin cp ${darwin.cctools}/bin/$i $out/bin
done done

View file

@ -10843,6 +10843,8 @@ in
opencflite = callPackage ../os-specific/darwin/opencflite {}; opencflite = callPackage ../os-specific/darwin/opencflite {};
swift-corefoundation = callPackage ../os-specific/darwin/swift-corefoundation {};
xcode = callPackage ../os-specific/darwin/xcode {}; xcode = callPackage ../os-specific/darwin/xcode {};
osx_sdk = callPackage ../os-specific/darwin/osx-sdk {}; osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};