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