Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs

+363 -299
+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 = "${config.system.sbin.modprobe}/sbin/modprobe"; 11 + modprobe = "${pkgs.kmod}/bin/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/"; 79 78 }; 80 79 }; 81 80 }
-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 40 39 ${pkgs.kmod}/bin/modprobe -v facetimehd 41 40 ''; 42 41
-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/"; 77 75 }; 78 76 79 77 tlp-sleep = { ··· 92 90 ExecStart = "${tlp}/bin/tlp suspend"; 93 91 ExecStop = "${tlp}/bin/tlp resume"; 94 92 }; 95 - 96 - environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; 97 93 }; 98 94 }; 99 95
+2 -3
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 \"${config.system.sbin.modprobe}/sbin/modprobe \ 61 + --replace \"/sbin/modprobe \"${pkgs.kmod}/bin/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 - { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; 320 - restartTriggers = cfg.packages; 319 + { restartTriggers = cfg.packages; 321 320 }; 322 321 323 322 };
+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}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true 83 + ${pkgs.kmod}/bin/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 = "${config.system.sbin.modprobe}/sbin/modprobe"; 8 + modprobe = "${pkgs.kmod}/bin/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; [ config.system.sbin.modprobe iproute iptables utillinux ]; # XXX Linux 121 + path = with pkgs; [ kmod 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"; 232 231 serviceConfig = 233 232 { # Ignore failed module loads. Typically some of the 234 233 # modules in ‘boot.kernelModules’ are "nice to have but ··· 236 235 # barf on those. 237 236 SuccessExitStatus = "0 1"; 238 237 }; 239 - }; 240 - 241 - systemd.services.kmod-static-nodes = 242 - { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; 243 238 }; 244 239 245 240 lib.kernelConfig = {
+2 -39
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 - 46 11 boot.blacklistedKernelModules = mkOption { 47 12 type = types.listOf types.str; 48 13 default = []; ··· 87 52 ''; 88 53 environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; 89 54 90 - environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; 55 + environment.systemPackages = [ pkgs.kmod ]; 91 56 92 57 system.activationScripts.modprobe = 93 58 '' ··· 95 60 # in the right location in the Nix store for kernel modules). 96 61 # We need this when the kernel (or some module) auto-loads a 97 62 # module. 98 - echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe 63 + echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe 99 64 ''; 100 - 101 - environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; 102 65 103 66 }; 104 67
-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 \ 211 210 LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ 212 211 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 config.system.sbin.modprobe ]; 41 + path = [ cpupower pkgs.kmod ]; 42 42 unitConfig.ConditionVirtualization = false; 43 43 serviceConfig = { 44 44 Type = "oneshot";
+1 -2
nixos/modules/virtualisation/docker.nix
··· 95 95 LimitNPROC = 1048576; 96 96 } // proxy_env; 97 97 98 - path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); 99 - environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; 98 + path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); 100 99 101 100 postStart = if cfg.socketActivation then "" else cfg.postStart; 102 101
+13 -13
nixos/modules/virtualisation/qemu-vm.nix
··· 135 135 } 136 136 '' 137 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 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 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}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true 155 - ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true 156 - ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true 157 - ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true 158 - ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true 154 + ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true 155 + ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true 156 + ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true 157 + ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true 158 + ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true 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}/sbin/mke2fs 373 + copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs 374 374 ''; 375 375 376 376 boot.initrd.postDeviceCommands =
+6 -16
pkgs/development/libraries/fftw/default.nix
··· 1 - { fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }: 1 + { fetchurl, stdenv, lib, 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-rc1"; in 7 + let version = "3.3.5"; in 8 8 9 9 stdenv.mkDerivation rec { 10 10 name = "fftw-${precision}-${version}"; 11 11 12 - src = fetchFromGitHub { 13 - owner = "FFTW"; 14 - repo = "fftw3"; 15 - rev = "fftw-${version}"; 16 - sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4"; 12 + src = fetchurl { 13 + url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"; 14 + sha256 = "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"; 17 15 }; 18 16 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 17 outputs = [ "dev" "out" "doc" ]; # it's dev-doc only 27 18 outputBin = "dev"; # fftw-wisdom 28 19 29 20 configureFlags = 30 - [ "--enable-maintainer-mode" 31 - "--enable-shared" "--disable-static" 21 + [ "--enable-shared" "--disable-static" 32 22 "--enable-threads" 33 23 ] 34 24 ++ 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.68"; 4 + name = "libdrm-2.4.70"; 5 5 6 6 src = fetchurl { 7 7 url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; 8 - sha256 = "5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df"; 8 + sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b"; 9 9 }; 10 10 11 11 outputs = [ "dev" "out" ];
+63 -62
pkgs/development/libraries/mesa/default.nix
··· 1 - { stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook, substituteAll 2 - , file, expat, libdrm, xorg, wayland, libudev, llvmPackages, libffi, libomxil-bellagio 3 - , libvdpau, libelf, libva 4 - , grsecEnabled 1 + { stdenv, fetchurl, fetchpatch 2 + , pkgconfig, intltool, autoreconfHook, substituteAll 3 + , file, expat, libdrm, xorg, wayland, libudev 4 + , llvmPackages, libffi, libomxil-bellagio, libva 5 + , libelf, libvdpau, python 6 + , grsecEnabled ? false 5 7 , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt 6 8 }: 7 9 8 - if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then 9 - throw "unsupported platform for Mesa" 10 - else 11 10 12 11 /** Packaging design: 13 12 - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now). ··· 20 19 - libOSMesa is in $osmesa (~4 MB) 21 20 */ 22 21 23 - with { inherit (stdenv.lib) optional optionalString; }; 22 + with stdenv.lib; 23 + 24 + if ! lists.elem stdenv.system platforms.mesaPlatforms then 25 + throw "unsupported platform for Mesa" 26 + else 24 27 25 28 let 26 - version = "11.2.2"; 27 - # this is the default search path for DRI drivers 29 + version = "12.0.1"; 30 + branch = head (splitString "." version); 28 31 driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; 29 32 in 30 33 ··· 34 37 src = fetchurl { 35 38 urls = [ 36 39 "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" 37 - (with stdenv.lib; ''ftp://ftp.freedesktop.org/pub/mesa/older-versions/'' 38 - + head (splitString "." version) + ''.x/${version}/mesa-${version}.tar.xz'') 40 + "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" 39 41 "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" 40 42 ]; 41 - sha256 = "40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4"; 43 + sha256 = "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms"; 42 44 }; 43 45 44 46 prePatch = "patchShebangs ."; 45 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 46 51 patches = [ 47 52 ./glx_ro_text_segm.patch # fix for grsecurity/PaX 48 53 ./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 54 ] ++ optional stdenv.isLinux 52 55 (substituteAll { 53 56 src = ./dlopen-absolute-paths.diff; ··· 61 64 62 65 outputs = [ "dev" "out" "drivers" "osmesa" ]; 63 66 67 + # TODO: Figure out how to enable opencl without having a runtime dependency on clang 64 68 configureFlags = [ 65 69 "--sysconfdir=/etc" 66 70 "--localstatedir=/var" 67 71 "--with-dri-driverdir=$(drivers)/lib/dri" 68 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") 69 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" 70 85 "--enable-gles1" 71 86 "--enable-gles2" 72 - "--enable-dri" 73 - ] ++ optional stdenv.isLinux "--enable-dri3" 74 - ++ [ 75 87 "--enable-glx" 88 + "--enable-glx-tls" 76 89 "--enable-gallium-osmesa" # used by wine 90 + "--enable-gallium-llvm" 77 91 "--enable-egl" 78 92 "--enable-xa" # used in vmware driver 79 93 "--enable-gbm" 80 - ] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine 81 - ++ [ 82 94 "--enable-xvmc" 83 95 "--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 96 "--enable-shared-glapi" 94 97 "--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 98 "--enable-llvm-shared-libs" 104 - ] ++ optional enableTextureFloats "--enable-texture-float" 105 - ++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec 99 + "--enable-omx" 100 + "--enable-va" 101 + "--disable-opencl" 102 + ]; 106 103 107 104 nativeBuildInputs = [ pkgconfig file ]; 108 105 109 - propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ] 106 + propagatedBuildInputs = with xorg; 107 + [ libXdamage libXxf86vm ] 110 108 ++ optional stdenv.isLinux libdrm; 111 109 112 110 buildInputs = with xorg; [ 113 111 autoreconfHook intltool expat llvmPackages.llvm 114 112 glproto dri2proto dri3proto presentproto 115 113 libX11 libXext libxcb libXt libXfixes libxshmfence 116 - libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */ 114 + libffi wayland libvdpau libelf libXvMC 115 + libomxil-bellagio libva libpthreadstubs 116 + (python.withPackages (ps: [ ps.Mako ])) 117 117 ] ++ optional stdenv.isLinux libudev; 118 + 118 119 119 120 enableParallelBuilding = true; 120 121 doCheck = false; ··· 124 125 "localstatedir=\${TMPDIR}" 125 126 ]; 126 127 127 - # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM; 128 - # also move libOSMesa to $osmesa, as it's relatively big 129 - # ToDo: probably not all .la files are completely fixed, but it shouldn't matter 130 - postInstall = with stdenv.lib; '' 131 - mv -t "$drivers/lib/" \ 132 - $out/lib/libXvMC* \ 133 - $out/lib/d3d \ 134 - $out/lib/vdpau \ 135 - $out/lib/libxatracker* 128 + # TODO: probably not all .la files are completely fixed, but it shouldn't matter; 129 + postInstall = '' 130 + # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM 131 + mv -t "$drivers/lib/" \ 132 + $out/lib/libXvMC* \ 133 + $out/lib/d3d \ 134 + $out/lib/vdpau \ 135 + $out/lib/bellagio \ 136 + $out/lib/libxatracker* \ 136 137 138 + mv $out/lib/dri/* $drivers/lib/dri 139 + 140 + # move libOSMesa to $osmesa, as it's relatively big 137 141 mkdir -p {$osmesa,$drivers}/lib/ 138 - mv -t $osmesa/lib/ \ 139 - $out/lib/libOSMesa* 142 + mv -t $osmesa/lib/ $out/lib/libOSMesa* 140 143 141 - '' + /* now fix references in .la files */ '' 142 - sed "/^libdir=/s,$out,$osmesa," -i \ 143 - $osmesa/lib/libOSMesa*.la 144 + # now fix references in .la files 145 + sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la 144 146 145 - '' + /* set the default search path for DRI drivers; used e.g. by X server */ '' 147 + # set the default search path for DRI drivers; used e.g. by X server 146 148 substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" 147 149 ''; 148 - #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */ 149 150 150 - postFixup = 151 + # TODO: 152 + # @vcunat isn't sure if drirc will be found when in $out/etc/; 153 + # check $out doesn't depend on llvm: builder failures are ignored 154 + # for some reason grep -qv '${llvmPackages.llvm}' -R "$out"; 155 + postFixup = '' 151 156 # add RPATH so the drivers can find the moved libgallium and libdricore9 152 157 # moved here to avoid problems with stripping patchelfed files 153 - '' 154 158 for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do 155 159 if [[ ! -L "$lib" ]]; then 156 160 patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" 157 161 fi 158 162 done 159 163 ''; 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 164 165 passthru = { inherit libdrm version driverLink; }; 165 166
+2
pkgs/development/python-modules/generic/run_setup.py
··· 1 + # -*- coding: utf-8 -*- 2 + 1 3 import setuptools 2 4 import tokenize 3 5
+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}/sbin/modprobe|g" \ 14 + sed -e "s|/sbin/modprobe|${kmod}/bin/modprobe|g" \ 15 15 -i src/bin/lttng-sessiond/modprobe.c 16 16 ''; 17 17
+3 -1
pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix
··· 1 - { stdenv, appleDerivation, ed, unifdef, Libc_old }: 1 + { stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }: 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 15 17 16 18 # Ugh Apple stopped releasing this stuff so we need an older one... 17 19 cp ${Libc_old}/include/spawn.h $out/include
+5 -64
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
··· 5 5 appleDerivation rec { 6 6 phases = [ "unpackPhase" "installPhase" ]; 7 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 - ]; 8 + buildInputs = [ cpio ]; 44 9 45 10 installPhase = '' 46 11 export NIX_ENFORCE_PURITY= ··· 54 19 55 20 for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \ 56 21 ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ 57 - ${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do 22 + ${Libnotify} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do 58 23 (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) 59 24 done 60 25 ··· 91 56 # The startup object files 92 57 cp ${Csu}/lib/* $out/lib 93 58 94 - # selectively re-export functions from libsystem_c and libsystem_kernel 95 - # to provide a consistent interface across OSX verions 96 - mkdir -p $out/lib/system 97 - ld -macosx_version_min 10.7 -arch x86_64 -dylib \ 98 - -o $out/lib/system/libsystem_c.dylib \ 99 - /usr/lib/libSystem.dylib \ 100 - -reexported_symbols_list ${./system_c_symbols} 101 - 102 - ld -macosx_version_min 10.7 -arch x86_64 -dylib \ 103 - -o $out/lib/system/libsystem_kernel.dylib \ 104 - /usr/lib/libSystem.dylib \ 105 - -reexported_symbols_list ${./system_kernel_symbols} 106 - 107 - # Set up the actual library link 108 - clang -c -o CompatibilityHacks.o -Os CompatibilityHacks.c 109 - clang -c -o init.o -Os init.c 110 - ld -macosx_version_min 10.7 \ 111 - -arch x86_64 \ 112 - -dylib \ 113 - -o $out/lib/libSystem.dylib \ 114 - CompatibilityHacks.o init.o \ 115 - -compatibility_version 1.0 \ 116 - -current_version 1197.1.1 \ 117 - -reexport_library $out/lib/system/libsystem_c.dylib \ 118 - -reexport_library $out/lib/system/libsystem_kernel.dylib \ 119 - ${stdenv.lib.concatStringsSep " " 120 - (map (l: "-reexport_library /usr/lib/system/lib${l}.dylib") systemlibs)} 59 + # OMG impurity 60 + ln -s /usr/lib/libSystem.B.dylib $out/lib/libSystem.B.dylib 61 + ln -s /usr/lib/libSystem.dylib $out/lib/libSystem.dylib 121 62 122 63 # Set up links to pretend we work like a conventional unix (Apple's design, not mine!) 123 64 for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
+10 -5
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 xnu ppp IOKit eap8021x ]; 6 + buildInputs = [ launchd bootstrap_cmds 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 + 15 20 substituteInPlace SystemConfiguration.fproj/SCNetworkReachabilityInternal.h \ 16 21 --replace '#include <xpc/xpc.h>' "" 17 22 ··· 172 177 cc -I. -Ihelper -Iderived -F. -c DHCP.c -o DHCP.o 173 178 cc -I. -Ihelper -Iderived -F. -c moh.c -o moh.o 174 179 cc -I. -Ihelper -Iderived -F. -c DeviceOnHold.c -o DeviceOnHold.o 175 - cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c LinkConfiguration.c -o LinkConfiguration.o 180 + cc -I. -Ihelper -Iderived -I $HACK -F. -c LinkConfiguration.c -o LinkConfiguration.o 176 181 cc -I. -Ihelper -Iderived -F. -c dy_framework.c -o dy_framework.o 177 - cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c VLANConfiguration.c -o VLANConfiguration.o 182 + cc -I. -Ihelper -Iderived -I $HACK -F. -c VLANConfiguration.c -o VLANConfiguration.o 178 183 cc -I. -Ihelper -Iderived -F. -c derived/configUser.c -o configUser.o 179 184 cc -I. -Ihelper -Iderived -F. -c SCPreferencesPathKey.c -o SCPreferencesPathKey.o 180 185 cc -I. -Ihelper -Iderived -I../dnsinfo -F. -c derived/shared_dns_infoUser.c -o shared_dns_infoUser.o ··· 183 188 cc -I. -Ihelper -Iderived -F. -c SCNetworkProtocol.c -o SCNetworkProtocol.o 184 189 cc -I. -Ihelper -Iderived -F. -c SCNetworkService.c -o SCNetworkService.o 185 190 cc -I. -Ihelper -Iderived -F. -c SCNetworkSet.c -o SCNetworkSet.o 186 - cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BondConfiguration.c -o BondConfiguration.o 187 - cc -I. -Ihelper -Iderived -I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders -F. -c BridgeConfiguration.c -o BridgeConfiguration.o 191 + cc -I. -Ihelper -Iderived -I $HACK -F. -c BondConfiguration.c -o BondConfiguration.o 192 + cc -I. -Ihelper -Iderived -I $HACK -F. -c BridgeConfiguration.c -o BridgeConfiguration.o 188 193 cc -I. -Ihelper -Iderived -F. -c helper/SCHelper_client.c -o SCHelper_client.o 189 194 cc -I. -Ihelper -Iderived -F. -c SCPreferencesKeychainPrivate.c -o SCPreferencesKeychainPrivate.o 190 195 cc -I. -Ihelper -Iderived -F. -c SCNetworkSignature.c -o SCNetworkSignature.o
+17 -8
pkgs/os-specific/darwin/apple-source-releases/default.nix
··· 1 - { stdenv, fetchurl, pkgs }: 1 + { stdenv, fetchurl, fetchzip, 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.2" = { 10 - dtrace = "168"; 11 - xnu = "3248.20.55"; 9 + "osx-10.11.6" = { 10 + dtrace = "168"; 11 + xnu = "3248.60.10"; 12 + libpthread = "138.10.4"; 13 + }; 14 + "osx-10.11.5" = { 15 + Libc = "1082.50.1"; # 10.11.6 still unreleased :/ 12 16 }; 13 17 "osx-10.10.5" = { 14 18 adv_cmds = "158"; ··· 185 189 CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {}; 186 190 Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {}; 187 191 dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {}; 188 - dtracen = applePackage "dtrace" "osx-10.11.2" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; 192 + dtracen = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; 189 193 dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {}; 190 194 eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {}; 191 195 IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; }; 192 196 launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {}; 193 197 libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {}; 194 - Libc = applePackage "Libc" "osx-10.9.5" "1jz5bx9l4q484vn28c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {}; 198 + Libc = applePackage "Libc" "osx-10.11.5" "1qv7r0dgz06jy9i5agbqzxgdibb0m8ylki6g5n5pary88lzrawfd" { 199 + Libc_10-9 = fetchzip { 200 + url = "http://www.opensource.apple.com/tarballs/Libc/Libc-997.90.3.tar.gz"; 201 + sha256 = "1xchgxkxg5288r2b9yfrqji2gsgdap92k4wx2dbjwslixws12pq7"; 202 + }; 203 + }; 195 204 Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {}; 196 205 libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {}; 197 206 libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {}; ··· 199 208 Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {}; 200 209 Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {}; 201 210 Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {}; 202 - libpthread = applePackage "libpthread" "osx-10.10.5" "1p2y6xvsfqyakivr6d48fgrd163b5m9r045cxyfwrf8w0r33nfn3" {}; 211 + libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {}; 203 212 libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {}; 204 213 Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {}; 205 214 libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {}; ··· 209 218 ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {}; 210 219 removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {}; 211 220 Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; 212 - xnu = applePackage "xnu" "osx-10.9.5" "1ssw5fzvgix20bw6y13c39ib0zs7ykpig3irlwbaccpjpci5jl0s" {}; 221 + xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {}; 213 222 214 223 # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions 215 224 # here so we can work on them.
+8 -2
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 9 + mkdir -p $out/include/pthread/ 10 + mkdir -p $out/include/sys/_types 10 11 cp pthread/*.h $out/include/pthread/ 11 - cp private/*.h $out/include/pthread/ 12 + 13 + # This overwrites qos.h, and is probably not necessary, but I'll leave it here for now 14 + # cp private/*.h $out/include/pthread/ 15 + 16 + cp -r sys $out/include 17 + cp -r sys/_pthread/*.h $out/include/sys/_types/ 12 18 ''; 13 19 }
+18 -7
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' 37 + --replace '$SRC/servers/netname.defs' '-I$DSTROOT/include $SRC/servers/netname.defs' \ 38 + --replace '$BUILT_PRODUCTS_DIR/mig_hdr' '$BUILT_PRODUCTS_DIR' 38 39 39 40 patchShebangs . 40 41 ''; ··· 46 47 cat > sdk/usr/local/libexec/availability.pl <<EOF 47 48 #!$SHELL 48 49 if [ "\$1" == "--macosx" ]; then 49 - echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 50 + echo 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 50 51 elif [ "\$1" == "--ios" ]; then 51 - echo 2.0 2.1 2.2 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 5.1 6.0 6.1 7.0 52 + echo 2.0 2.1 2.2 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 5.1 6.0 6.1 7.0 8.0 9.0 52 53 fi 53 54 EOF 54 55 chmod +x sdk/usr/local/libexec/availability.pl ··· 56 57 export SDKROOT_RESOLVED=$PWD/sdk 57 58 export HOST_SDKROOT_RESOLVED=$PWD/sdk 58 59 export PLATFORM=MacOSX 59 - export SDKVERSION=10.7 60 + export SDKVERSION=10.11 60 61 61 62 export CC=cc 62 63 export CXX=c++ ··· 87 88 make installhdrs 88 89 89 90 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/ 97 98 98 99 # Build the mach headers we crave 99 100 export MIGCC=cc ··· 101 102 export SRCROOT=$PWD/libsyscall 102 103 export DERIVED_SOURCES_DIR=$out/include 103 104 export SDKROOT=$out 105 + export OBJROOT=$PWD 106 + export BUILT_PRODUCTS_DIR=$out 104 107 libsyscall/xcodescripts/mach_install_mig.sh 105 108 106 109 # Get rid of the System prefix 107 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 108 119 109 120 # Add some symlinks 110 121 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}/sbin/depmod|' 96 + sed -i Makefile -e 's|= depmod|= ${kmod}/bin/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}/sbin/depmod|= depmod|' 191 + sed -i Makefile -e 's|= ${kmod}/bin/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}/sbin/depmod -b $out -a $kernelVersion 24 + ${kmod}/bin/depmod -b $out -a $kernelVersion 25 25 fi 26 26 ''; 27 27 }
+21 -9
pkgs/os-specific/linux/kmod/default.nix
··· 1 - { stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }: 1 + { stdenv, lib, fetchurl, autoreconfHook, xz, zlib, pkgconfig, libxslt }: 2 2 3 - stdenv.mkDerivation rec { 4 - name = "kmod-22"; 3 + let 4 + systems = [ "current-system" "booted-system" ]; 5 + modulesDirs = lib.concatMapStringsSep ":" (x: "/run/${x}/kernel-modules/lib/modules") systems; 6 + 7 + in stdenv.mkDerivation rec { 8 + name = "kmod-${version}"; 9 + version = "22"; 5 10 6 11 src = fetchurl { 7 12 url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz"; 8 13 sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"; 9 14 }; 10 15 11 - buildInputs = [ pkgconfig libxslt xz /* zlib */ ]; 16 + nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ]; 17 + buildInputs = [ xz /* zlib */ ]; 12 18 13 - configureFlags = [ "--sysconfdir=/etc" "--with-xz" /* "--with-zlib" */ ]; 19 + configureFlags = [ 20 + "--sysconfdir=/etc" 21 + "--with-xz" 22 + "--with-modulesdirs=${modulesDirs}" 23 + # "--with-zlib" 24 + ]; 14 25 15 26 patches = [ ./module-dir.patch ]; 16 27 17 28 postInstall = '' 18 - ln -s kmod $out/bin/lsmod 19 - mkdir -p $out/sbin 20 - for prog in rmmod insmod modinfo modprobe depmod; do 21 - ln -sv $out/bin/kmod $out/sbin/$prog 29 + for prog in rmmod insmod lsmod modinfo modprobe depmod; do 30 + ln -sv $out/bin/kmod $out/bin/$prog 22 31 done 32 + 33 + # Backwards compatibility 34 + ln -s bin $out/sbin 23 35 ''; 24 36 25 37 meta = {
+124 -27
pkgs/os-specific/linux/kmod/module-dir.patch
··· 1 - diff -ru -x '*~' kmod-17-orig/libkmod/libkmod.c kmod-17/libkmod/libkmod.c 2 - --- kmod-17-orig/libkmod/libkmod.c 2014-04-01 12:40:37.161940089 +0200 3 - +++ kmod-17/libkmod/libkmod.c 2014-04-17 13:47:15.871441987 +0200 4 - @@ -201,7 +201,7 @@ 1 + diff --git a/Makefile.am b/Makefile.am 2 + index d4eeb7e..5c9f603 100644 3 + --- a/Makefile.am 4 + +++ b/Makefile.am 5 + @@ -19,6 +19,7 @@ AM_CPPFLAGS = \ 6 + -include $(top_builddir)/config.h \ 7 + -I$(top_srcdir) \ 8 + -DSYSCONFDIR=\""$(sysconfdir)"\" \ 9 + + -DMODULESDIRS=\""$(shell echo $(modulesdirs) | $(SED) 's|:|\\",\\"|g')"\" \ 10 + ${zlib_CFLAGS} 11 + 12 + AM_CFLAGS = $(OUR_CFLAGS) 13 + diff --git a/configure.ac b/configure.ac 14 + index 23510c8..66490cf 100644 15 + --- a/configure.ac 16 + +++ b/configure.ac 17 + @@ -202,6 +202,12 @@ GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) 18 + ], [ 19 + AM_CONDITIONAL([ENABLE_GTK_DOC], false)]) 20 + 21 + +AC_ARG_WITH([modulesdirs], 22 + + AS_HELP_STRING([--with-modulesdirs=DIRS], [Kernel modules directories, separated by :]), 23 + + [], 24 + + [with_modulesdirs=/lib/modules]) 25 + +AC_SUBST([modulesdirs], [$with_modulesdirs]) 26 + + 27 + 28 + ##################################################################### 29 + # Default CFLAGS and LDFLAGS 30 + diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c 31 + index 69fe431..d37da32 100644 32 + --- a/libkmod/libkmod.c 33 + +++ b/libkmod/libkmod.c 34 + @@ -206,12 +206,15 @@ static int log_priority(const char *priority) 35 + return 0; 36 + } 37 + 38 + -static const char *dirname_default_prefix = "/lib/modules"; 39 + +static const char *dirname_default_prefixes[] = { 40 + + MODULESDIRS, 41 + + NULL 42 + +}; 43 + 5 44 static char *get_kernel_release(const char *dirname) 6 45 { 7 46 struct utsname u; ··· 10 49 11 50 if (dirname != NULL) 12 51 return path_make_absolute_cwd(dirname); 13 - @@ -209,7 +209,10 @@ 52 + @@ -219,8 +222,42 @@ static char *get_kernel_release(const char *dirname) 14 53 if (uname(&u) < 0) 15 54 return NULL; 16 55 17 56 - if (asprintf(&p, "%s/%s", dirname_default_prefix, u.release) < 0) 18 - + if ((dirname_prefix = getenv("MODULE_DIR")) == NULL) 19 - + dirname_prefix = dirname_default_prefix; 57 + - return NULL; 58 + + if ((dirname_prefix = getenv("MODULE_DIR")) != NULL) { 59 + + if(asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0) 60 + + return NULL; 61 + + } else { 62 + + size_t i; 63 + + char buf[PATH_MAX]; 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 + + } 20 86 + 21 - + if (asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0) 22 - return NULL; 87 + + p = malloc(plen + 1); 88 + + if (p == NULL) 89 + + return NULL; 90 + + memcpy(p, buf, plen + 1); 91 + + break; 92 + + } 93 + + } 23 94 24 95 return p; 25 - diff -ru -x '*~' kmod-17-orig/tools/static-nodes.c kmod-17/tools/static-nodes.c 26 - --- kmod-17-orig/tools/static-nodes.c 2013-12-17 22:05:42.159047316 +0100 27 - +++ kmod-17/tools/static-nodes.c 2014-04-17 13:51:17.945974320 +0200 28 - @@ -159,6 +159,7 @@ 96 + } 97 + diff --git a/tools/static-nodes.c b/tools/static-nodes.c 98 + index 8d2356d..2ed306d 100644 99 + --- a/tools/static-nodes.c 100 + +++ b/tools/static-nodes.c 101 + @@ -29,10 +29,11 @@ 102 + #include <unistd.h> 103 + #include <sys/stat.h> 104 + #include <sys/types.h> 105 + -#include <sys/utsname.h> 106 + 107 + #include <shared/util.h> 108 + 109 + +#include <libkmod/libkmod.h> 110 + + 111 + #include "kmod.h" 112 + 113 + struct static_nodes_format { 114 + @@ -154,8 +155,8 @@ static void help(void) 115 + 116 + static int do_static_nodes(int argc, char *argv[]) 117 + { 118 + - struct utsname kernel; 119 + char modules[PATH_MAX], buf[4096]; 120 + + struct kmod_ctx *ctx; 121 + const char *output = "/dev/stdout"; 29 122 FILE *in = NULL, *out = NULL; 30 123 const struct static_nodes_format *format = &static_nodes_format_human; 31 - int r, ret = EXIT_SUCCESS; 32 - + char *dirname_prefix; 124 + @@ -206,22 +207,25 @@ static int do_static_nodes(int argc, char *argv[]) 125 + } 126 + } 33 127 34 - for (;;) { 35 - int c, idx = 0, valid; 36 - @@ -211,16 +212,19 @@ 128 + - if (uname(&kernel) < 0) { 129 + - fputs("Error: uname failed!\n", stderr); 130 + + ctx = kmod_new(NULL, NULL); 131 + + if (ctx == NULL) { 132 + + fprintf(stderr, "Error: failed to create kmod context\n"); 133 + ret = EXIT_FAILURE; 37 134 goto finish; 38 135 } 39 - 136 + - 40 137 - snprintf(modules, sizeof(modules), "/lib/modules/%s/modules.devname", kernel.release); 41 - + if ((dirname_prefix = getenv("MODULE_DIR")) == NULL) 42 - + dirname_prefix = "/lib/modules"; 43 - + 44 - + snprintf(modules, sizeof(modules), "%s/%s/modules.devname", dirname_prefix, kernel.release); 138 + + if (snprintf(modules, sizeof(modules), "%s/modules.devname", kmod_get_dirname(ctx)) < 0) { 139 + + fprintf(stderr, "Error: path to modules.devname is too long\n"); 140 + + ret = EXIT_FAILURE; 141 + + goto finish; 142 + + } 143 + + kmod_unref(ctx); 45 144 in = fopen(modules, "re"); 46 145 if (in == NULL) { 47 146 if (errno == ENOENT) { 48 147 - fprintf(stderr, "Warning: /lib/modules/%s/modules.devname not found - ignoring\n", 49 148 - kernel.release); 50 - + fprintf(stderr, "Warning: %s/%s/modules.devname not found - ignoring\n", 51 - + dirname_prefix, kernel.release); 149 + + fprintf(stderr, "Warning: %s not found - ignoring\n", modules); 52 150 ret = EXIT_SUCCESS; 53 151 } else { 54 152 - fprintf(stderr, "Error: could not open /lib/modules/%s/modules.devname - %m\n", 55 153 - kernel.release); 56 - + fprintf(stderr, "Error: could not open %s/%s/modules.devname - %m\n", 57 - + dirname_prefix, kernel.release); 154 + + fprintf(stderr, "Error: could not open %s - %m\n", modules); 58 155 ret = EXIT_FAILURE; 59 156 } 60 157 goto finish;
+1 -2
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/ 31 30 32 31 # Resolv is actually a link to another package, so let's copy it properly 33 32 rm $out/lib/libresolv.9.dylib ··· 91 90 cp -d ${xz.out}/lib/liblzma*.* $out/lib 92 91 93 92 # Copy binutils. 94 - for i in as ld ar ranlib nm strip otool install_name_tool dsymutil; do 93 + for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do 95 94 cp ${darwin.cctools}/bin/$i $out/bin 96 95 done 97 96
+7 -1
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 }: 3 + , libgcrypt, perl, libgudev, avahi, ppp, kmod }: 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} 16 22 ''; 17 23 18 24 # 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] = { "/var/run/current-system/sw/bin/modprobe", *iter, NULL }; 50 + + char *argv[3] = { "@kmod@/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 ("/var/run/current-system/sw/bin/modprobe ppp_generic"); 74 + + ignored = system ("@kmod@/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 }: 5 + , ethtool, gnused, coreutils, file, inetutils, kmod }: 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 /run/current-system/sw/sbin/modprobe 22 + substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/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}/sbin/sysctl" 26 + --replace "/sbin/sysctl" "${procps}/bin/sysctl" 27 27 substituteInPlace "src/nm-openconnect-service.c" \ 28 - --replace "/usr/sbin/openconnect" "${openconnect}/sbin/openconnect" \ 29 - --replace "/sbin/modprobe" "${kmod}/sbin/modprobe" 28 + --replace "/usr/sbin/openconnect" "${openconnect}/bin/openconnect" \ 29 + --replace "/sbin/modprobe" "${kmod}/bin/modprobe" 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}/sbin/openvpn" \ 31 - --replace "/sbin/modprobe" "${kmod}/sbin/modprobe" 30 + --replace "/sbin/openvpn" "${openvpn}/bin/openvpn" \ 31 + --replace "/sbin/modprobe" "${kmod}/bin/modprobe" 32 32 substituteInPlace "properties/auth-helpers.c" \ 33 - --replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" 33 + --replace "/sbin/openvpn" "${openvpn}/bin/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}/sbin/sysctl" 27 + --replace "/sbin/sysctl" "${procps}/bin/sysctl" 28 28 substituteInPlace "src/nm-vpnc-service.c" \ 29 - --replace "/sbin/vpnc" "${vpnc}/sbin/vpnc" \ 30 - --replace "/sbin/modprobe" "${kmod}/sbin/modprobe" 29 + --replace "/sbin/vpnc" "${vpnc}/bin/vpnc" \ 30 + --replace "/sbin/modprobe" "${kmod}/bin/modprobe" 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.3"; 4 + name = "diffutils-3.4"; 5 5 6 6 src = fetchurl { 7 7 url = "mirror://gnu/diffutils/${name}.tar.xz"; 8 - sha256 = "1761vymxbp4wb5rzjvabhdkskk95pghnn67464byvzb5mfl8jpm2"; 8 + sha256 = "1qlw328qpbss07zrb14ls0rhnhbvxrnssgbmrxxj2gdcy8jw0lyv"; 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 + 10835 10837 xcode = callPackage ../os-specific/darwin/xcode {}; 10836 10838 10837 10839 osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};