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.

+299 -363
+1 -1
nixos/modules/config/zram.nix
··· 8 9 devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1)); 10 11 - modprobe = "${pkgs.kmod}/bin/modprobe"; 12 13 in 14
··· 8 9 devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1)); 10 11 + modprobe = "${config.system.sbin.modprobe}/sbin/modprobe"; 12 13 in 14
+1
nixos/modules/hardware/video/bumblebee.nix
··· 75 serviceConfig = { 76 ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}"; 77 }; 78 }; 79 }; 80 }
··· 75 serviceConfig = { 76 ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}"; 77 }; 78 + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; 79 }; 80 }; 81 }
+1
nixos/modules/hardware/video/webcam/facetimehd.nix
··· 36 37 # and load it back on resume 38 powerManagement.resumeCommands = '' 39 ${pkgs.kmod}/bin/modprobe -v facetimehd 40 ''; 41
··· 36 37 # and load it back on resume 38 powerManagement.resumeCommands = '' 39 + export MODULE_DIR=/run/current-system/kernel-modules/lib/modules 40 ${pkgs.kmod}/bin/modprobe -v facetimehd 41 ''; 42
+4
nixos/modules/services/hardware/tlp.nix
··· 72 ExecStart = "${tlp}/bin/tlp init start"; 73 ExecStop = "${tlp}/bin/tlp init stop"; 74 }; 75 }; 76 77 tlp-sleep = { ··· 90 ExecStart = "${tlp}/bin/tlp suspend"; 91 ExecStop = "${tlp}/bin/tlp resume"; 92 }; 93 }; 94 }; 95
··· 72 ExecStart = "${tlp}/bin/tlp init start"; 73 ExecStop = "${tlp}/bin/tlp init stop"; 74 }; 75 + 76 + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; 77 }; 78 79 tlp-sleep = { ··· 92 ExecStart = "${tlp}/bin/tlp suspend"; 93 ExecStop = "${tlp}/bin/tlp resume"; 94 }; 95 + 96 + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; 97 }; 98 }; 99
+3 -2
nixos/modules/services/hardware/udev.nix
··· 58 # Fix some paths in the standard udev rules. Hacky. 59 for i in $out/*.rules; do 60 substituteInPlace $i \ 61 - --replace \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \ 62 --replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \ 63 --replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \ 64 --replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \ ··· 316 ''; 317 318 systemd.services.systemd-udevd = 319 - { restartTriggers = cfg.packages; 320 }; 321 322 };
··· 58 # Fix some paths in the standard udev rules. Hacky. 59 for i in $out/*.rules; do 60 substituteInPlace $i \ 61 + --replace \"/sbin/modprobe \"${config.system.sbin.modprobe}/sbin/modprobe \ 62 --replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \ 63 --replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \ 64 --replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \ ··· 316 ''; 317 318 systemd.services.systemd-udevd = 319 + { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; 320 + restartTriggers = cfg.packages; 321 }; 322 323 };
+1 -1
nixos/modules/services/network-filesystems/openafs-client/default.nix
··· 80 preStart = '' 81 mkdir -p -m 0755 /afs 82 mkdir -m 0700 -p ${cfg.cacheDirectory} 83 - ${pkgs.kmod}/bin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true 84 ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb 85 ${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"} 86 '';
··· 80 preStart = '' 81 mkdir -p -m 0755 /afs 82 mkdir -m 0700 -p ${cfg.cacheDirectory} 83 + ${pkgs.kmod}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true 84 ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb 85 ${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"} 86 '';
+1 -1
nixos/modules/services/networking/fan.nix
··· 5 let 6 7 cfg = config.networking.fan; 8 - modprobe = "${pkgs.kmod}/bin/modprobe"; 9 10 in 11
··· 5 let 6 7 cfg = config.networking.fan; 8 + modprobe = "${config.system.sbin.modprobe}/sbin/modprobe"; 9 10 in 11
+1 -1
nixos/modules/services/networking/strongswan.nix
··· 118 systemd.services.strongswan = { 119 description = "strongSwan IPSec Service"; 120 wantedBy = [ "multi-user.target" ]; 121 - path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux 122 wants = [ "keys.target" ]; 123 after = [ "network.target" "keys.target" ]; 124 environment = {
··· 118 systemd.services.strongswan = { 119 description = "strongSwan IPSec Service"; 120 wantedBy = [ "multi-user.target" ]; 121 + path = with pkgs; [ config.system.sbin.modprobe iproute iptables utillinux ]; # XXX Linux 122 wants = [ "keys.target" ]; 123 after = [ "network.target" "keys.target" ]; 124 environment = {
+5
nixos/modules/system/boot/kernel.nix
··· 228 systemd.services."systemd-modules-load" = 229 { wantedBy = [ "multi-user.target" ]; 230 restartTriggers = [ kernelModulesConf ]; 231 serviceConfig = 232 { # Ignore failed module loads. Typically some of the 233 # modules in ‘boot.kernelModules’ are "nice to have but ··· 235 # barf on those. 236 SuccessExitStatus = "0 1"; 237 }; 238 }; 239 240 lib.kernelConfig = {
··· 228 systemd.services."systemd-modules-load" = 229 { wantedBy = [ "multi-user.target" ]; 230 restartTriggers = [ kernelModulesConf ]; 231 + environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; 232 serviceConfig = 233 { # Ignore failed module loads. Typically some of the 234 # modules in ‘boot.kernelModules’ are "nice to have but ··· 236 # barf on those. 237 SuccessExitStatus = "0 1"; 238 }; 239 + }; 240 + 241 + systemd.services.kmod-static-nodes = 242 + { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; 243 }; 244 245 lib.kernelConfig = {
+39 -2
nixos/modules/system/boot/modprobe.nix
··· 8 9 options = { 10 11 boot.blacklistedKernelModules = mkOption { 12 type = types.listOf types.str; 13 default = []; ··· 52 ''; 53 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; 54 55 - environment.systemPackages = [ pkgs.kmod ]; 56 57 system.activationScripts.modprobe = 58 '' ··· 60 # in the right location in the Nix store for kernel modules). 61 # We need this when the kernel (or some module) auto-loads a 62 # module. 63 - echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe 64 ''; 65 66 }; 67
··· 8 9 options = { 10 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 + 46 boot.blacklistedKernelModules = mkOption { 47 type = types.listOf types.str; 48 default = []; ··· 87 ''; 88 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; 89 90 + environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; 91 92 system.activationScripts.modprobe = 93 '' ··· 95 # in the right location in the Nix store for kernel modules). 96 # We need this when the kernel (or some module) auto-loads a 97 # module. 98 + echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe 99 ''; 100 + 101 + environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; 102 103 }; 104
+1
nixos/modules/system/boot/stage-2-init.sh
··· 207 # Start systemd. 208 echo "starting systemd..." 209 PATH=/run/current-system/systemd/lib/systemd \ 210 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ 211 exec systemd
··· 207 # Start systemd. 208 echo "starting systemd..." 209 PATH=/run/current-system/systemd/lib/systemd \ 210 + MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \ 211 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ 212 exec systemd
+1 -1
nixos/modules/tasks/cpu-freq.nix
··· 38 description = "CPU Frequency Governor Setup"; 39 after = [ "systemd-modules-load.service" ]; 40 wantedBy = [ "multi-user.target" ]; 41 - path = [ cpupower pkgs.kmod ]; 42 unitConfig.ConditionVirtualization = false; 43 serviceConfig = { 44 Type = "oneshot";
··· 38 description = "CPU Frequency Governor Setup"; 39 after = [ "systemd-modules-load.service" ]; 40 wantedBy = [ "multi-user.target" ]; 41 + path = [ cpupower config.system.sbin.modprobe ]; 42 unitConfig.ConditionVirtualization = false; 43 serviceConfig = { 44 Type = "oneshot";
+2 -1
nixos/modules/virtualisation/docker.nix
··· 95 LimitNPROC = 1048576; 96 } // proxy_env; 97 98 - path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); 99 100 postStart = if cfg.socketActivation then "" else cfg.postStart; 101
··· 95 LimitNPROC = 1048576; 96 } // proxy_env; 97 98 + path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); 99 + environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; 100 101 postStart = if cfg.socketActivation then "" else cfg.postStart; 102
+13 -13
nixos/modules/virtualisation/qemu-vm.nix
··· 135 } 136 '' 137 # 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 145 ${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2 146 . /sys/class/block/vda2/uevent 147 mknod /dev/vda2 b $MAJOR $MINOR ··· 151 ${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot 152 153 # 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 159 mkdir /boot 160 mount /dev/vda2 /boot 161 ··· 370 boot.initrd.extraUtilsCommands = 371 '' 372 # We need mke2fs in the initrd. 373 - copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs 374 ''; 375 376 boot.initrd.postDeviceCommands =
··· 135 } 136 '' 137 # 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 145 ${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2 146 . /sys/class/block/vda2/uevent 147 mknod /dev/vda2 b $MAJOR $MINOR ··· 151 ${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot 152 153 # 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 159 mkdir /boot 160 mount /dev/vda2 /boot 161 ··· 370 boot.initrd.extraUtilsCommands = 371 '' 372 # We need mke2fs in the initrd. 373 + copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs 374 ''; 375 376 boot.initrd.postDeviceCommands =
+16 -6
pkgs/development/libraries/fftw/default.nix
··· 1 - { fetchurl, stdenv, lib, precision ? "double" }: 2 3 with lib; 4 5 assert elem precision [ "single" "double" "long-double" "quad-precision" ]; 6 7 - let version = "3.3.5"; in 8 9 stdenv.mkDerivation rec { 10 name = "fftw-${precision}-${version}"; 11 12 - src = fetchurl { 13 - url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"; 14 - sha256 = "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"; 15 }; 16 17 outputs = [ "dev" "out" "doc" ]; # it's dev-doc only 18 outputBin = "dev"; # fftw-wisdom 19 20 configureFlags = 21 - [ "--enable-shared" "--disable-static" 22 "--enable-threads" 23 ] 24 ++ optional (precision != "double") "--enable-${precision}"
··· 1 + { fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }: 2 3 with lib; 4 5 assert elem precision [ "single" "double" "long-double" "quad-precision" ]; 6 7 + let version = "3.3.5-rc1"; in 8 9 stdenv.mkDerivation rec { 10 name = "fftw-${precision}-${version}"; 11 12 + src = fetchFromGitHub { 13 + owner = "FFTW"; 14 + repo = "fftw3"; 15 + rev = "fftw-${version}"; 16 + sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4"; 17 }; 18 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 + 26 outputs = [ "dev" "out" "doc" ]; # it's dev-doc only 27 outputBin = "dev"; # fftw-wisdom 28 29 configureFlags = 30 + [ "--enable-maintainer-mode" 31 + "--enable-shared" "--disable-static" 32 "--enable-threads" 33 ] 34 ++ optional (precision != "double") "--enable-${precision}"
+2 -2
pkgs/development/libraries/libdrm/default.nix
··· 1 { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }: 2 3 stdenv.mkDerivation rec { 4 - name = "libdrm-2.4.70"; 5 6 src = fetchurl { 7 url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; 8 - sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b"; 9 }; 10 11 outputs = [ "dev" "out" ];
··· 1 { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }: 2 3 stdenv.mkDerivation rec { 4 + name = "libdrm-2.4.68"; 5 6 src = fetchurl { 7 url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; 8 + sha256 = "5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df"; 9 }; 10 11 outputs = [ "dev" "out" ];
+62 -63
pkgs/development/libraries/mesa/default.nix
··· 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 7 , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt 8 }: 9 10 11 /** Packaging design: 12 - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now). ··· 19 - libOSMesa is in $osmesa (~4 MB) 20 */ 21 22 - with stdenv.lib; 23 - 24 - if ! lists.elem stdenv.system platforms.mesaPlatforms then 25 - throw "unsupported platform for Mesa" 26 - else 27 28 let 29 - version = "12.0.1"; 30 - branch = head (splitString "." version); 31 driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; 32 in 33 ··· 37 src = fetchurl { 38 urls = [ 39 "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" 41 "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" 42 ]; 43 - sha256 = "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms"; 44 }; 45 46 prePatch = "patchShebangs ."; 47 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 51 patches = [ 52 ./glx_ro_text_segm.patch # fix for grsecurity/PaX 53 ./symlink-drivers.patch 54 ] ++ optional stdenv.isLinux 55 (substituteAll { 56 src = ./dlopen-absolute-paths.diff; ··· 64 65 outputs = [ "dev" "out" "drivers" "osmesa" ]; 66 67 - # TODO: Figure out how to enable opencl without having a runtime dependency on clang 68 configureFlags = [ 69 "--sysconfdir=/etc" 70 "--localstatedir=/var" 71 "--with-dri-driverdir=$(drivers)/lib/dri" 72 "--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" 85 "--enable-gles1" 86 "--enable-gles2" 87 "--enable-glx" 88 - "--enable-glx-tls" 89 "--enable-gallium-osmesa" # used by wine 90 - "--enable-gallium-llvm" 91 "--enable-egl" 92 "--enable-xa" # used in vmware driver 93 "--enable-gbm" 94 "--enable-xvmc" 95 "--enable-vdpau" 96 "--enable-shared-glapi" 97 "--enable-sysfs" 98 "--enable-llvm-shared-libs" 99 - "--enable-omx" 100 - "--enable-va" 101 - "--disable-opencl" 102 - ]; 103 104 nativeBuildInputs = [ pkgconfig file ]; 105 106 - propagatedBuildInputs = with xorg; 107 - [ libXdamage libXxf86vm ] 108 ++ optional stdenv.isLinux libdrm; 109 110 buildInputs = with xorg; [ 111 autoreconfHook intltool expat llvmPackages.llvm 112 glproto dri2proto dri3proto presentproto 113 libX11 libXext libxcb libXt libXfixes libxshmfence 114 - libffi wayland libvdpau libelf libXvMC 115 - libomxil-bellagio libva libpthreadstubs 116 - (python.withPackages (ps: [ ps.Mako ])) 117 ] ++ optional stdenv.isLinux libudev; 118 - 119 120 enableParallelBuilding = true; 121 doCheck = false; ··· 125 "localstatedir=\${TMPDIR}" 126 ]; 127 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 139 140 - # move libOSMesa to $osmesa, as it's relatively big 141 mkdir -p {$osmesa,$drivers}/lib/ 142 - mv -t $osmesa/lib/ $out/lib/libOSMesa* 143 144 - # now fix references in .la files 145 - sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la 146 147 - # set the default search path for DRI drivers; used e.g. by X server 148 substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" 149 ''; 150 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 = '' 156 # add RPATH so the drivers can find the moved libgallium and libdricore9 157 # moved here to avoid problems with stripping patchelfed files 158 for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do 159 if [[ ! -L "$lib" ]]; then 160 patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" 161 fi 162 done 163 ''; 164 165 passthru = { inherit libdrm version driverLink; }; 166
··· 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 5 , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt 6 }: 7 8 + if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then 9 + throw "unsupported platform for Mesa" 10 + else 11 12 /** Packaging design: 13 - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now). ··· 20 - libOSMesa is in $osmesa (~4 MB) 21 */ 22 23 + with { inherit (stdenv.lib) optional optionalString; }; 24 25 let 26 + version = "11.2.2"; 27 + # this is the default search path for DRI drivers 28 driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; 29 in 30 ··· 34 src = fetchurl { 35 urls = [ 36 "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'') 39 "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" 40 ]; 41 + sha256 = "40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4"; 42 }; 43 44 prePatch = "patchShebangs ."; 45 46 patches = [ 47 ./glx_ro_text_segm.patch # fix for grsecurity/PaX 48 ./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 51 ] ++ optional stdenv.isLinux 52 (substituteAll { 53 src = ./dlopen-absolute-paths.diff; ··· 61 62 outputs = [ "dev" "out" "drivers" "osmesa" ]; 63 64 configureFlags = [ 65 "--sysconfdir=/etc" 66 "--localstatedir=/var" 67 "--with-dri-driverdir=$(drivers)/lib/dri" 68 "--with-dri-searchpath=${driverLink}/lib/dri" 69 70 "--enable-gles1" 71 "--enable-gles2" 72 + "--enable-dri" 73 + ] ++ optional stdenv.isLinux "--enable-dri3" 74 + ++ [ 75 "--enable-glx" 76 "--enable-gallium-osmesa" # used by wine 77 "--enable-egl" 78 "--enable-xa" # used in vmware driver 79 "--enable-gbm" 80 + ] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine 81 + ++ [ 82 "--enable-xvmc" 83 "--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") 93 "--enable-shared-glapi" 94 "--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" 103 "--enable-llvm-shared-libs" 104 + ] ++ optional enableTextureFloats "--enable-texture-float" 105 + ++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec 106 107 nativeBuildInputs = [ pkgconfig file ]; 108 109 + propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ] 110 ++ optional stdenv.isLinux libdrm; 111 112 buildInputs = with xorg; [ 113 autoreconfHook intltool expat llvmPackages.llvm 114 glproto dri2proto dri3proto presentproto 115 libX11 libXext libxcb libXt libXfixes libxshmfence 116 + libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */ 117 ] ++ optional stdenv.isLinux libudev; 118 119 enableParallelBuilding = true; 120 doCheck = false; ··· 124 "localstatedir=\${TMPDIR}" 125 ]; 126 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* 136 137 mkdir -p {$osmesa,$drivers}/lib/ 138 + mv -t $osmesa/lib/ \ 139 + $out/lib/libOSMesa* 140 141 + '' + /* now fix references in .la files */ '' 142 + sed "/^libdir=/s,$out,$osmesa," -i \ 143 + $osmesa/lib/libOSMesa*.la 144 145 + '' + /* set the default search path for DRI drivers; used e.g. by X server */ '' 146 substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" 147 ''; 148 + #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */ 149 150 + postFixup = 151 # add RPATH so the drivers can find the moved libgallium and libdricore9 152 # moved here to avoid problems with stripping patchelfed files 153 + '' 154 for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do 155 if [[ ! -L "$lib" ]]; then 156 patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" 157 fi 158 done 159 ''; 160 + # ToDo + /* check $out doesn't depend on llvm */ '' 161 + # builder failures are ignored for some reason 162 + # grep -qv '${llvmPackages.llvm}' -R "$out" 163 164 passthru = { inherit libdrm version driverLink; }; 165
-2
pkgs/development/python-modules/generic/run_setup.py
··· 1 - # -*- coding: utf-8 -*- 2 - 3 import setuptools 4 import tokenize 5
··· 1 import setuptools 2 import tokenize 3
+1 -1
pkgs/development/tools/misc/lttng-tools/default.nix
··· 11 buildInputs = [ popt libuuid liburcu lttng-ust libxml2 ]; 12 13 prePatch = '' 14 - sed -e "s|/sbin/modprobe|${kmod}/bin/modprobe|g" \ 15 -i src/bin/lttng-sessiond/modprobe.c 16 ''; 17
··· 11 buildInputs = [ popt libuuid liburcu lttng-ust libxml2 ]; 12 13 prePatch = '' 14 + sed -e "s|/sbin/modprobe|${kmod}/sbin/modprobe|g" \ 15 -i src/bin/lttng-sessiond/modprobe.c 16 ''; 17
+1 -3
pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
··· 1 - { stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }: 2 3 appleDerivation { 4 phases = [ "unpackPhase" "installPhase" ]; ··· 12 export PUBLIC_HEADERS_FOLDER_PATH=include 13 export PRIVATE_HEADERS_FOLDER_PATH=include 14 bash xcodescripts/headers.sh 15 - 16 - cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include 17 18 # Ugh Apple stopped releasing this stuff so we need an older one... 19 cp ${Libc_old}/include/spawn.h $out/include
··· 1 + { stdenv, appleDerivation, ed, unifdef, Libc_old }: 2 3 appleDerivation { 4 phases = [ "unpackPhase" "installPhase" ]; ··· 12 export PUBLIC_HEADERS_FOLDER_PATH=include 13 export PRIVATE_HEADERS_FOLDER_PATH=include 14 bash xcodescripts/headers.sh 15 16 # Ugh Apple stopped releasing this stuff so we need an older one... 17 cp ${Libc_old}/include/spawn.h $out/include
+64 -5
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
··· 5 appleDerivation rec { 6 phases = [ "unpackPhase" "installPhase" ]; 7 8 - buildInputs = [ cpio ]; 9 10 installPhase = '' 11 export NIX_ENFORCE_PURITY= ··· 19 20 for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \ 21 ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ 22 - ${Libnotify} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do 23 (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) 24 done 25 ··· 56 # The startup object files 57 cp ${Csu}/lib/* $out/lib 58 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 62 63 # Set up links to pretend we work like a conventional unix (Apple's design, not mine!) 64 for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
··· 5 appleDerivation rec { 6 phases = [ "unpackPhase" "installPhase" ]; 7 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 + ]; 44 45 installPhase = '' 46 export NIX_ENFORCE_PURITY= ··· 54 55 for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \ 56 ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ 57 + ${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do 58 (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) 59 done 60 ··· 91 # The startup object files 92 cp ${Csu}/lib/* $out/lib 93 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)} 121 122 # Set up links to pretend we work like a conventional unix (Apple's design, not mine!) 123 for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
+5 -10
pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
··· 3 appleDerivation { 4 meta.broken = stdenv.cc.nativeLibc; 5 6 - buildInputs = [ launchd bootstrap_cmds ppp IOKit eap8021x ]; 7 8 propagatedBuildInputs = [ Security ]; 9 ··· 12 ''; 13 14 patchPhase = '' 15 - HACK=$PWD/hack 16 - mkdir $HACK 17 - cp -r ${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/net $HACK 18 - 19 - 20 substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \ 21 --replace '#include <xpc/xpc.h>' "" 22 ··· 177 cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o 178 cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o 179 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 181 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 183 cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o 184 cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o 185 cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o ··· 188 cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o 189 cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o 190 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 193 cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o 194 cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o 195 cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
··· 3 appleDerivation { 4 meta.broken = stdenv.cc.nativeLibc; 5 6 + buildInputs = [ launchd bootstrap_cmds xnu ppp IOKit eap8021x ]; 7 8 propagatedBuildInputs = [ Security ]; 9 ··· 12 ''; 13 14 patchPhase = '' 15 substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \ 16 --replace '#include <xpc/xpc.h>' "" 17 ··· 172 cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o 173 cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o 174 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 176 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 178 cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o 179 cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o 180 cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o ··· 183 cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o 184 cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o 185 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 188 cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o 189 cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o 190 cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
+8 -17
pkgs/os-specific/darwin/apple-source-releases/default.nix
··· 1 - { stdenv, fetchurl, fetchzip, pkgs }: 2 3 let 4 # This attrset can in theory be computed automatically, but for that to work nicely we need ··· 6 # a stdenv out of something like this. With some care we can probably get rid of this, but for 7 # now it's staying here. 8 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 :/ 16 }; 17 "osx-10.10.5" = { 18 adv_cmds = "158"; ··· 189 CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {}; 190 Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {}; 191 dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {}; 192 - dtracen = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; 193 dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {}; 194 eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {}; 195 IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; }; 196 launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {}; 197 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 - }; 204 Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {}; 205 libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {}; 206 libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {}; ··· 208 Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {}; 209 Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {}; 210 Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {}; 211 - libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {}; 212 libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {}; 213 Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {}; 214 libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {}; ··· 218 ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {}; 219 removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {}; 220 Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; 221 - xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {}; 222 223 # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions 224 # here so we can work on them.
··· 1 + { stdenv, fetchurl, pkgs }: 2 3 let 4 # This attrset can in theory be computed automatically, but for that to work nicely we need ··· 6 # a stdenv out of something like this. With some care we can probably get rid of this, but for 7 # now it's staying here. 8 versions = { 9 + "osx-10.11.2" = { 10 + dtrace = "168"; 11 + xnu = "3248.20.55"; 12 }; 13 "osx-10.10.5" = { 14 adv_cmds = "158"; ··· 185 CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {}; 186 Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {}; 187 dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {}; 188 + dtracen = applePackage "dtrace" "osx-10.11.2" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; 189 dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {}; 190 eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {}; 191 IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; }; 192 launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {}; 193 libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {}; 194 + Libc = applePackage "Libc" "osx-10.9.5" "1jz5bx9l4q484vn28c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {}; 195 Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {}; 196 libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {}; 197 libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {}; ··· 199 Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {}; 200 Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {}; 201 Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {}; 202 + libpthread = applePackage "libpthread" "osx-10.10.5" "1p2y6xvsfqyakivr6d48fgrd163b5m9r045cxyfwrf8w0r33nfn3" {}; 203 libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {}; 204 Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {}; 205 libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {}; ··· 209 ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {}; 210 removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {}; 211 Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; 212 + xnu = applePackage "xnu" "osx-10.9.5" "1ssw5fzvgix20bw6y13c39ib0zs7ykpig3irlwbaccpjpci5jl0s" {}; 213 214 # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions 215 # here so we can work on them.
+2 -8
pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix
··· 6 propagatedBuildInputs = [ libdispatch xnu ]; 7 8 installPhase = '' 9 - mkdir -p $out/include/pthread/ 10 - mkdir -p $out/include/sys/_types 11 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/ 18 ''; 19 }
··· 6 propagatedBuildInputs = [ libdispatch xnu ]; 7 8 installPhase = '' 9 + mkdir -p $out/include/pthread 10 cp pthread/*.h $out/include/pthread/ 11 + cp private/*.h $out/include/pthread/ 12 ''; 13 }
+7 -18
pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
··· 30 substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \ 31 --replace "/usr/include" "/include" \ 32 --replace "/usr/local/include" "/include" \ 33 - --replace 'MIG=`' "# " \ 34 - --replace 'MIGCC=`' "# " \ 35 --replace " -o 0" "" \ 36 --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' 39 40 patchShebangs . 41 ''; ··· 47 cat > sdk/usr/local/libexec/availability.pl <<EOF 48 #!$SHELL 49 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 51 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 53 fi 54 EOF 55 chmod +x sdk/usr/local/libexec/availability.pl ··· 57 export SDKROOT_RESOLVED=$PWD/sdk 58 export HOST_SDKROOT_RESOLVED=$PWD/sdk 59 export PLATFORM=MacOSX 60 - export SDKVERSION=10.11 61 62 export CC=cc 63 export CXX=c++ ··· 88 make installhdrs 89 90 mv $out/usr/include $out 91 92 # TODO: figure out why I need to do this 93 cp libsyscall/wrappers/*.h $out/include 94 mkdir -p $out/include/os 95 cp libsyscall/os/tsd.h $out/include/os/tsd.h 96 cp EXTERNAL_HEADERS/AssertMacros.h $out/include 97 - cp EXTERNAL_HEADERS/Availability*.h $out/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ 98 99 # Build the mach headers we crave 100 export MIGCC=cc ··· 102 export SRCROOT=$PWD/libsyscall 103 export DERIVED_SOURCES_DIR=$out/include 104 export SDKROOT=$out 105 - export OBJROOT=$PWD 106 - export BUILT_PRODUCTS_DIR=$out 107 libsyscall/xcodescripts/mach_install_mig.sh 108 109 # Get rid of the System prefix 110 mv $out/System/* $out/ 111 - 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 120 # Add some symlinks 121 ln -s $out/Library/Frameworks/System.framework/Versions/B \
··· 30 substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \ 31 --replace "/usr/include" "/include" \ 32 --replace "/usr/local/include" "/include" \ 33 + --replace "MIG=" "# " \ 34 + --replace "MIGCC=" "# " \ 35 --replace " -o 0" "" \ 36 --replace '$SRC/$mig' '-I$DSTROOT/include $SRC/$mig' \ 37 + --replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs' 38 39 patchShebangs . 40 ''; ··· 46 cat > sdk/usr/local/libexec/availability.pl <<EOF 47 #!$SHELL 48 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 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 fi 53 EOF 54 chmod +x sdk/usr/local/libexec/availability.pl ··· 56 export SDKROOT_RESOLVED=$PWD/sdk 57 export HOST_SDKROOT_RESOLVED=$PWD/sdk 58 export PLATFORM=MacOSX 59 + export SDKVERSION=10.7 60 61 export CC=cc 62 export CXX=c++ ··· 87 make installhdrs 88 89 mv $out/usr/include $out 90 + rmdir $out/usr 91 92 # TODO: figure out why I need to do this 93 cp libsyscall/wrappers/*.h $out/include 94 mkdir -p $out/include/os 95 cp libsyscall/os/tsd.h $out/include/os/tsd.h 96 cp EXTERNAL_HEADERS/AssertMacros.h $out/include 97 98 # Build the mach headers we crave 99 export MIGCC=cc ··· 101 export SRCROOT=$PWD/libsyscall 102 export DERIVED_SOURCES_DIR=$out/include 103 export SDKROOT=$out 104 libsyscall/xcodescripts/mach_install_mig.sh 105 106 # Get rid of the System prefix 107 mv $out/System/* $out/ 108 109 # Add some symlinks 110 ln -s $out/Library/Frameworks/System.framework/Versions/B \
-32
pkgs/os-specific/darwin/swift-corefoundation/default.nix
··· 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 - }
···
+2 -2
pkgs/os-specific/linux/kernel/manual-config.nix
··· 93 echo "stripping FHS paths in \`$mf'..." 94 sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g' 95 done 96 - sed -i Makefile -e 's|= depmod|= ${kmod}/bin/depmod|' 97 ''; 98 99 configurePhase = '' ··· 188 find -empty -type d -delete 189 190 # Remove reference to kmod 191 - sed -i Makefile -e 's|= ${kmod}/bin/depmod|= depmod|' 192 '' else optionalString installsFirmware '' 193 make firmware_install $makeFlags "''${makeFlagsArray[@]}" \ 194 $installFlags "''${installFlagsArray[@]}"
··· 93 echo "stripping FHS paths in \`$mf'..." 94 sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g' 95 done 96 + sed -i Makefile -e 's|= depmod|= ${kmod}/sbin/depmod|' 97 ''; 98 99 configurePhase = '' ··· 188 find -empty -type d -delete 189 190 # Remove reference to kmod 191 + sed -i Makefile -e 's|= ${kmod}/sbin/depmod|= depmod|' 192 '' else optionalString installsFirmware '' 193 make firmware_install $makeFlags "''${makeFlagsArray[@]}" \ 194 $installFlags "''${installFlagsArray[@]}"
+1 -1
pkgs/os-specific/linux/kmod/aggregator.nix
··· 21 # kernel version number, otherwise depmod will use `uname -r'. 22 if test -w $out/lib/modules/$kernelVersion; then 23 rm -f $out/lib/modules/$kernelVersion/modules.* 24 - ${kmod}/bin/depmod -b $out -a $kernelVersion 25 fi 26 ''; 27 }
··· 21 # kernel version number, otherwise depmod will use `uname -r'. 22 if test -w $out/lib/modules/$kernelVersion; then 23 rm -f $out/lib/modules/$kernelVersion/modules.* 24 + ${kmod}/sbin/depmod -b $out -a $kernelVersion 25 fi 26 ''; 27 }
+9 -21
pkgs/os-specific/linux/kmod/default.nix
··· 1 - { stdenv, lib, fetchurl, autoreconfHook, xz, zlib, pkgconfig, libxslt }: 2 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"; 10 11 src = fetchurl { 12 url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz"; 13 sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"; 14 }; 15 16 - nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ]; 17 - buildInputs = [ xz /* zlib */ ]; 18 19 - configureFlags = [ 20 - "--sysconfdir=/etc" 21 - "--with-xz" 22 - "--with-modulesdirs=${modulesDirs}" 23 - # "--with-zlib" 24 - ]; 25 26 patches = [ ./module-dir.patch ]; 27 28 postInstall = '' 29 - for prog in rmmod insmod lsmod modinfo modprobe depmod; do 30 - ln -sv $out/bin/kmod $out/bin/$prog 31 done 32 - 33 - # Backwards compatibility 34 - ln -s bin $out/sbin 35 ''; 36 37 meta = {
··· 1 + { stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }: 2 3 + stdenv.mkDerivation rec { 4 + name = "kmod-22"; 5 6 src = fetchurl { 7 url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz"; 8 sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"; 9 }; 10 11 + buildInputs = [ pkgconfig libxslt xz /* zlib */ ]; 12 13 + configureFlags = [ "--sysconfdir=/etc" "--with-xz" /* "--with-zlib" */ ]; 14 15 patches = [ ./module-dir.patch ]; 16 17 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 22 done 23 ''; 24 25 meta = {
+27 -124
pkgs/os-specific/linux/kmod/module-dir.patch
··· 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 - 44 static char *get_kernel_release(const char *dirname) 45 { 46 struct utsname u; ··· 49 50 if (dirname != NULL) 51 return path_make_absolute_cwd(dirname); 52 - @@ -219,8 +222,42 @@ static char *get_kernel_release(const char *dirname) 53 if (uname(&u) < 0) 54 return NULL; 55 56 - 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]; 64 - + 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 - + } 94 95 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"; 122 FILE *in = NULL, *out = NULL; 123 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 - } 127 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; 134 goto finish; 135 } 136 - - 137 - 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); 144 in = fopen(modules, "re"); 145 if (in == NULL) { 146 if (errno == ENOENT) { 147 - fprintf(stderr, "Warning: /lib/modules/%s/modules.devname not found - ignoring\n", 148 - kernel.release); 149 - + fprintf(stderr, "Warning: %s not found - ignoring\n", modules); 150 ret = EXIT_SUCCESS; 151 } else { 152 - fprintf(stderr, "Error: could not open /lib/modules/%s/modules.devname - %m\n", 153 - kernel.release); 154 - + fprintf(stderr, "Error: could not open %s - %m\n", modules); 155 ret = EXIT_FAILURE; 156 } 157 goto finish;
··· 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 @@ 5 static char *get_kernel_release(const char *dirname) 6 { 7 struct utsname u; ··· 10 11 if (dirname != NULL) 12 return path_make_absolute_cwd(dirname); 13 + @@ -209,7 +209,10 @@ 14 if (uname(&u) < 0) 15 return NULL; 16 17 - 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; 20 + 21 + + if (asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0) 22 + return NULL; 23 24 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 @@ 29 FILE *in = NULL, *out = NULL; 30 const struct static_nodes_format *format = &static_nodes_format_human; 31 + int r, ret = EXIT_SUCCESS; 32 + + char *dirname_prefix; 33 34 + for (;;) { 35 + int c, idx = 0, valid; 36 + @@ -211,16 +212,19 @@ 37 goto finish; 38 } 39 + 40 - 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); 45 in = fopen(modules, "re"); 46 if (in == NULL) { 47 if (errno == ENOENT) { 48 - fprintf(stderr, "Warning: /lib/modules/%s/modules.devname not found - ignoring\n", 49 - kernel.release); 50 + + fprintf(stderr, "Warning: %s/%s/modules.devname not found - ignoring\n", 51 + + dirname_prefix, kernel.release); 52 ret = EXIT_SUCCESS; 53 } else { 54 - fprintf(stderr, "Error: could not open /lib/modules/%s/modules.devname - %m\n", 55 - kernel.release); 56 + + fprintf(stderr, "Error: could not open %s/%s/modules.devname - %m\n", 57 + + dirname_prefix, kernel.release); 58 ret = EXIT_FAILURE; 59 } 60 goto finish;
+2 -1
pkgs/stdenv/darwin/make-bootstrap-tools.nix
··· 27 # C standard library stuff 28 cp -d ${darwin.Libsystem}/lib/*.o $out/lib/ 29 cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/ 30 31 # Resolv is actually a link to another package, so let's copy it properly 32 rm $out/lib/libresolv.9.dylib ··· 90 cp -d ${xz.out}/lib/liblzma*.* $out/lib 91 92 # Copy binutils. 93 - for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do 94 cp ${darwin.cctools}/bin/$i $out/bin 95 done 96
··· 27 # C standard library stuff 28 cp -d ${darwin.Libsystem}/lib/*.o $out/lib/ 29 cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/ 30 + cp -d ${darwin.Libsystem}/lib/system/*.dylib $out/lib/ 31 32 # Resolv is actually a link to another package, so let's copy it properly 33 rm $out/lib/libresolv.9.dylib ··· 91 cp -d ${xz.out}/lib/liblzma*.* $out/lib 92 93 # Copy binutils. 94 + for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do 95 cp ${darwin.cctools}/bin/$i $out/bin 96 done 97
+1 -7
pkgs/tools/networking/network-manager/0.9.8/default.nix
··· 1 { stdenv, fetchurl, intltool, pkgconfig, dbus_glib 2 , udev, libnl, libuuid, gnutls, dhcp 3 - , libgcrypt, perl, libgudev, avahi, ppp, kmod }: 4 5 stdenv.mkDerivation rec { 6 name = "network-manager-${version}"; ··· 13 14 preConfigure = '' 15 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} 22 ''; 23 24 # Right now we hardcode quite a few paths at build time. Probably we should
··· 1 { stdenv, fetchurl, intltool, pkgconfig, dbus_glib 2 , udev, libnl, libuuid, gnutls, dhcp 3 + , libgcrypt, perl, libgudev }: 4 5 stdenv.mkDerivation rec { 6 name = "network-manager-${version}"; ··· 13 14 preConfigure = '' 15 substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl 16 ''; 17 18 # Right now we hardcode quite a few paths at build time. Probably we should
+2 -2
pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch
··· 47 48 for (iter = modules; *iter; iter++) { 49 - char *argv[3] = { "/sbin/modprobe", *iter, NULL }; 50 - + char *argv[3] = { "@kmod@/bin/modprobe", *iter, NULL }; 51 char *envp[1] = { NULL }; 52 GError *error = NULL; 53 ··· 71 /* Make sure /dev/ppp exists (bgo #533064) */ 72 if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode)) 73 - ignored = system ("/sbin/modprobe ppp_generic"); 74 - + ignored = system ("@kmod@/bin/modprobe ppp_generic"); 75 76 connection = nm_act_request_get_connection (req); 77 g_assert (connection);
··· 47 48 for (iter = modules; *iter; iter++) { 49 - char *argv[3] = { "/sbin/modprobe", *iter, NULL }; 50 + + char *argv[3] = { "/var/run/current-system/sw/bin/modprobe", *iter, NULL }; 51 char *envp[1] = { NULL }; 52 GError *error = NULL; 53 ··· 71 /* Make sure /dev/ppp exists (bgo #533064) */ 72 if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode)) 73 - ignored = system ("/sbin/modprobe ppp_generic"); 74 + + ignored = system ("/var/run/current-system/sw/bin/modprobe ppp_generic"); 75 76 connection = nm_act_request_get_connection (req); 77 g_assert (connection);
+2 -2
pkgs/tools/networking/network-manager/default.nix
··· 2 , systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables 3 , libgcrypt, dnsmasq, bluez5, readline 4 , gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup 5 - , ethtool, gnused, coreutils, file, inetutils, kmod }: 6 7 stdenv.mkDerivation rec { 8 name = "network-manager-${version}"; ··· 19 substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname 20 substituteInPlace configure --replace /usr/bin/file ${file}/bin/file 21 substituteInPlace src/devices/nm-device.c --replace /usr/bin/ping ${inetutils}/bin/ping 22 - substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe 23 substituteInPlace data/84-nm-drivers.rules \ 24 --replace /bin/sh ${stdenv.shell} 25 substituteInPlace data/85-nm-unmanaged.rules \
··· 2 , systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables 3 , libgcrypt, dnsmasq, bluez5, readline 4 , gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup 5 + , ethtool, gnused, coreutils, file, inetutils }: 6 7 stdenv.mkDerivation rec { 8 name = "network-manager-${version}"; ··· 19 substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname 20 substituteInPlace configure --replace /usr/bin/file ${file}/bin/file 21 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 23 substituteInPlace data/84-nm-drivers.rules \ 24 --replace /bin/sh ${stdenv.shell} 25 substituteInPlace data/85-nm-unmanaged.rules \
+3 -3
pkgs/tools/networking/network-manager/openconnect.nix
··· 23 24 preConfigure = '' 25 substituteInPlace "configure" \ 26 - --replace "/sbin/sysctl" "${procps}/bin/sysctl" 27 substituteInPlace "src/nm-openconnect-service.c" \ 28 - --replace "/usr/sbin/openconnect" "${openconnect}/bin/openconnect" \ 29 - --replace "/sbin/modprobe" "${kmod}/bin/modprobe" 30 ''; 31 32 meta = {
··· 23 24 preConfigure = '' 25 substituteInPlace "configure" \ 26 + --replace "/sbin/sysctl" "${procps}/sbin/sysctl" 27 substituteInPlace "src/nm-openconnect-service.c" \ 28 + --replace "/usr/sbin/openconnect" "${openconnect}/sbin/openconnect" \ 29 + --replace "/sbin/modprobe" "${kmod}/sbin/modprobe" 30 ''; 31 32 meta = {
+3 -3
pkgs/tools/networking/network-manager/openvpn.nix
··· 27 substituteInPlace "configure" \ 28 --replace "/sbin/sysctl" "${procps}/sbin/sysctl" 29 substituteInPlace "src/nm-openvpn-service.c" \ 30 - --replace "/sbin/openvpn" "${openvpn}/bin/openvpn" \ 31 - --replace "/sbin/modprobe" "${kmod}/bin/modprobe" 32 substituteInPlace "properties/auth-helpers.c" \ 33 - --replace "/sbin/openvpn" "${openvpn}/bin/openvpn" 34 ''; 35 36 meta = {
··· 27 substituteInPlace "configure" \ 28 --replace "/sbin/sysctl" "${procps}/sbin/sysctl" 29 substituteInPlace "src/nm-openvpn-service.c" \ 30 + --replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" \ 31 + --replace "/sbin/modprobe" "${kmod}/sbin/modprobe" 32 substituteInPlace "properties/auth-helpers.c" \ 33 + --replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" 34 ''; 35 36 meta = {
+3 -3
pkgs/tools/networking/network-manager/vpnc.nix
··· 24 25 preConfigure = '' 26 substituteInPlace "configure" \ 27 - --replace "/sbin/sysctl" "${procps}/bin/sysctl" 28 substituteInPlace "src/nm-vpnc-service.c" \ 29 - --replace "/sbin/vpnc" "${vpnc}/bin/vpnc" \ 30 - --replace "/sbin/modprobe" "${kmod}/bin/modprobe" 31 ''; 32 33 meta = {
··· 24 25 preConfigure = '' 26 substituteInPlace "configure" \ 27 + --replace "/sbin/sysctl" "${procps}/sbin/sysctl" 28 substituteInPlace "src/nm-vpnc-service.c" \ 29 + --replace "/sbin/vpnc" "${vpnc}/sbin/vpnc" \ 30 + --replace "/sbin/modprobe" "${kmod}/sbin/modprobe" 31 ''; 32 33 meta = {
+2 -2
pkgs/tools/text/diffutils/default.nix
··· 1 { stdenv, fetchurl, xz, coreutils ? null }: 2 3 stdenv.mkDerivation rec { 4 - name = "diffutils-3.4"; 5 6 src = fetchurl { 7 url = "mirror://gnu/diffutils/${name}.tar.xz"; 8 - sha256 = "1qlw328qpbss07zrb14ls0rhnhbvxrnssgbmrxxj2gdcy8jw0lyv"; 9 }; 10 11 outputs = [ "out" "info" ];
··· 1 { stdenv, fetchurl, xz, coreutils ? null }: 2 3 stdenv.mkDerivation rec { 4 + name = "diffutils-3.3"; 5 6 src = fetchurl { 7 url = "mirror://gnu/diffutils/${name}.tar.xz"; 8 + sha256 = "1761vymxbp4wb5rzjvabhdkskk95pghnn67464byvzb5mfl8jpm2"; 9 }; 10 11 outputs = [ "out" "info" ];
-2
pkgs/top-level/all-packages.nix
··· 10832 10833 opencflite = callPackage ../os-specific/darwin/opencflite {}; 10834 10835 - swift-corefoundation = callPackage ../os-specific/darwin/swift-corefoundation {}; 10836 - 10837 xcode = callPackage ../os-specific/darwin/xcode {}; 10838 10839 osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};
··· 10832 10833 opencflite = callPackage ../os-specific/darwin/opencflite {}; 10834 10835 xcode = callPackage ../os-specific/darwin/xcode {}; 10836 10837 osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};