git.iko.soy/typeable/nixpkgs
on master help sign in
Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs"

Was meant to go into staging, sorry This reverts commit 57b2d1e9b0dcdd1d25bd2d450174764b9417ffc1, reversing changes made to 760b2b9048ea775c319cb348d74447a20dea513e.

commit9adad8612b082bcbae30c81678a04b79a44079a4 authorShea Levy <shea@shealevy.com> dateMon 15 Aug 2016, 19:05 (10 years ago) parent57b2d1e
39 files changed+300−364
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+3−2 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+39−2 nixos/modules/system/boot/stage-2-init.sh+1 nixos/modules/tasks/cpu-freq.nix+1−1 nixos/modules/virtualisation/docker.nix+2−1 nixos/modules/virtualisation/qemu-vm.nix+13−13 pkgs/development/libraries/fftw/default.nix+16−6 pkgs/development/libraries/libdrm/default.nix+2−2 pkgs/development/libraries/mesa/default.nix+63−64 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+1−3 pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix+64−5 pkgs/os-specific/darwin/apple-source-releases/configd/default.nix+5−10 pkgs/os-specific/darwin/apple-source-releases/default.nix+8−17 pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix+2−8 pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix+7−18 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+9−21 pkgs/os-specific/linux/kmod/module-dir.patch+27−124 pkgs/stdenv/darwin/make-bootstrap-tools.nix+2−1 pkgs/tools/networking/network-manager/0.9.8/default.nix+1−7 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 = "${pkgs.kmod}/bin/modprobe";
11+ modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
1212
1313in
1414
nixos/modules/hardware/video/bumblebee.nix+1
@@ -75,6 +75,7 @@ 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/";
7879 };
7980 };
8081}
nixos/modules/hardware/video/webcam/facetimehd.nix+1
@@ -36,6 +36,7 @@ in
3636
3737 # and load it back on resume
3838 powerManagement.resumeCommands = ''
39+ export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
3940 ${pkgs.kmod}/bin/modprobe -v facetimehd
4041 '';
4142
nixos/modules/services/hardware/tlp.nix+4
@@ -72,6 +72,8 @@ 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/";
7577 };
7678
7779 tlp-sleep = {
@@ -90,6 +92,8 @@ in
9092 ExecStart = "${tlp}/bin/tlp suspend";
9193 ExecStop = "${tlp}/bin/tlp resume";
9294 };
95+
96+ environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
9397 };
9498 };
9599
nixos/modules/services/hardware/udev.nix+3−2
@@ -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 \"${pkgs.kmod}/bin/modprobe \
61+ --replace \"/sbin/modprobe \"${config.system.sbin.modprobe}/sbin/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,7 +316,8 @@ in
316316 '';
317317
318318 systemd.services.systemd-udevd =
319− { restartTriggers = cfg.packages;
319+ { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
320+ restartTriggers = cfg.packages;
320321 };
321322
322323 };
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}/bin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
83+ ${pkgs.kmod}/sbin/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 = "${pkgs.kmod}/bin/modprobe";
8+ modprobe = "${config.system.sbin.modprobe}/sbin/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; [ kmod iproute iptables utillinux ]; # XXX Linux
121+ path = with pkgs; [ config.system.sbin.modprobe 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,6 +228,7 @@ 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";
231232 serviceConfig =
232233 { # Ignore failed module loads. Typically some of the
233234 # modules in ‘boot.kernelModules’ are "nice to have but
@@ -237,6 +238,10 @@ in
237238 };
238239 };
239240
241+ systemd.services.kmod-static-nodes =
242+ { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
243+ };
244+
240245 lib.kernelConfig = {
241246 isYes = option: {
242247 assertion = config: config.isYes option;
nixos/modules/system/boot/modprobe.nix+39−2
@@ -8,6 +8,41 @@ 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+
1146 boot.blacklistedKernelModules = mkOption {
1247 type = types.listOf types.str;
1348 default = [];
@@ -52,7 +87,7 @@ with lib;
5287 '';
5388 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
5489
55− environment.systemPackages = [ pkgs.kmod ];
90+ environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ];
5691
5792 system.activationScripts.modprobe =
5893 ''
@@ -60,9 +95,11 @@ with lib;
6095 # in the right location in the Nix store for kernel modules).
6196 # We need this when the kernel (or some module) auto-loads a
6297 # module.
63− echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe
98+ echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe
6499 '';
65100
101+ environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
102+
66103 };
67104
68105}
nixos/modules/system/boot/stage-2-init.sh+1
@@ -207,5 +207,6 @@ 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 \
210211 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
211212 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 pkgs.kmod ];
41+ path = [ cpupower config.system.sbin.modprobe ];
4242 unitConfig.ConditionVirtualization = false;
4343 serviceConfig = {
4444 Type = "oneshot";
nixos/modules/virtualisation/docker.nix+2−1
@@ -95,7 +95,8 @@ in
9595 LimitNPROC = 1048576;
9696 } // proxy_env;
9797
98− path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
98+ path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
99+ environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
99100
100101 postStart = if cfg.socketActivation then "" else cfg.postStart;
101102
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}/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
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
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}/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
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
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}/bin/mke2fs
373+ copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs
374374 '';
375375
376376 boot.initrd.postDeviceCommands =
pkgs/development/libraries/fftw/default.nix+16−6
@@ -1,24 +1,34 @@
1−{ fetchurl, stdenv, lib, precision ? "double" }:
1+{ fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }:
22
33with lib;
44
55assert elem precision [ "single" "double" "long-double" "quad-precision" ];
66
7−let version = "3.3.5"; in
7+let version = "3.3.5-rc1"; in
88
99stdenv.mkDerivation rec {
1010 name = "fftw-${precision}-${version}";
1111
12− src = fetchurl {
13− url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz";
14− sha256 = "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf";
12+ src = fetchFromGitHub {
13+ owner = "FFTW";
14+ repo = "fftw3";
15+ rev = "fftw-${version}";
16+ sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4";
1517 };
1618
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+
1726 outputs = [ "dev" "out" "doc" ]; # it's dev-doc only
1827 outputBin = "dev"; # fftw-wisdom
1928
2029 configureFlags =
21− [ "--enable-shared" "--disable-static"
30+ [ "--enable-maintainer-mode"
31+ "--enable-shared" "--disable-static"
2232 "--enable-threads"
2333 ]
2434 ++ 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.70";
4+ name = "libdrm-2.4.68";
55
66 src = fetchurl {
77 url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
8− sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b";
8+ sha256 = "5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df";
99 };
1010
1111 outputs = [ "dev" "out" ];
pkgs/development/libraries/mesa/default.nix+63−64
@@ -1,12 +1,13 @@
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
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
75, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
86}:
97
8+if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
9+ throw "unsupported platform for Mesa"
10+else
1011
1112/** Packaging design:
1213 - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now).
@@ -19,15 +20,11 @@
1920 - libOSMesa is in $osmesa (~4 MB)
2021*/
2122
22−with stdenv.lib;
23−
24−if ! lists.elem stdenv.system platforms.mesaPlatforms then
25− throw "unsupported platform for Mesa"
26−else
23+with { inherit (stdenv.lib) optional optionalString; };
2724
2825let
29− version = "12.0.1";
30− branch = head (splitString "." version);
26+ version = "11.2.2";
27+ # this is the default search path for DRI drivers
3128 driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
3229in
3330
@@ -37,20 +34,20 @@ stdenv.mkDerivation {
3734 src = fetchurl {
3835 urls = [
3936 "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
40− "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${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'')
4139 "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
4240 ];
43− sha256 = "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms";
41+ sha256 = "40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4";
4442 };
4543
4644 prePatch = "patchShebangs .";
4745
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
5146 patches = [
5247 ./glx_ro_text_segm.patch # fix for grsecurity/PaX
5348 ./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
5451 ] ++ optional stdenv.isLinux
5552 (substituteAll {
5653 src = ./dlopen-absolute-paths.diff;
@@ -64,59 +61,61 @@ stdenv.mkDerivation {
6461
6562 outputs = [ "dev" "out" "drivers" "osmesa" ];
6663
67− # TODO: Figure out how to enable opencl without having a runtime dependency on clang
6864 configureFlags = [
6965 "--sysconfdir=/etc"
7066 "--localstatedir=/var"
7167 "--with-dri-driverdir=$(drivers)/lib/dri"
7268 "--with-dri-searchpath=${driverLink}/lib/dri"
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"
69+
8570 "--enable-gles1"
8671 "--enable-gles2"
72+ "--enable-dri"
73+ ] ++ optional stdenv.isLinux "--enable-dri3"
74+ ++ [
8775 "--enable-glx"
88− "--enable-glx-tls"
8976 "--enable-gallium-osmesa" # used by wine
90− "--enable-gallium-llvm"
9177 "--enable-egl"
9278 "--enable-xa" # used in vmware driver
9379 "--enable-gbm"
80+ ] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine
81+ ++ [
9482 "--enable-xvmc"
9583 "--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")
9693 "--enable-shared-glapi"
9794 "--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"
98103 "--enable-llvm-shared-libs"
99− "--enable-omx"
100− "--enable-va"
101− "--disable-opencl"
102− ];
104+ ] ++ optional enableTextureFloats "--enable-texture-float"
105+ ++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec
103106
104107 nativeBuildInputs = [ pkgconfig file ];
105108
106− propagatedBuildInputs = with xorg;
107− [ libXdamage libXxf86vm ]
109+ propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ]
108110 ++ optional stdenv.isLinux libdrm;
109111
110112 buildInputs = with xorg; [
111113 autoreconfHook intltool expat llvmPackages.llvm
112114 glproto dri2proto dri3proto presentproto
113115 libX11 libXext libxcb libXt libXfixes libxshmfence
114− libffi wayland libvdpau libelf libXvMC
115− libomxil-bellagio libva libpthreadstubs
116− (python.withPackages (ps: [ ps.Mako ]))
116+ libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */
117117 ] ++ optional stdenv.isLinux libudev;
118118
119−
120119 enableParallelBuilding = true;
121120 doCheck = false;
122121
@@ -125,42 +124,42 @@ stdenv.mkDerivation {
125124 "localstatedir=\${TMPDIR}"
126125 ];
127126
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
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*
139136
140− # move libOSMesa to $osmesa, as it's relatively big
141137 mkdir -p {$osmesa,$drivers}/lib/
142− mv -t $osmesa/lib/ $out/lib/libOSMesa*
138+ mv -t $osmesa/lib/ \
139+ $out/lib/libOSMesa*
143140
144− # now fix references in .la files
145− sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la
141+ '' + /* now fix references in .la files */ ''
142+ sed "/^libdir=/s,$out,$osmesa," -i \
143+ $osmesa/lib/libOSMesa*.la
146144
147− # set the default search path for DRI drivers; used e.g. by X server
145+ '' + /* set the default search path for DRI drivers; used e.g. by X server */ ''
148146 substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
149147 '';
148+ #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */
150149
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 = ''
150+ postFixup =
156151 # add RPATH so the drivers can find the moved libgallium and libdricore9
157152 # moved here to avoid problems with stripping patchelfed files
153+ ''
158154 for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
159155 if [[ ! -L "$lib" ]]; then
160156 patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
161157 fi
162158 done
163159 '';
160+ # ToDo + /* check $out doesn't depend on llvm */ ''
161+ # builder failures are ignored for some reason
162+ # grep -qv '${llvmPackages.llvm}' -R "$out"
164163
165164 passthru = { inherit libdrm version driverLink; };
166165
pkgs/development/python-modules/generic/run_setup.py−2
@@ -1,5 +1,3 @@
1−# -*- coding: utf-8 -*-
2−
31import setuptools
42import tokenize
53
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}/bin/modprobe|g" \
14+ sed -e "s|/sbin/modprobe|${kmod}/sbin/modprobe|g" \
1515 -i src/bin/lttng-sessiond/modprobe.c
1616 '';
1717
pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix+1−3
@@ -1,4 +1,4 @@
1−{ stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }:
1+{ stdenv, appleDerivation, ed, unifdef, Libc_old }:
22
33appleDerivation {
44 phases = [ "unpackPhase" "installPhase" ];
@@ -13,8 +13,6 @@ 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−
1816 # Ugh Apple stopped releasing this stuff so we need an older one...
1917 cp ${Libc_old}/include/spawn.h $out/include
2018 cp ${Libc_old}/include/setjmp.h $out/include
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix+64−5
@@ -5,7 +5,42 @@
55appleDerivation rec {
66 phases = [ "unpackPhase" "installPhase" ];
77
8− buildInputs = [ cpio ];
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+ ];
944
1045 installPhase = ''
1146 export NIX_ENFORCE_PURITY=
@@ -19,7 +54,7 @@ appleDerivation rec {
1954
2055 for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \
2156 ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
22− ${Libnotify} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do
57+ ${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do
2358 (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
2459 done
2560
@@ -56,9 +91,33 @@ appleDerivation rec {
5691 # The startup object files
5792 cp ${Csu}/lib/* $out/lib
5893
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
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)}
62121
63122 # Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
64123 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+5−10
@@ -3,7 +3,7 @@
33appleDerivation {
44 meta.broken = stdenv.cc.nativeLibc;
55
6− buildInputs = [ launchd bootstrap_cmds ppp IOKit eap8021x ];
6+ buildInputs = [ launchd bootstrap_cmds xnu ppp IOKit eap8021x ];
77
88 propagatedBuildInputs = [ Security ];
99
@@ -12,11 +12,6 @@ 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−
2015 substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \
2116 --replace '#include <xpc/xpc.h>' ""
2217
@@ -177,9 +172,9 @@ appleDerivation {
177172 cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o
178173 cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o
179174 cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o
180− cc -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o
175+ cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c LinkConfiguration.c -o LinkConfiguration.o
181176 cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o
182− cc -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o
177+ cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c VLANConfiguration.c -o VLANConfiguration.o
183178 cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o
184179 cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o
185180 cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o
@@ -188,8 +183,8 @@ appleDerivation {
188183 cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o
189184 cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o
190185 cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.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
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
193188 cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o
194189 cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o
195190 cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
pkgs/os-specific/darwin/apple-source-releases/default.nix+8−17
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchzip, pkgs }:
1+{ stdenv, fetchurl, pkgs }:
22
33let
44 # This attrset can in theory be computed automatically, but for that to work nicely we need
@@ -6,13 +6,9 @@ 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.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 :/
9+ "osx-10.11.2" = {
10+ dtrace = "168";
11+ xnu = "3248.20.55";
1612 };
1713 "osx-10.10.5" = {
1814 adv_cmds = "158";
@@ -189,18 +185,13 @@ let
189185 CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {};
190186 Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {};
191187 dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {};
192− dtracen = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {};
188+ dtracen = applePackage "dtrace" "osx-10.11.2" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {};
193189 dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {};
194190 eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {};
195191 IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; };
196192 launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};
197193 libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {};
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− };
194+ Libc = applePackage "Libc" "osx-10.9.5" "1jz5bx9l4q484vn28c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {};
204195 Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {};
205196 libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {};
206197 libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {};
@@ -208,7 +199,7 @@ let
208199 Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {};
209200 Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {};
210201 Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {};
211− libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {};
202+ libpthread = applePackage "libpthread" "osx-10.10.5" "1p2y6xvsfqyakivr6d48fgrd163b5m9r045cxyfwrf8w0r33nfn3" {};
212203 libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {};
213204 Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {};
214205 libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {};
@@ -218,7 +209,7 @@ let
218209 ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {};
219210 removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {};
220211 Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
221− xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {};
212+ xnu = applePackage "xnu" "osx-10.9.5" "1ssw5fzvgix20bw6y13c39ib0zs7ykpig3irlwbaccpjpci5jl0s" {};
222213
223214 # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions
224215 # here so we can work on them.
pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix+2−8
@@ -6,14 +6,8 @@ appleDerivation {
66 propagatedBuildInputs = [ libdispatch xnu ];
77
88 installPhase = ''
9− mkdir -p $out/include/pthread/
10− mkdir -p $out/include/sys/_types
9+ mkdir -p $out/include/pthread
1110 cp pthread/*.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/
11+ cp private/*.h $out/include/pthread/
1812 '';
1913}
pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix+7−18
@@ -30,12 +30,11 @@ 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' \
38− --replace '$BUILT_PRODUCTS_DIR/mig_hdr' '$BUILT_PRODUCTS_DIR'
37+ --replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs'
3938
4039 patchShebangs .
4140 '';
@@ -47,9 +46,9 @@ appleDerivation {
4746 cat > sdk/usr/local/libexec/availability.pl <<EOF
4847 #!$SHELL
4948 if [ "\$1" == "--macosx" ]; then
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
49+ echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9
5150 elif [ "\$1" == "--ios" ]; then
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
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
5352 fi
5453 EOF
5554 chmod +x sdk/usr/local/libexec/availability.pl
@@ -57,7 +56,7 @@ appleDerivation {
5756 export SDKROOT_RESOLVED=$PWD/sdk
5857 export HOST_SDKROOT_RESOLVED=$PWD/sdk
5958 export PLATFORM=MacOSX
60− export SDKVERSION=10.11
59+ export SDKVERSION=10.7
6160
6261 export CC=cc
6362 export CXX=c++
@@ -88,13 +87,13 @@ appleDerivation {
8887 make installhdrs
8988
9089 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/
9897
9998 # Build the mach headers we crave
10099 export MIGCC=cc
@@ -102,21 +101,11 @@ appleDerivation {
102101 export SRCROOT=$PWD/libsyscall
103102 export DERIVED_SOURCES_DIR=$out/include
104103 export SDKROOT=$out
105− export OBJROOT=$PWD
106− export BUILT_PRODUCTS_DIR=$out
107104 libsyscall/xcodescripts/mach_install_mig.sh
108105
109106 # Get rid of the System prefix
110107 mv $out/System/* $out/
111108
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−
120109 # Add some symlinks
121110 ln -s $out/Library/Frameworks/System.framework/Versions/B \
122111 $out/Library/Frameworks/System.framework/Versions/Current
pkgs/os-specific/darwin/swift-corefoundation/default.nixdeleted−32
@@ -1,32 +0,0 @@
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}/bin/depmod|'
96+ sed -i Makefile -e 's|= depmod|= ${kmod}/sbin/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}/bin/depmod|= depmod|'
191+ sed -i Makefile -e 's|= ${kmod}/sbin/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}/bin/depmod -b $out -a $kernelVersion
24+ ${kmod}/sbin/depmod -b $out -a $kernelVersion
2525 fi
2626 '';
2727}
pkgs/os-specific/linux/kmod/default.nix+9−21
@@ -1,37 +1,25 @@
1−{ stdenv, lib, fetchurl, autoreconfHook, xz, zlib, pkgconfig, libxslt }:
1+{ stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }:
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";
3+stdenv.mkDerivation rec {
4+ name = "kmod-22";
105
116 src = fetchurl {
127 url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz";
138 sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs";
149 };
1510
16− nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ];
17− buildInputs = [ xz /* zlib */ ];
11+ buildInputs = [ pkgconfig libxslt xz /* zlib */ ];
1812
19− configureFlags = [
20− "--sysconfdir=/etc"
21− "--with-xz"
22− "--with-modulesdirs=${modulesDirs}"
23− # "--with-zlib"
24− ];
13+ configureFlags = [ "--sysconfdir=/etc" "--with-xz" /* "--with-zlib" */ ];
2514
2615 patches = [ ./module-dir.patch ];
2716
2817 postInstall = ''
29− for prog in rmmod insmod lsmod modinfo modprobe depmod; do
30− ln -sv $out/bin/kmod $out/bin/$prog
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
3122 done
32−
33− # Backwards compatibility
34− ln -s bin $out/sbin
3523 '';
3624
3725 meta = {
pkgs/os-specific/linux/kmod/module-dir.patch+27−124
@@ -1,46 +1,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−
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 @@
445 static char *get_kernel_release(const char *dirname)
456 {
467 struct utsname u;
@@ -49,109 +10,51 @@ index 69fe431..d37da32 100644
4910
5011 if (dirname != NULL)
5112 return path_make_absolute_cwd(dirname);
52−@@ -219,8 +222,42 @@ static char *get_kernel_release(const char *dirname)
13+@@ -209,7 +209,10 @@
5314 if (uname(&u) < 0)
5415 return NULL;
5516
5617- if (asprintf(&p, "%s/%s", dirname_default_prefix, u.release) < 0)
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];
18++ if ((dirname_prefix = getenv("MODULE_DIR")) == NULL)
19++ dirname_prefix = dirname_default_prefix;
6420+
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−+ }
21++ if (asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0)
22+ return NULL;
9423
9524 return p;
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";
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 @@
12229 FILE *in = NULL, *out = NULL;
12330 const struct static_nodes_format *format = &static_nodes_format_human;
124−@@ -206,22 +207,25 @@ static int do_static_nodes(int argc, char *argv[])
125− }
126− }
31+ int r, ret = EXIT_SUCCESS;
32++ char *dirname_prefix;
12733
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;
34+ for (;;) {
35+ int c, idx = 0, valid;
36+@@ -211,16 +212,19 @@
13437 goto finish;
13538 }
136−-
39+
13740- snprintf(modules, sizeof(modules), "/lib/modules/%s/modules.devname", 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);
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);
14445 in = fopen(modules, "re");
14546 if (in == NULL) {
14647 if (errno == ENOENT) {
14748- fprintf(stderr, "Warning: /lib/modules/%s/modules.devname not found - ignoring\n",
14849- kernel.release);
149−+ fprintf(stderr, "Warning: %s not found - ignoring\n", modules);
50++ fprintf(stderr, "Warning: %s/%s/modules.devname not found - ignoring\n",
51++ dirname_prefix, kernel.release);
15052 ret = EXIT_SUCCESS;
15153 } else {
15254- fprintf(stderr, "Error: could not open /lib/modules/%s/modules.devname - %m\n",
15355- kernel.release);
154−+ fprintf(stderr, "Error: could not open %s - %m\n", modules);
56++ fprintf(stderr, "Error: could not open %s/%s/modules.devname - %m\n",
57++ dirname_prefix, kernel.release);
15558 ret = EXIT_FAILURE;
15659 }
15760 goto finish;
pkgs/stdenv/darwin/make-bootstrap-tools.nix+2−1
@@ -27,6 +27,7 @@ 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/
3031
3132 # Resolv is actually a link to another package, so let's copy it properly
3233 rm $out/lib/libresolv.9.dylib
@@ -90,7 +91,7 @@ rec {
9091 cp -d ${xz.out}/lib/liblzma*.* $out/lib
9192
9293 # Copy binutils.
93− for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do
94+ for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do
9495 cp ${darwin.cctools}/bin/$i $out/bin
9596 done
9697
pkgs/tools/networking/network-manager/0.9.8/default.nix+1−7
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, intltool, pkgconfig, dbus_glib
22, udev, libnl, libuuid, gnutls, dhcp
3−, libgcrypt, perl, libgudev, avahi, ppp, kmod }:
3+, libgcrypt, perl, libgudev }:
44
55stdenv.mkDerivation rec {
66 name = "network-manager-${version}";
@@ -13,12 +13,6 @@ 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}
2216 '';
2317
2418 # 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] = { "@kmod@/bin/modprobe", *iter, NULL };
50++ char *argv[3] = { "/var/run/current-system/sw/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 ("@kmod@/bin/modprobe ppp_generic");
74++ ignored = system ("/var/run/current-system/sw/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, kmod }:
5+, ethtool, gnused, coreutils, file, inetutils }:
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 ${kmod}/bin/modprobe
22+ substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe /run/current-system/sw/sbin/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}/bin/sysctl"
26+ --replace "/sbin/sysctl" "${procps}/sbin/sysctl"
2727 substituteInPlace "src/nm-openconnect-service.c" \
28− --replace "/usr/sbin/openconnect" "${openconnect}/bin/openconnect" \
29− --replace "/sbin/modprobe" "${kmod}/bin/modprobe"
28+ --replace "/usr/sbin/openconnect" "${openconnect}/sbin/openconnect" \
29+ --replace "/sbin/modprobe" "${kmod}/sbin/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}/bin/openvpn" \
31− --replace "/sbin/modprobe" "${kmod}/bin/modprobe"
30+ --replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" \
31+ --replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
3232 substituteInPlace "properties/auth-helpers.c" \
33− --replace "/sbin/openvpn" "${openvpn}/bin/openvpn"
33+ --replace "/sbin/openvpn" "${openvpn}/sbin/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}/bin/sysctl"
27+ --replace "/sbin/sysctl" "${procps}/sbin/sysctl"
2828 substituteInPlace "src/nm-vpnc-service.c" \
29− --replace "/sbin/vpnc" "${vpnc}/bin/vpnc" \
30− --replace "/sbin/modprobe" "${kmod}/bin/modprobe"
29+ --replace "/sbin/vpnc" "${vpnc}/sbin/vpnc" \
30+ --replace "/sbin/modprobe" "${kmod}/sbin/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.4";
4+ name = "diffutils-3.3";
55
66 src = fetchurl {
77 url = "mirror://gnu/diffutils/${name}.tar.xz";
8− sha256 = "1qlw328qpbss07zrb14ls0rhnhbvxrnssgbmrxxj2gdcy8jw0lyv";
8+ sha256 = "1761vymxbp4wb5rzjvabhdkskk95pghnn67464byvzb5mfl8jpm2";
99 };
1010
1111 outputs = [ "out" "info" ];
pkgs/top-level/all-packages.nix−2
@@ -10832,8 +10832,6 @@ in
1083210832
1083310833 opencflite = callPackage ../os-specific/darwin/opencflite {};
1083410834
10835− swift-corefoundation = callPackage ../os-specific/darwin/swift-corefoundation {};
10836−
1083710835 xcode = callPackage ../os-specific/darwin/xcode {};
1083810836
1083910837 osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};