git.iko.soy/typeable/nixpkgs
on master help sign in
Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs
commit57b2d1e9b0dcdd1d25bd2d450174764b9417ffc1 authorShea Levy <shea@shealevy.com> dateMon 15 Aug 2016, 19:01 (10 years ago) parent760b2b9b067b53
39 files changed+364−300
nixos/modules/config/zram.nix+1−1 nixos/modules/hardware/video/bumblebee.nix−1 nixos/modules/hardware/video/webcam/facetimehd.nix−1 nixos/modules/services/hardware/tlp.nix−4 nixos/modules/services/hardware/udev.nix+2−3 nixos/modules/services/network-filesystems/openafs-client/default.nix+1−1 nixos/modules/services/networking/fan.nix+1−1 nixos/modules/services/networking/strongswan.nix+1−1 nixos/modules/system/boot/kernel.nix−5 nixos/modules/system/boot/modprobe.nix+2−39 nixos/modules/system/boot/stage-2-init.sh−1 nixos/modules/tasks/cpu-freq.nix+1−1 nixos/modules/virtualisation/docker.nix+1−2 nixos/modules/virtualisation/qemu-vm.nix+13−13 pkgs/development/libraries/fftw/default.nix+6−16 pkgs/development/libraries/libdrm/default.nix+2−2 pkgs/development/libraries/mesa/default.nix+64−63 pkgs/development/python-modules/generic/run_setup.py+2 pkgs/development/tools/misc/lttng-tools/default.nix+1−1 pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix+3−1 pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix+5−64 pkgs/os-specific/darwin/apple-source-releases/configd/default.nix+10−5 pkgs/os-specific/darwin/apple-source-releases/default.nix+17−8 pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix+8−2 pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix+18−7 pkgs/os-specific/darwin/swift-corefoundation/default.nix+32 pkgs/os-specific/linux/kernel/manual-config.nix+2−2 pkgs/os-specific/linux/kmod/aggregator.nix+1−1 pkgs/os-specific/linux/kmod/default.nix+21−9 pkgs/os-specific/linux/kmod/module-dir.patch+124−27 pkgs/stdenv/darwin/make-bootstrap-tools.nix+1−2 pkgs/tools/networking/network-manager/0.9.8/default.nix+7−1 pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch+2−2 pkgs/tools/networking/network-manager/default.nix+2−2 pkgs/tools/networking/network-manager/openconnect.nix+3−3 pkgs/tools/networking/network-manager/openvpn.nix+3−3 pkgs/tools/networking/network-manager/vpnc.nix+3−3 pkgs/tools/text/diffutils/default.nix+2−2 pkgs/top-level/all-packages.nix+2
nixos/modules/config/zram.nix+1−1
@@ -8,7 +8,7 @@ let
88
99 devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1));
1010
11− modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
11+ modprobe = "${pkgs.kmod}/bin/modprobe";
1212
1313in
1414
nixos/modules/hardware/video/bumblebee.nix−1
@@ -75,7 +75,6 @@ in
7575 serviceConfig = {
7676 ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}";
7777 };
78− environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
7978 };
8079 };
8180}
nixos/modules/hardware/video/webcam/facetimehd.nix−1
@@ -36,7 +36,6 @@ in
3636
3737 # and load it back on resume
3838 powerManagement.resumeCommands = ''
39− export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
4039 ${pkgs.kmod}/bin/modprobe -v facetimehd
4140 '';
4241
nixos/modules/services/hardware/tlp.nix−4
@@ -72,8 +72,6 @@ in
7272 ExecStart = "${tlp}/bin/tlp init start";
7373 ExecStop = "${tlp}/bin/tlp init stop";
7474 };
75−
76− environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
7775 };
7876
7977 tlp-sleep = {
@@ -92,8 +90,6 @@ in
9290 ExecStart = "${tlp}/bin/tlp suspend";
9391 ExecStop = "${tlp}/bin/tlp resume";
9492 };
95−
96− environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
9793 };
9894 };
9995
nixos/modules/services/hardware/udev.nix+2−3
@@ -58,7 +58,7 @@ let
5858 # Fix some paths in the standard udev rules. Hacky.
5959 for i in $out/*.rules; do
6060 substituteInPlace $i \
61− --replace \"/sbin/modprobe \"${config.system.sbin.modprobe}/sbin/modprobe \
61+ --replace \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \
6262 --replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \
6363 --replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \
6464 --replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \
@@ -316,8 +316,7 @@ in
316316 '';
317317
318318 systemd.services.systemd-udevd =
319− { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
320− restartTriggers = cfg.packages;
319+ { restartTriggers = cfg.packages;
321320 };
322321
323322 };
nixos/modules/services/network-filesystems/openafs-client/default.nix+1−1
@@ -80,7 +80,7 @@ in
8080 preStart = ''
8181 mkdir -p -m 0755 /afs
8282 mkdir -m 0700 -p ${cfg.cacheDirectory}
83− ${pkgs.kmod}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
83+ ${pkgs.kmod}/bin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
8484 ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb
8585 ${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
8686 '';
nixos/modules/services/networking/fan.nix+1−1
@@ -5,7 +5,7 @@ with lib;
55let
66
77 cfg = config.networking.fan;
8− modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
8+ modprobe = "${pkgs.kmod}/bin/modprobe";
99
1010in
1111
nixos/modules/services/networking/strongswan.nix+1−1
@@ -118,7 +118,7 @@ in
118118 systemd.services.strongswan = {
119119 description = "strongSwan IPSec Service";
120120 wantedBy = [ "multi-user.target" ];
121− path = with pkgs; [ config.system.sbin.modprobe iproute iptables utillinux ]; # XXX Linux
121+ path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux
122122 wants = [ "keys.target" ];
123123 after = [ "network.target" "keys.target" ];
124124 environment = {
nixos/modules/system/boot/kernel.nix−5
@@ -228,7 +228,6 @@ in
228228 systemd.services."systemd-modules-load" =
229229 { wantedBy = [ "multi-user.target" ];
230230 restartTriggers = [ kernelModulesConf ];
231− environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
232231 serviceConfig =
233232 { # Ignore failed module loads. Typically some of the
234233 # modules in ‘boot.kernelModules’ are "nice to have but
@@ -238,10 +237,6 @@ in
238237 };
239238 };
240239
241− systemd.services.kmod-static-nodes =
242− { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
243− };
244−
245240 lib.kernelConfig = {
246241 isYes = option: {
247242 assertion = config: config.isYes option;
nixos/modules/system/boot/modprobe.nix+2−39
@@ -8,41 +8,6 @@ with lib;
88
99 options = {
1010
11− system.sbin.modprobe = mkOption {
12− internal = true;
13− default = pkgs.stdenv.mkDerivation {
14− name = "modprobe";
15− buildCommand = ''
16− mkdir -p $out/bin
17− for i in ${pkgs.kmod}/sbin/*; do
18− name=$(basename $i)
19− echo "$text" > $out/bin/$name
20− echo 'exec '$i' "$@"' >> $out/bin/$name
21− chmod +x $out/bin/$name
22− done
23− ln -s bin $out/sbin
24− '';
25− text =
26− ''
27− #! ${pkgs.stdenv.shell}
28− export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
29−
30− # Fall back to the kernel modules used at boot time if the
31− # modules in the current configuration don't match the
32− # running kernel.
33− if [ ! -d "$MODULE_DIR/$(${pkgs.coreutils}/bin/uname -r)" ]; then
34− MODULE_DIR=/run/booted-system/kernel-modules/lib/modules/
35− fi
36−
37− '';
38− meta.priority = 4;
39− };
40− description = ''
41− Wrapper around modprobe that sets the path to the modules
42− tree.
43− '';
44− };
45−
4611 boot.blacklistedKernelModules = mkOption {
4712 type = types.listOf types.str;
4813 default = [];
@@ -87,7 +52,7 @@ with lib;
8752 '';
8853 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
8954
90− environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ];
55+ environment.systemPackages = [ pkgs.kmod ];
9156
9257 system.activationScripts.modprobe =
9358 ''
@@ -95,11 +60,9 @@ with lib;
9560 # in the right location in the Nix store for kernel modules).
9661 # We need this when the kernel (or some module) auto-loads a
9762 # module.
98− echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe
63+ echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe
9964 '';
10065
101− environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
102−
10366 };
10467
10568}
nixos/modules/system/boot/stage-2-init.sh−1
@@ -207,6 +207,5 @@ exec {logOutFd}>&- {logErrFd}>&-
207207# Start systemd.
208208echo "starting systemd..."
209209PATH=/run/current-system/systemd/lib/systemd \
210− MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \
211210 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
212211 exec systemd
nixos/modules/tasks/cpu-freq.nix+1−1
@@ -38,7 +38,7 @@ in
3838 description = "CPU Frequency Governor Setup";
3939 after = [ "systemd-modules-load.service" ];
4040 wantedBy = [ "multi-user.target" ];
41− path = [ cpupower config.system.sbin.modprobe ];
41+ path = [ cpupower pkgs.kmod ];
4242 unitConfig.ConditionVirtualization = false;
4343 serviceConfig = {
4444 Type = "oneshot";
nixos/modules/virtualisation/docker.nix+1−2
@@ -95,8 +95,7 @@ in
9595 LimitNPROC = 1048576;
9696 } // proxy_env;
9797
98− path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
99− environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
98+ path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
10099
101100 postStart = if cfg.socketActivation then "" else cfg.postStart;
102101
nixos/modules/virtualisation/qemu-vm.nix+13−13
@@ -135,13 +135,13 @@ let
135135 }
136136 ''
137137 # Create a /boot EFI partition with 40M
138− ${pkgs.gptfdisk}/sbin/sgdisk -G /dev/vda
139− ${pkgs.gptfdisk}/sbin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
140− ${pkgs.gptfdisk}/sbin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
141− ${pkgs.gptfdisk}/sbin/sgdisk -A 1:set:1 /dev/vda
142− ${pkgs.gptfdisk}/sbin/sgdisk -A 2:set:2 /dev/vda
143− ${pkgs.gptfdisk}/sbin/sgdisk -h 2 /dev/vda
144− ${pkgs.gptfdisk}/sbin/sgdisk -C /dev/vda
138+ ${pkgs.gptfdisk}/bin/sgdisk -G /dev/vda
139+ ${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
140+ ${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
141+ ${pkgs.gptfdisk}/bin/sgdisk -A 1:set:1 /dev/vda
142+ ${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda
143+ ${pkgs.gptfdisk}/bin/sgdisk -h 2 /dev/vda
144+ ${pkgs.gptfdisk}/bin/sgdisk -C /dev/vda
145145 ${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2
146146 . /sys/class/block/vda2/uevent
147147 mknod /dev/vda2 b $MAJOR $MINOR
@@ -151,11 +151,11 @@ let
151151 ${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot
152152
153153 # Mount /boot; load necessary modules first.
154− ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true
155− ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true
156− ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true
157− ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true
158− ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
154+ ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true
155+ ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true
156+ ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true
157+ ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true
158+ ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true
159159 mkdir /boot
160160 mount /dev/vda2 /boot
161161
@@ -370,7 +370,7 @@ in
370370 boot.initrd.extraUtilsCommands =
371371 ''
372372 # We need mke2fs in the initrd.
373− copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs
373+ copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs
374374 '';
375375
376376 boot.initrd.postDeviceCommands =
pkgs/development/libraries/fftw/default.nix+6−16
@@ -1,34 +1,24 @@
1−{ fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }:
1+{ fetchurl, stdenv, lib, precision ? "double" }:
22
33with lib;
44
55assert elem precision [ "single" "double" "long-double" "quad-precision" ];
66
7−let version = "3.3.5-rc1"; in
7+let version = "3.3.5"; in
88
99stdenv.mkDerivation rec {
1010 name = "fftw-${precision}-${version}";
1111
12− src = fetchFromGitHub {
13− owner = "FFTW";
14− repo = "fftw3";
15− rev = "fftw-${version}";
16− sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4";
12+ src = fetchurl {
13+ url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz";
14+ sha256 = "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf";
1715 };
1816
19− nativeBuildInputs = [ ocaml perl indent transfig ghostscript texinfo libtool gettext automake autoconf ];
20−
21− # remove the ./configure lines, so we can use nix's configureFlags
22− patchPhase = "sed -e '27,29d' -i bootstrap.sh";
23−
24− preConfigurePhases = "./bootstrap.sh";
25−
2617 outputs = [ "dev" "out" "doc" ]; # it's dev-doc only
2718 outputBin = "dev"; # fftw-wisdom
2819
2920 configureFlags =
30− [ "--enable-maintainer-mode"
31− "--enable-shared" "--disable-static"
21+ [ "--enable-shared" "--disable-static"
3222 "--enable-threads"
3323 ]
3424 ++ optional (precision != "double") "--enable-${precision}"
pkgs/development/libraries/libdrm/default.nix+2−2
@@ -1,11 +1,11 @@
11{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }:
22
33stdenv.mkDerivation rec {
4− name = "libdrm-2.4.68";
4+ name = "libdrm-2.4.70";
55
66 src = fetchurl {
77 url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
8− sha256 = "5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df";
8+ sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b";
99 };
1010
1111 outputs = [ "dev" "out" ];
pkgs/development/libraries/mesa/default.nix+64−63
@@ -1,13 +1,12 @@
1−{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook, substituteAll
2−, file, expat, libdrm, xorg, wayland, libudev, llvmPackages, libffi, libomxil-bellagio
3−, libvdpau, libelf, libva
4−, grsecEnabled
1+{ stdenv, fetchurl, fetchpatch
2+, pkgconfig, intltool, autoreconfHook, substituteAll
3+, file, expat, libdrm, xorg, wayland, libudev
4+, llvmPackages, libffi, libomxil-bellagio, libva
5+, libelf, libvdpau, python
6+, grsecEnabled ? false
57, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
68}:
79
8−if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
9− throw "unsupported platform for Mesa"
10−else
1110
1211/** Packaging design:
1312 - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now).
@@ -20,11 +19,15 @@ else
2019 - libOSMesa is in $osmesa (~4 MB)
2120*/
2221
23−with { inherit (stdenv.lib) optional optionalString; };
22+with stdenv.lib;
23+
24+if ! lists.elem stdenv.system platforms.mesaPlatforms then
25+ throw "unsupported platform for Mesa"
26+else
2427
2528let
26− version = "11.2.2";
27− # this is the default search path for DRI drivers
29+ version = "12.0.1";
30+ branch = head (splitString "." version);
2831 driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
2932in
3033
@@ -34,20 +37,20 @@ stdenv.mkDerivation {
3437 src = fetchurl {
3538 urls = [
3639 "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
37− (with stdenv.lib; ''ftp://ftp.freedesktop.org/pub/mesa/older-versions/''
38− + head (splitString "." version) + ''.x/${version}/mesa-${version}.tar.xz'')
40+ "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
3941 "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
4042 ];
41− sha256 = "40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4";
43+ sha256 = "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms";
4244 };
4345
4446 prePatch = "patchShebangs .";
4547
48+ # TODO:
49+ # revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved
50+ # ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
4651 patches = [
4752 ./glx_ro_text_segm.patch # fix for grsecurity/PaX
4853 ./symlink-drivers.patch
49− # TODO: revive ./dricore-gallium.patch when it gets ported (from Ubuntu),
50− # as it saved ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
5154 ] ++ optional stdenv.isLinux
5255 (substituteAll {
5356 src = ./dlopen-absolute-paths.diff;
@@ -61,61 +64,59 @@ stdenv.mkDerivation {
6164
6265 outputs = [ "dev" "out" "drivers" "osmesa" ];
6366
67+ # TODO: Figure out how to enable opencl without having a runtime dependency on clang
6468 configureFlags = [
6569 "--sysconfdir=/etc"
6670 "--localstatedir=/var"
6771 "--with-dri-driverdir=$(drivers)/lib/dri"
6872 "--with-dri-searchpath=${driverLink}/lib/dri"
69−
73+ "--with-egl-platforms=x11,wayland,drm"
74+ (optionalString (stdenv.system != "armv7l-linux")
75+ "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast")
76+ (optionalString (stdenv.system != "armv7l-linux")
77+ "--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast")
78+
79+ (enableFeature enableTextureFloats "texture-float")
80+ (enableFeature grsecEnabled "glx-rts")
81+ (enableFeature stdenv.isLinux "dri3")
82+ (enableFeature stdenv.isLinux "nine") # Direct3D in Wine
83+ "--enable-dri"
84+ "--enable-driglx-direct"
7085 "--enable-gles1"
7186 "--enable-gles2"
72− "--enable-dri"
73− ] ++ optional stdenv.isLinux "--enable-dri3"
74− ++ [
7587 "--enable-glx"
88+ "--enable-glx-tls"
7689 "--enable-gallium-osmesa" # used by wine
90+ "--enable-gallium-llvm"
7791 "--enable-egl"
7892 "--enable-xa" # used in vmware driver
7993 "--enable-gbm"
80− ] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine
81− ++ [
8294 "--enable-xvmc"
8395 "--enable-vdpau"
84− #"--enable-omx"
85− #"--enable-va"
86−
87− # TODO: Figure out how to enable opencl without having a runtime dependency on clang
88− "--disable-opencl"
89−
90− (if "armv7l-linux" == stdenv.system
91− then null
92− else "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast")
9396 "--enable-shared-glapi"
9497 "--enable-sysfs"
95− "--enable-driglx-direct" # seems enabled anyway
96− "--enable-glx-tls"
97− (if "armv7l-linux" == stdenv.system
98− then "--with-dri-drivers="
99− else "--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast")
100− "--with-egl-platforms=x11,wayland,drm"
101−
102− "--enable-gallium-llvm"
10398 "--enable-llvm-shared-libs"
104− ] ++ optional enableTextureFloats "--enable-texture-float"
105− ++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec
99+ "--enable-omx"
100+ "--enable-va"
101+ "--disable-opencl"
102+ ];
106103
107104 nativeBuildInputs = [ pkgconfig file ];
108105
109− propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ]
106+ propagatedBuildInputs = with xorg;
107+ [ libXdamage libXxf86vm ]
110108 ++ optional stdenv.isLinux libdrm;
111109
112110 buildInputs = with xorg; [
113111 autoreconfHook intltool expat llvmPackages.llvm
114112 glproto dri2proto dri3proto presentproto
115113 libX11 libXext libxcb libXt libXfixes libxshmfence
116− libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */
114+ libffi wayland libvdpau libelf libXvMC
115+ libomxil-bellagio libva libpthreadstubs
116+ (python.withPackages (ps: [ ps.Mako ]))
117117 ] ++ optional stdenv.isLinux libudev;
118118
119+
119120 enableParallelBuilding = true;
120121 doCheck = false;
121122
@@ -124,42 +125,42 @@ stdenv.mkDerivation {
124125 "localstatedir=\${TMPDIR}"
125126 ];
126127
127− # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM;
128− # also move libOSMesa to $osmesa, as it's relatively big
129− # ToDo: probably not all .la files are completely fixed, but it shouldn't matter
130− postInstall = with stdenv.lib; ''
131− mv -t "$drivers/lib/" \
132− $out/lib/libXvMC* \
133− $out/lib/d3d \
134− $out/lib/vdpau \
135− $out/lib/libxatracker*
128+ # TODO: probably not all .la files are completely fixed, but it shouldn't matter;
129+ postInstall = ''
130+ # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
131+ mv -t "$drivers/lib/" \
132+ $out/lib/libXvMC* \
133+ $out/lib/d3d \
134+ $out/lib/vdpau \
135+ $out/lib/bellagio \
136+ $out/lib/libxatracker* \
137+
138+ mv $out/lib/dri/* $drivers/lib/dri
136139
140+ # move libOSMesa to $osmesa, as it's relatively big
137141 mkdir -p {$osmesa,$drivers}/lib/
138− mv -t $osmesa/lib/ \
139− $out/lib/libOSMesa*
142+ mv -t $osmesa/lib/ $out/lib/libOSMesa*
140143
141− '' + /* now fix references in .la files */ ''
142− sed "/^libdir=/s,$out,$osmesa," -i \
143− $osmesa/lib/libOSMesa*.la
144+ # now fix references in .la files
145+ sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la
144146
145− '' + /* set the default search path for DRI drivers; used e.g. by X server */ ''
147+ # set the default search path for DRI drivers; used e.g. by X server
146148 substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
147149 '';
148− #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */
149150
150− postFixup =
151+ # TODO:
152+ # @vcunat isn't sure if drirc will be found when in $out/etc/;
153+ # check $out doesn't depend on llvm: builder failures are ignored
154+ # for some reason grep -qv '${llvmPackages.llvm}' -R "$out";
155+ postFixup = ''
151156 # add RPATH so the drivers can find the moved libgallium and libdricore9
152157 # moved here to avoid problems with stripping patchelfed files
153− ''
154158 for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
155159 if [[ ! -L "$lib" ]]; then
156160 patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
157161 fi
158162 done
159163 '';
160− # ToDo + /* check $out doesn't depend on llvm */ ''
161− # builder failures are ignored for some reason
162− # grep -qv '${llvmPackages.llvm}' -R "$out"
163164
164165 passthru = { inherit libdrm version driverLink; };
165166
pkgs/development/python-modules/generic/run_setup.py+2
@@ -1,3 +1,5 @@
1+# -*- coding: utf-8 -*-
2+
13import setuptools
24import tokenize
35
pkgs/development/tools/misc/lttng-tools/default.nix+1−1
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
1111 buildInputs = [ popt libuuid liburcu lttng-ust libxml2 ];
1212
1313 prePatch = ''
14− sed -e "s|/sbin/modprobe|${kmod}/sbin/modprobe|g" \
14+ sed -e "s|/sbin/modprobe|${kmod}/bin/modprobe|g" \
1515 -i src/bin/lttng-sessiond/modprobe.c
1616 '';
1717
pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix+3−1
@@ -1,4 +1,4 @@
1−{ stdenv, appleDerivation, ed, unifdef, Libc_old }:
1+{ stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }:
22
33appleDerivation {
44 phases = [ "unpackPhase" "installPhase" ];
@@ -13,6 +13,8 @@ appleDerivation {
1313 export PRIVATE_HEADERS_FOLDER_PATH=include
1414 bash xcodescripts/headers.sh
1515
16+ cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include
17+
1618 # Ugh Apple stopped releasing this stuff so we need an older one...
1719 cp ${Libc_old}/include/spawn.h $out/include
1820 cp ${Libc_old}/include/setjmp.h $out/include
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix+5−64
@@ -5,42 +5,7 @@
55appleDerivation rec {
66 phases = [ "unpackPhase" "installPhase" ];
77
8− buildInputs = [ cpio libpthread ];
9−
10− systemlibs = [ "cache"
11− "commonCrypto"
12− "compiler_rt"
13− "copyfile"
14− "corecrypto"
15− "dispatch"
16− "dyld"
17− "keymgr"
18− "kxld"
19− "launch"
20− "macho"
21− "quarantine"
22− "removefile"
23− "system_asl"
24− "system_blocks"
25− # "system_c" # special re-export here to hide newer functions
26− "system_configuration"
27− "system_dnssd"
28− "system_info"
29− # "system_kernel" # special re-export here to hide newer functions
30− "system_m"
31− "system_malloc"
32− "system_network"
33− "system_notify"
34− "system_platform"
35− "system_pthread"
36− "system_sandbox"
37− # does not exist in El Capitan beta
38− # FIXME: does anything on yosemite actually need this?
39− # "system_stats"
40− "unc"
41− "unwind"
42− "xpc"
43− ];
8+ buildInputs = [ cpio ];
449
4510 installPhase = ''
4611 export NIX_ENFORCE_PURITY=
@@ -54,7 +19,7 @@ appleDerivation rec {
5419
5520 for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \
5621 ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
57− ${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do
22+ ${Libnotify} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do
5823 (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
5924 done
6025
@@ -91,33 +56,9 @@ appleDerivation rec {
9156 # The startup object files
9257 cp ${Csu}/lib/* $out/lib
9358
94− # selectively re-export functions from libsystem_c and libsystem_kernel
95− # to provide a consistent interface across OSX verions
96− mkdir -p $out/lib/system
97− ld -macosx_version_min 10.7 -arch x86_64 -dylib \
98− -o $out/lib/system/libsystem_c.dylib \
99− /usr/lib/libSystem.dylib \
100− -reexported_symbols_list ${./system_c_symbols}
101−
102− ld -macosx_version_min 10.7 -arch x86_64 -dylib \
103− -o $out/lib/system/libsystem_kernel.dylib \
104− /usr/lib/libSystem.dylib \
105− -reexported_symbols_list ${./system_kernel_symbols}
106−
107− # Set up the actual library link
108− clang -c -o CompatibilityHacks.o -Os CompatibilityHacks.c
109− clang -c -o init.o -Os init.c
110− ld -macosx_version_min 10.7 \
111− -arch x86_64 \
112− -dylib \
113− -o $out/lib/libSystem.dylib \
114− CompatibilityHacks.o init.o \
115− -compatibility_version 1.0 \
116− -current_version 1197.1.1 \
117− -reexport_library $out/lib/system/libsystem_c.dylib \
118− -reexport_library $out/lib/system/libsystem_kernel.dylib \
119− ${stdenv.lib.concatStringsSep " "
120− (map (l: "-reexport_library /usr/lib/system/lib${l}.dylib") systemlibs)}
59+ # OMG impurity
60+ ln -s /usr/lib/libSystem.B.dylib $out/lib/libSystem.B.dylib
61+ ln -s /usr/lib/libSystem.dylib $out/lib/libSystem.dylib
12162
12263 # Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
12364 for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
pkgs/os-specific/darwin/apple-source-releases/configd/default.nix+10−5
@@ -3,7 +3,7 @@
33appleDerivation {
44 meta.broken = stdenv.cc.nativeLibc;
55
6− buildInputs = [ launchd bootstrap_cmds xnu ppp IOKit eap8021x ];
6+ buildInputs = [ launchd bootstrap_cmds ppp IOKit eap8021x ];
77
88 propagatedBuildInputs = [ Security ];
99
@@ -12,6 +12,11 @@ appleDerivation {
1212 '';
1313
1414 patchPhase = ''
15+ HACK=$PWD/hack
16+ mkdir $HACK
17+ cp -r ${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/net $HACK
18+
19+
1520 substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \
1621 --replace '#include <xpc/xpc.h>' ""
1722
@@ -172,9 +177,9 @@ appleDerivation {
172177 cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
173178 cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
174179 cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
175− cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c LinkConfiguration.c -o LinkConfiguration.o
180+ cc -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
176181 cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
177− cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c VLANConfiguration.c -o VLANConfiguration.o
182+ cc -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
178183 cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
179184 cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
180185 cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
@@ -183,8 +188,8 @@ appleDerivation {
183188 cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
184189 cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
185190 cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o
186− cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BondConfiguration.c -o BondConfiguration.o
187− cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
191+ cc -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o
192+ cc -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o
188193 cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
189194 cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
190195 cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
pkgs/os-specific/darwin/apple-source-releases/default.nix+17−8
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, pkgs }:
1+{ stdenv, fetchurl, fetchzip, pkgs }:
22
33let
44 # This attrset can in theory be computed automatically, but for that to work nicely we need
@@ -6,9 +6,13 @@ let
66 # a stdenv out of something like this. With some care we can probably get rid of this, but for
77 # now it's staying here.
88 versions = {
9− "osx-10.11.2" = {
10− dtrace = "168";
11− xnu = "3248.20.55";
9+ "osx-10.11.6" = {
10+ dtrace = "168";
11+ xnu = "3248.60.10";
12+ libpthread = "138.10.4";
13+ };
14+ "osx-10.11.5" = {
15+ Libc = "1082.50.1"; # 10.11.6 still unreleased :/
1216 };
1317 "osx-10.10.5" = {
1418 adv_cmds = "158";
@@ -185,13 +189,18 @@ let
185189 CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {};
186190 Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {};
187191 dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {};
188− dtracen = applePackage "dtrace" "osx-10.11.2" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {};
192+ dtracen = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {};
189193 dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {};
190194 eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {};
191195 IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; };
192196 launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};
193197 libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {};
194− Libc = applePackage "Libc" "osx-10.9.5" "1jz5bx9l4q484vn28c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {};
198+ Libc = applePackage "Libc" "osx-10.11.5" "1qv7r0dgz06jy9i5agbqzxgdibb0m8ylki6g5n5pary88lzrawfd" {
199+ Libc_10-9 = fetchzip {
200+ url = "http://www.opensource.apple.com/tarballs/Libc/Libc-997.90.3.tar.gz";
201+ sha256 = "1xchgxkxg5288r2b9yfrqji2gsgdap92k4wx2dbjwslixws12pq7";
202+ };
203+ };
195204 Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {};
196205 libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {};
197206 libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {};
@@ -199,7 +208,7 @@ let
199208 Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {};
200209 Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {};
201210 Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {};
202− libpthread = applePackage "libpthread" "osx-10.10.5" "1p2y6xvsfqyakivr6d48fgrd163b5m9r045cxyfwrf8w0r33nfn3" {};
211+ libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {};
203212 libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {};
204213 Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {};
205214 libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {};
@@ -209,7 +218,7 @@ let
209218 ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {};
210219 removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {};
211220 Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
212− xnu = applePackage "xnu" "osx-10.9.5" "1ssw5fzvgix20bw6y13c39ib0zs7ykpig3irlwbaccpjpci5jl0s" {};
221+ xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {};
213222
214223 # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions
215224 # here so we can work on them.
pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix+8−2
@@ -6,8 +6,14 @@ appleDerivation {
66 propagatedBuildInputs = [ libdispatch xnu ];
77
88 installPhase = ''
9− mkdir -p $out/include/pthread
9+ mkdir -p $out/include/pthread/
10+ mkdir -p $out/include/sys/_types
1011 cp pthread/*.h $out/include/pthread/
11− cp private/*.h $out/include/pthread/
12+
13+ # This overwrites qos.h, and is probably not necessary, but I'll leave it here for now
14+ # cp private/*.h $out/include/pthread/
15+
16+ cp -r sys $out/include
17+ cp -r sys/_pthread/*.h $out/include/sys/_types/
1218 '';
1319}
pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix+18−7
@@ -30,11 +30,12 @@ appleDerivation {
3030 substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \
3131 --replace "/usr/include" "/include" \
3232 --replace "/usr/local/include" "/include" \
33− --replace "MIG=" "# " \
34− --replace "MIGCC=" "# " \
33+ --replace 'MIG=`' "# " \
34+ --replace 'MIGCC=`' "# " \
3535 --replace " -o 0" "" \
3636 --replace '$SRC/$mig' '-I$DSTROOT/include $SRC/$mig' \
37− --replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs'
37+ --replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs' \
38+ --replace '$BUILT_PRODUCTS_DIR/mig_hdr' '$BUILT_PRODUCTS_DIR'
3839
3940 patchShebangs .
4041 '';
@@ -46,9 +47,9 @@ appleDerivation {
4647 cat > sdk/usr/local/libexec/availability.pl <<EOF
4748 #!$SHELL
4849 if [ "\$1" == "--macosx" ]; then
49− echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9
50+ 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
5051 elif [ "\$1" == "--ios" ]; then
51− 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
52+ 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
5253 fi
5354 EOF
5455 chmod +x sdk/usr/local/libexec/availability.pl
@@ -56,7 +57,7 @@ appleDerivation {
5657 export SDKROOT_RESOLVED=$PWD/sdk
5758 export HOST_SDKROOT_RESOLVED=$PWD/sdk
5859 export PLATFORM=MacOSX
59− export SDKVERSION=10.7
60+ export SDKVERSION=10.11
6061
6162 export CC=cc
6263 export CXX=c++
@@ -87,13 +88,13 @@ appleDerivation {
8788 make installhdrs
8889
8990 mv $out/usr/include $out
90− rmdir $out/usr
9191
9292 # TODO: figure out why I need to do this
9393 cp libsyscall/wrappers/*.h $out/include
9494 mkdir -p $out/include/os
9595 cp libsyscall/os/tsd.h $out/include/os/tsd.h
9696 cp EXTERNAL_HEADERS/AssertMacros.h $out/include
97+ cp EXTERNAL_HEADERS/Availability*.h $out/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/
9798
9899 # Build the mach headers we crave
99100 export MIGCC=cc
@@ -101,11 +102,21 @@ appleDerivation {
101102 export SRCROOT=$PWD/libsyscall
102103 export DERIVED_SOURCES_DIR=$out/include
103104 export SDKROOT=$out
105+ export OBJROOT=$PWD
106+ export BUILT_PRODUCTS_DIR=$out
104107 libsyscall/xcodescripts/mach_install_mig.sh
105108
106109 # Get rid of the System prefix
107110 mv $out/System/* $out/
108111
112+ # TODO: do I need this?
113+ mv $out/internal_hdr/include/mach/*.h $out/include/mach
114+
115+ # Get rid of some junk lying around
116+ rm -rf $out/internal_hdr
117+ rm -rf $out/usr
118+ rm -rf $out/local
119+
109120 # Add some symlinks
110121 ln -s $out/Library/Frameworks/System.framework/Versions/B \
111122 $out/Library/Frameworks/System.framework/Versions/Current
pkgs/os-specific/darwin/swift-corefoundation/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{ stdenv, fetchFromGitHub, python, ninja, libxml2 }:
2+
3+stdenv.mkDerivation {
4+ name = "swift-corefoundation";
5+
6+ src = fetchFromGitHub {
7+ owner = "apple";
8+ repo = "swift-corelibs-foundation";
9+ rev = "dce4233f583ec15190b240d6116396bf9641cd57";
10+ sha256 = "0i2ldvy14x05k2vgl5z0g5l2i5llifdfbij5zwfdwb8jmmq215qr";
11+ };
12+
13+ buildInputs = [ ninja python libxml2 ];
14+
15+ patchPhase = ''
16+ substituteInPlace CoreFoundation/build.py \
17+ --replace '-I''${SYSROOT}/usr/include/libxml2' '-I${libxml2.dev}/include/libxml2' \
18+ '';
19+
20+ configurePhase = ":";
21+
22+ buildPhase = ''
23+ cd CoreFoundation
24+ ../configure --sysroot unused
25+ ninja
26+ '';
27+
28+ installPhase = ''
29+ mkdir -p $out/lib
30+ cp ../Build/CoreFoundation/libCoreFoundation.a $out/lib
31+ '';
32+}
pkgs/os-specific/linux/kernel/manual-config.nix+2−2
@@ -93,7 +93,7 @@ let
9393 echo "stripping FHS paths in \`$mf'..."
9494 sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
9595 done
96− sed -i Makefile -e 's|= depmod|= ${kmod}/sbin/depmod|'
96+ sed -i Makefile -e 's|= depmod|= ${kmod}/bin/depmod|'
9797 '';
9898
9999 configurePhase = ''
@@ -188,7 +188,7 @@ let
188188 find -empty -type d -delete
189189
190190 # Remove reference to kmod
191− sed -i Makefile -e 's|= ${kmod}/sbin/depmod|= depmod|'
191+ sed -i Makefile -e 's|= ${kmod}/bin/depmod|= depmod|'
192192 '' else optionalString installsFirmware ''
193193 make firmware_install $makeFlags "''${makeFlagsArray[@]}" \
194194 $installFlags "''${installFlagsArray[@]}"
pkgs/os-specific/linux/kmod/aggregator.nix+1−1
@@ -21,7 +21,7 @@ buildEnv {
2121 # kernel version number, otherwise depmod will use `uname -r'.
2222 if test -w $out/lib/modules/$kernelVersion; then
2323 rm -f $out/lib/modules/$kernelVersion/modules.*
24− ${kmod}/sbin/depmod -b $out -a $kernelVersion
24+ ${kmod}/bin/depmod -b $out -a $kernelVersion
2525 fi
2626 '';
2727}
pkgs/os-specific/linux/kmod/default.nix+21−9
@@ -1,25 +1,37 @@
1−{ stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }:
1+{ stdenv, lib, fetchurl, autoreconfHook, xz, zlib, pkgconfig, libxslt }:
22
3−stdenv.mkDerivation rec {
4− name = "kmod-22";
3+let
4+ systems = [ "current-system" "booted-system" ];
5+ modulesDirs = lib.concatMapStringsSep ":" (x: "/run/${x}/kernel-modules/lib/modules") systems;
6+
7+in stdenv.mkDerivation rec {
8+ name = "kmod-${version}";
9+ version = "22";
510
611 src = fetchurl {
712 url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz";
813 sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs";
914 };
1015
11− buildInputs = [ pkgconfig libxslt xz /* zlib */ ];
16+ nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ];
17+ buildInputs = [ xz /* zlib */ ];
1218
13− configureFlags = [ "--sysconfdir=/etc" "--with-xz" /* "--with-zlib" */ ];
19+ configureFlags = [
20+ "--sysconfdir=/etc"
21+ "--with-xz"
22+ "--with-modulesdirs=${modulesDirs}"
23+ # "--with-zlib"
24+ ];
1425
1526 patches = [ ./module-dir.patch ];
1627
1728 postInstall = ''
18− ln -s kmod $out/bin/lsmod
19− mkdir -p $out/sbin
20− for prog in rmmod insmod modinfo modprobe depmod; do
21− ln -sv $out/bin/kmod $out/sbin/$prog
29+ for prog in rmmod insmod lsmod modinfo modprobe depmod; do
30+ ln -sv $out/bin/kmod $out/bin/$prog
2231 done
32+
33+ # Backwards compatibility
34+ ln -s bin $out/sbin
2335 '';
2436
2537 meta = {
pkgs/os-specific/linux/kmod/module-dir.patch+124−27
@@ -1,7 +1,46 @@
1−diff -ru -x '*~' kmod-17-orig/libkmod/libkmod.c kmod-17/libkmod/libkmod.c
2−--- kmod-17-orig/libkmod/libkmod.c 2014-04-01 12:40:37.161940089 +0200
3−+++ kmod-17/libkmod/libkmod.c 2014-04-17 13:47:15.871441987 +0200
4−@@ -201,7 +201,7 @@
1+diff --git a/Makefile.am b/Makefile.am
2+index d4eeb7e..5c9f603 100644
3+--- a/Makefile.am
4++++ b/Makefile.am
5+@@ -19,6 +19,7 @@ AM_CPPFLAGS = \
6+ -include $(top_builddir)/config.h \
7+ -I$(top_srcdir) \
8+ -DSYSCONFDIR=\""$(sysconfdir)"\" \
9++ -DMODULESDIRS=\""$(shell echo $(modulesdirs) | $(SED) 's|:|\\",\\"|g')"\" \
10+ ${zlib_CFLAGS}
11+
12+ AM_CFLAGS = $(OUR_CFLAGS)
13+diff --git a/configure.ac b/configure.ac
14+index 23510c8..66490cf 100644
15+--- a/configure.ac
16++++ b/configure.ac
17+@@ -202,6 +202,12 @@ GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
18+ ], [
19+ AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
20+
21++AC_ARG_WITH([modulesdirs],
22++ AS_HELP_STRING([--with-modulesdirs=DIRS], [Kernel modules directories, separated by :]),
23++ [],
24++ [with_modulesdirs=/lib/modules])
25++AC_SUBST([modulesdirs], [$with_modulesdirs])
26++
27+
28+ #####################################################################
29+ # Default CFLAGS and LDFLAGS
30+diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c
31+index 69fe431..d37da32 100644
32+--- a/libkmod/libkmod.c
33++++ b/libkmod/libkmod.c
34+@@ -206,12 +206,15 @@ static int log_priority(const char *priority)
35+ return 0;
36+ }
37+
38+-static const char *dirname_default_prefix = "/lib/modules";
39++static const char *dirname_default_prefixes[] = {
40++ MODULESDIRS,
41++ NULL
42++};
43+
544 static char *get_kernel_release(const char *dirname)
645 {
746 struct utsname u;
@@ -10,51 +49,109 @@ diff -ru -x '*~' kmod-17-orig/libkmod/libkmod.c kmod-17/libkmod/libkmod.c
1049
1150 if (dirname != NULL)
1251 return path_make_absolute_cwd(dirname);
13−@@ -209,7 +209,10 @@
52+@@ -219,8 +222,42 @@ static char *get_kernel_release(const char *dirname)
1453 if (uname(&u) < 0)
1554 return NULL;
1655
1756- if (asprintf(&p, "%s/%s", dirname_default_prefix, u.release) < 0)
18−+ if ((dirname_prefix = getenv("MODULE_DIR")) == NULL)
19−+ dirname_prefix = dirname_default_prefix;
57+- return NULL;
58++ if ((dirname_prefix = getenv("MODULE_DIR")) != NULL) {
59++ if(asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0)
60++ return NULL;
61++ } else {
62++ size_t i;
63++ char buf[PATH_MAX];
2064+
21−+ if (asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0)
22− return NULL;
65++ for (i = 0; dirname_default_prefixes[i] != NULL; i++) {
66++ int plen;
67++ struct stat dirstat;
68++
69++ plen = snprintf(buf, sizeof(buf), "%s/%s", dirname_default_prefixes[i], u.release);
70++ if (plen < 0)
71++ return NULL;
72++ else if (plen >= PATH_MAX)
73++ continue;
74++
75++ if (dirname_default_prefixes[i + 1] != NULL) {
76++ if (stat(buf, &dirstat) < 0) {
77++ if (errno == ENOENT)
78++ continue;
79++ else
80++ return NULL;
81++ }
82++
83++ if (!S_ISDIR(dirstat.st_mode))
84++ continue;
85++ }
86++
87++ p = malloc(plen + 1);
88++ if (p == NULL)
89++ return NULL;
90++ memcpy(p, buf, plen + 1);
91++ break;
92++ }
93++ }
2394
2495 return p;
25−diff -ru -x '*~' kmod-17-orig/tools/static-nodes.c kmod-17/tools/static-nodes.c
26−--- kmod-17-orig/tools/static-nodes.c 2013-12-17 22:05:42.159047316 +0100
27−+++ kmod-17/tools/static-nodes.c 2014-04-17 13:51:17.945974320 +0200
28−@@ -159,6 +159,7 @@
96+ }
97+diff --git a/tools/static-nodes.c b/tools/static-nodes.c
98+index 8d2356d..2ed306d 100644
99+--- a/tools/static-nodes.c
100++++ b/tools/static-nodes.c
101+@@ -29,10 +29,11 @@
102+ #include <unistd.h>
103+ #include <sys/stat.h>
104+ #include <sys/types.h>
105+-#include <sys/utsname.h>
106+
107+ #include <shared/util.h>
108+
109++#include <libkmod/libkmod.h>
110++
111+ #include "kmod.h"
112+
113+ struct static_nodes_format {
114+@@ -154,8 +155,8 @@ static void help(void)
115+
116+ static int do_static_nodes(int argc, char *argv[])
117+ {
118+- struct utsname kernel;
119+ char modules[PATH_MAX], buf[4096];
120++ struct kmod_ctx *ctx;
121+ const char *output = "/dev/stdout";
29122 FILE *in = NULL, *out = NULL;
30123 const struct static_nodes_format *format = &static_nodes_format_human;
31− int r, ret = EXIT_SUCCESS;
32−+ char *dirname_prefix;
124+@@ -206,22 +207,25 @@ static int do_static_nodes(int argc, char *argv[])
125+ }
126+ }
33127
34− for (;;) {
35− int c, idx = 0, valid;
36−@@ -211,16 +212,19 @@
128+- if (uname(&kernel) < 0) {
129+- fputs("Error: uname failed!\n", stderr);
130++ ctx = kmod_new(NULL, NULL);
131++ if (ctx == NULL) {
132++ fprintf(stderr, "Error: failed to create kmod context\n");
133+ ret = EXIT_FAILURE;
37134 goto finish;
38135 }
39−
136+-
40137- snprintf(modules, sizeof(modules), "/lib/modules/%s/modules.devname", kernel.release);
41−+ if ((dirname_prefix = getenv("MODULE_DIR")) == NULL)
42−+ dirname_prefix = "/lib/modules";
43−+
44−+ snprintf(modules, sizeof(modules), "%s/%s/modules.devname", dirname_prefix, kernel.release);
138++ if (snprintf(modules, sizeof(modules), "%s/modules.devname", kmod_get_dirname(ctx)) < 0) {
139++ fprintf(stderr, "Error: path to modules.devname is too long\n");
140++ ret = EXIT_FAILURE;
141++ goto finish;
142++ }
143++ kmod_unref(ctx);
45144 in = fopen(modules, "re");
46145 if (in == NULL) {
47146 if (errno == ENOENT) {
48147- fprintf(stderr, "Warning: /lib/modules/%s/modules.devname not found - ignoring\n",
49148- kernel.release);
50−+ fprintf(stderr, "Warning: %s/%s/modules.devname not found - ignoring\n",
51−+ dirname_prefix, kernel.release);
149++ fprintf(stderr, "Warning: %s not found - ignoring\n", modules);
52150 ret = EXIT_SUCCESS;
53151 } else {
54152- fprintf(stderr, "Error: could not open /lib/modules/%s/modules.devname - %m\n",
55153- kernel.release);
56−+ fprintf(stderr, "Error: could not open %s/%s/modules.devname - %m\n",
57−+ dirname_prefix, kernel.release);
154++ fprintf(stderr, "Error: could not open %s - %m\n", modules);
58155 ret = EXIT_FAILURE;
59156 }
60157 goto finish;
pkgs/stdenv/darwin/make-bootstrap-tools.nix+1−2
@@ -27,7 +27,6 @@ rec {
2727 # C standard library stuff
2828 cp -d ${darwin.Libsystem}/lib/*.o $out/lib/
2929 cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/
30− cp -d ${darwin.Libsystem}/lib/system/*.dylib $out/lib/
3130
3231 # Resolv is actually a link to another package, so let's copy it properly
3332 rm $out/lib/libresolv.9.dylib
@@ -91,7 +90,7 @@ rec {
9190 cp -d ${xz.out}/lib/liblzma*.* $out/lib
9291
9392 # Copy binutils.
94− for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do
93+ for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do
9594 cp ${darwin.cctools}/bin/$i $out/bin
9695 done
9796
pkgs/tools/networking/network-manager/0.9.8/default.nix+7−1
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, intltool, pkgconfig, dbus_glib
22, udev, libnl, libuuid, gnutls, dhcp
3−, libgcrypt, perl, libgudev }:
3+, libgcrypt, perl, libgudev, avahi, ppp, kmod }:
44
55stdenv.mkDerivation rec {
66 name = "network-manager-${version}";
@@ -13,6 +13,12 @@ stdenv.mkDerivation rec {
1313
1414 preConfigure = ''
1515 substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl
16+ substituteInPlace src/nm-device.c \
17+ --replace @avahi@ ${avahi} \
18+ --replace @kmod@ ${kmod}
19+ substituteInPlace src/ppp-manager/nm-ppp-manager.c \
20+ --replace @ppp@ ${ppp} \
21+ --replace @kmod@ ${kmod}
1622 '';
1723
1824 # Right now we hardcode quite a few paths at build time. Probably we should
pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch+2−2
@@ -47,7 +47,7 @@ index 1dc94ee..e60f3c8 100644
4747
4848 for (iter = modules; *iter; iter++) {
4949- char *argv[3] = { "/sbin/modprobe", *iter, NULL };
50−+ char *argv[3] = { "/var/run/current-system/sw/bin/modprobe", *iter, NULL };
50++ char *argv[3] = { "@kmod@/bin/modprobe", *iter, NULL };
5151 char *envp[1] = { NULL };
5252 GError *error = NULL;
5353
@@ -71,7 +71,7 @@ index 59698c3..7dba0f7 100644
7171 /* Make sure /dev/ppp exists (bgo #533064) */
7272 if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode))
7373- ignored = system ("/sbin/modprobe ppp_generic");
74−+ ignored = system ("/var/run/current-system/sw/bin/modprobe ppp_generic");
74++ ignored = system ("@kmod@/bin/modprobe ppp_generic");
7575
7676 connection = nm_act_request_get_connection (req);
7777 g_assert (connection);
pkgs/tools/networking/network-manager/default.nix+2−2
@@ -2,7 +2,7 @@
22, systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables
33, libgcrypt, dnsmasq, bluez5, readline
44, gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup
5−, ethtool, gnused, coreutils, file, inetutils }:
5+, ethtool, gnused, coreutils, file, inetutils, kmod }:
66
77stdenv.mkDerivation rec {
88 name = "network-manager-${version}";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
1919 substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname
2020 substituteInPlace configure --replace /usr/bin/file ${file}/bin/file
2121 substituteInPlace src/devices/nm-device.c --replace /usr/bin/ping ${inetutils}/bin/ping
22− substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe /run/current-system/sw/sbin/modprobe
22+ substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe
2323 substituteInPlace data/84-nm-drivers.rules \
2424 --replace /bin/sh ${stdenv.shell}
2525 substituteInPlace data/85-nm-unmanaged.rules \
pkgs/tools/networking/network-manager/openconnect.nix+3−3
@@ -23,10 +23,10 @@ stdenv.mkDerivation rec {
2323
2424 preConfigure = ''
2525 substituteInPlace "configure" \
26− --replace "/sbin/sysctl" "${procps}/sbin/sysctl"
26+ --replace "/sbin/sysctl" "${procps}/bin/sysctl"
2727 substituteInPlace "src/nm-openconnect-service.c" \
28− --replace "/usr/sbin/openconnect" "${openconnect}/sbin/openconnect" \
29− --replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
28+ --replace "/usr/sbin/openconnect" "${openconnect}/bin/openconnect" \
29+ --replace "/sbin/modprobe" "${kmod}/bin/modprobe"
3030 '';
3131
3232 meta = {
pkgs/tools/networking/network-manager/openvpn.nix+3−3
@@ -27,10 +27,10 @@ stdenv.mkDerivation rec {
2727 substituteInPlace "configure" \
2828 --replace "/sbin/sysctl" "${procps}/sbin/sysctl"
2929 substituteInPlace "src/nm-openvpn-service.c" \
30− --replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" \
31− --replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
30+ --replace "/sbin/openvpn" "${openvpn}/bin/openvpn" \
31+ --replace "/sbin/modprobe" "${kmod}/bin/modprobe"
3232 substituteInPlace "properties/auth-helpers.c" \
33− --replace "/sbin/openvpn" "${openvpn}/sbin/openvpn"
33+ --replace "/sbin/openvpn" "${openvpn}/bin/openvpn"
3434 '';
3535
3636 meta = {
pkgs/tools/networking/network-manager/vpnc.nix+3−3
@@ -24,10 +24,10 @@ stdenv.mkDerivation rec {
2424
2525 preConfigure = ''
2626 substituteInPlace "configure" \
27− --replace "/sbin/sysctl" "${procps}/sbin/sysctl"
27+ --replace "/sbin/sysctl" "${procps}/bin/sysctl"
2828 substituteInPlace "src/nm-vpnc-service.c" \
29− --replace "/sbin/vpnc" "${vpnc}/sbin/vpnc" \
30− --replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
29+ --replace "/sbin/vpnc" "${vpnc}/bin/vpnc" \
30+ --replace "/sbin/modprobe" "${kmod}/bin/modprobe"
3131 '';
3232
3333 meta = {
pkgs/tools/text/diffutils/default.nix+2−2
@@ -1,11 +1,11 @@
11{ stdenv, fetchurl, xz, coreutils ? null }:
22
33stdenv.mkDerivation rec {
4− name = "diffutils-3.3";
4+ name = "diffutils-3.4";
55
66 src = fetchurl {
77 url = "mirror://gnu/diffutils/${name}.tar.xz";
8− sha256 = "1761vymxbp4wb5rzjvabhdkskk95pghnn67464byvzb5mfl8jpm2";
8+ sha256 = "1qlw328qpbss07zrb14ls0rhnhbvxrnssgbmrxxj2gdcy8jw0lyv";
99 };
1010
1111 outputs = [ "out" "info" ];
pkgs/top-level/all-packages.nix+2
@@ -10832,6 +10832,8 @@ in
1083210832
1083310833 opencflite = callPackage ../os-specific/darwin/opencflite {};
1083410834
10835+ swift-corefoundation = callPackage ../os-specific/darwin/swift-corefoundation {};
10836+
1083510837 xcode = callPackage ../os-specific/darwin/xcode {};
1083610838
1083710839 osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};