diff options
39 files changed, 300 insertions, 364 deletions
diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix index ad41ad4f3d7c..019932b04e8d 100644 --- a/nixos/modules/config/zram.nix +++ b/nixos/modules/config/zram.nix @@ -8,7 +8,7 @@ let devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1)); - modprobe = "${pkgs.kmod}/bin/modprobe"; + modprobe = "${config.system.sbin.modprobe}/sbin/modprobe"; in diff --git a/nixos/modules/hardware/video/bumblebee.nix b/nixos/modules/hardware/video/bumblebee.nix index 69db518ab21c..b10846ac18a1 100644 --- a/nixos/modules/hardware/video/bumblebee.nix +++ b/nixos/modules/hardware/video/bumblebee.nix @@ -75,6 +75,7 @@ in serviceConfig = { ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}"; }; + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; }; }; } diff --git a/nixos/modules/hardware/video/webcam/facetimehd.nix b/nixos/modules/hardware/video/webcam/facetimehd.nix index d311f600c319..2a2fcf3057d4 100644 --- a/nixos/modules/hardware/video/webcam/facetimehd.nix +++ b/nixos/modules/hardware/video/webcam/facetimehd.nix @@ -36,6 +36,7 @@ in # and load it back on resume powerManagement.resumeCommands = '' + export MODULE_DIR=/run/current-system/kernel-modules/lib/modules ${pkgs.kmod}/bin/modprobe -v facetimehd ''; diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix index 281d02a8c65e..5ab7daafa85b 100644 --- a/nixos/modules/services/hardware/tlp.nix +++ b/nixos/modules/services/hardware/tlp.nix @@ -72,6 +72,8 @@ in ExecStart = "${tlp}/bin/tlp init start"; ExecStop = "${tlp}/bin/tlp init stop"; }; + + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; }; tlp-sleep = { @@ -90,6 +92,8 @@ in ExecStart = "${tlp}/bin/tlp suspend"; ExecStop = "${tlp}/bin/tlp resume"; }; + + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; }; }; diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 7c4c93d0fcb3..e7741083d1ae 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -58,7 +58,7 @@ let # Fix some paths in the standard udev rules. Hacky. for i in $out/*.rules; do substituteInPlace $i \ - --replace \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \ + --replace \"/sbin/modprobe \"${config.system.sbin.modprobe}/sbin/modprobe \ --replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \ --replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \ --replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \ @@ -316,7 +316,8 @@ in ''; systemd.services.systemd-udevd = - { restartTriggers = cfg.packages; + { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; + restartTriggers = cfg.packages; }; }; diff --git a/nixos/modules/services/network-filesystems/openafs-client/default.nix b/nixos/modules/services/network-filesystems/openafs-client/default.nix index 891f41c8dcdc..61c66bb88357 100644 --- a/nixos/modules/services/network-filesystems/openafs-client/default.nix +++ b/nixos/modules/services/network-filesystems/openafs-client/default.nix @@ -80,7 +80,7 @@ in preStart = '' mkdir -p -m 0755 /afs mkdir -m 0700 -p ${cfg.cacheDirectory} - ${pkgs.kmod}/bin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true + ${pkgs.kmod}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb ${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"} ''; diff --git a/nixos/modules/services/networking/fan.nix b/nixos/modules/services/networking/fan.nix index 7f4e36478325..3170567e5b4a 100644 --- a/nixos/modules/services/networking/fan.nix +++ b/nixos/modules/services/networking/fan.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.networking.fan; - modprobe = "${pkgs.kmod}/bin/modprobe"; + modprobe = "${config.system.sbin.modprobe}/sbin/modprobe"; in diff --git a/nixos/modules/services/networking/strongswan.nix b/nixos/modules/services/networking/strongswan.nix index 8778b0364f9a..d6960a5df471 100644 --- a/nixos/modules/services/networking/strongswan.nix +++ b/nixos/modules/services/networking/strongswan.nix @@ -118,7 +118,7 @@ in systemd.services.strongswan = { description = "strongSwan IPSec Service"; wantedBy = [ "multi-user.target" ]; - path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux + path = with pkgs; [ config.system.sbin.modprobe iproute iptables utillinux ]; # XXX Linux wants = [ "keys.target" ]; after = [ "network.target" "keys.target" ]; environment = { diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 0f342f44fe76..a6bbca9b30bb 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -228,6 +228,7 @@ in systemd.services."systemd-modules-load" = { wantedBy = [ "multi-user.target" ]; restartTriggers = [ kernelModulesConf ]; + environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; serviceConfig = { # Ignore failed module loads. Typically some of the # modules in ‘boot.kernelModules’ are "nice to have but @@ -237,6 +238,10 @@ in }; }; + systemd.services.kmod-static-nodes = + { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; + }; + lib.kernelConfig = { isYes = option: { assertion = config: config.isYes option; diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix index b915a98d5375..9bb10eac9880 100644 --- a/nixos/modules/system/boot/modprobe.nix +++ b/nixos/modules/system/boot/modprobe.nix @@ -8,6 +8,41 @@ with lib; options = { + system.sbin.modprobe = mkOption { + internal = true; + default = pkgs.stdenv.mkDerivation { + name = "modprobe"; + buildCommand = '' + mkdir -p $out/bin + for i in ${pkgs.kmod}/sbin/*; do + name=$(basename $i) + echo "$text" > $out/bin/$name + echo 'exec '$i' "$@"' >> $out/bin/$name + chmod +x $out/bin/$name + done + ln -s bin $out/sbin + ''; + text = + '' + #! ${pkgs.stdenv.shell} + export MODULE_DIR=/run/current-system/kernel-modules/lib/modules + + # Fall back to the kernel modules used at boot time if the + # modules in the current configuration don't match the + # running kernel. + if [ ! -d "$MODULE_DIR/$(${pkgs.coreutils}/bin/uname -r)" ]; then + MODULE_DIR=/run/booted-system/kernel-modules/lib/modules/ + fi + + ''; + meta.priority = 4; + }; + description = '' + Wrapper around modprobe that sets the path to the modules + tree. + ''; + }; + boot.blacklistedKernelModules = mkOption { type = types.listOf types.str; default = []; @@ -52,7 +87,7 @@ with lib; ''; environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; - environment.systemPackages = [ pkgs.kmod ]; + environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; system.activationScripts.modprobe = '' @@ -60,9 +95,11 @@ with lib; # in the right location in the Nix store for kernel modules). # We need this when the kernel (or some module) auto-loads a # module. - echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe + echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe ''; + environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; + }; } diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh index c5a14f0766d5..4a7f073ea8ad 100644 --- a/nixos/modules/system/boot/stage-2-init.sh +++ b/nixos/modules/system/boot/stage-2-init.sh @@ -207,5 +207,6 @@ exec {logOutFd}>&- {logErrFd}>&- # Start systemd. echo "starting systemd..." PATH=/run/current-system/systemd/lib/systemd \ + MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \ LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ exec systemd diff --git a/nixos/modules/tasks/cpu-freq.nix b/nixos/modules/tasks/cpu-freq.nix index 2fe7f4f8197a..1f4d1db33cef 100644 --- a/nixos/modules/tasks/cpu-freq.nix +++ b/nixos/modules/tasks/cpu-freq.nix @@ -38,7 +38,7 @@ in description = "CPU Frequency Governor Setup"; after = [ "systemd-modules-load.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ cpupower pkgs.kmod ]; + path = [ cpupower config.system.sbin.modprobe ]; unitConfig.ConditionVirtualization = false; serviceConfig = { Type = "oneshot"; diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index ebc2be087a5b..c99fc78d49e7 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -95,7 +95,8 @@ in LimitNPROC = 1048576; } // proxy_env; - path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); + path = [ config.system.sbin.modprobe ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); + environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; postStart = if cfg.socketActivation then "" else cfg.postStart; diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 777ee31e4dcc..b77b319f4a28 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -135,13 +135,13 @@ let } '' # Create a /boot EFI partition with 40M - ${pkgs.gptfdisk}/bin/sgdisk -G /dev/vda - ${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda - ${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda - ${pkgs.gptfdisk}/bin/sgdisk -A 1:set:1 /dev/vda - ${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda - ${pkgs.gptfdisk}/bin/sgdisk -h 2 /dev/vda - ${pkgs.gptfdisk}/bin/sgdisk -C /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -G /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -A 1:set:1 /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -A 2:set:2 /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -h 2 /dev/vda + ${pkgs.gptfdisk}/sbin/sgdisk -C /dev/vda ${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2 . /sys/class/block/vda2/uevent mknod /dev/vda2 b $MAJOR $MINOR @@ -151,11 +151,11 @@ let ${pkgs.mtools}/bin/mlabel -i /dev/vda2 ::boot # Mount /boot; load necessary modules first. - ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true - ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true - ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true - ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true - ${pkgs.kmod}/bin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true + ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_cp437.ko.xz || true + ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko.xz || true + ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/fat.ko.xz || true + ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/fat/vfat.ko.xz || true + ${pkgs.kmod}/sbin/insmod ${pkgs.linux}/lib/modules/*/kernel/fs/efivarfs/efivarfs.ko.xz || true mkdir /boot mount /dev/vda2 /boot @@ -370,7 +370,7 @@ in boot.initrd.extraUtilsCommands = '' # We need mke2fs in the initrd. - copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs + copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs ''; boot.initrd.postDeviceCommands = diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index cf009599665e..6b92848fd0f7 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -1,24 +1,34 @@ -{ fetchurl, stdenv, lib, precision ? "double" }: +{ fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }: with lib; assert elem precision [ "single" "double" "long-double" "quad-precision" ]; -let version = "3.3.5"; in +let version = "3.3.5-rc1"; in stdenv.mkDerivation rec { name = "fftw-${precision}-${version}"; - src = fetchurl { - url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"; - sha256 = "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"; + src = fetchFromGitHub { + owner = "FFTW"; + repo = "fftw3"; + rev = "fftw-${version}"; + sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4"; }; + nativeBuildInputs = [ ocaml perl indent transfig ghostscript texinfo libtool gettext automake autoconf ]; + + # remove the ./configure lines, so we can use nix's configureFlags + patchPhase = "sed -e '27,29d' -i bootstrap.sh"; + + preConfigurePhases = "./bootstrap.sh"; + outputs = [ "dev" "out" "doc" ]; # it's dev-doc only outputBin = "dev"; # fftw-wisdom configureFlags = - [ "--enable-shared" "--disable-static" + [ "--enable-maintainer-mode" + "--enable-shared" "--disable-static" "--enable-threads" ] ++ optional (precision != "double") "--enable-${precision}" diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index 13a7cfe0fb9f..d2bb05a3bb64 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }: stdenv.mkDerivation rec { - name = "libdrm-2.4.70"; + name = "libdrm-2.4.68"; src = fetchurl { url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; - sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b"; + sha256 = "5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df"; }; outputs = [ "dev" "out" ]; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 8f037d239d04..4ed47f46a321 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,12 +1,13 @@ -{ stdenv, fetchurl, fetchpatch -, pkgconfig, intltool, autoreconfHook, substituteAll -, file, expat, libdrm, xorg, wayland, libudev -, llvmPackages, libffi, libomxil-bellagio, libva -, libelf, libvdpau, python -, grsecEnabled ? false +{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, autoreconfHook, substituteAll +, file, expat, libdrm, xorg, wayland, libudev, llvmPackages, libffi, libomxil-bellagio +, libvdpau, libelf, libva +, grsecEnabled , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt }: +if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then + throw "unsupported platform for Mesa" +else /** Packaging design: - The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now). @@ -19,15 +20,11 @@ - libOSMesa is in $osmesa (~4 MB) */ -with stdenv.lib; - -if ! lists.elem stdenv.system platforms.mesaPlatforms then - throw "unsupported platform for Mesa" -else +with { inherit (stdenv.lib) optional optionalString; }; let - version = "12.0.1"; - branch = head (splitString "." version); + version = "11.2.2"; + # this is the default search path for DRI drivers driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; in @@ -37,20 +34,20 @@ stdenv.mkDerivation { src = fetchurl { urls = [ "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" - "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" + (with stdenv.lib; ''ftp://ftp.freedesktop.org/pub/mesa/older-versions/'' + + head (splitString "." version) + ''.x/${version}/mesa-${version}.tar.xz'') "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" ]; - sha256 = "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms"; + sha256 = "40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4"; }; prePatch = "patchShebangs ."; - # TODO: - # revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved - # ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog patches = [ ./glx_ro_text_segm.patch # fix for grsecurity/PaX ./symlink-drivers.patch + # TODO: revive ./dricore-gallium.patch when it gets ported (from Ubuntu), + # as it saved ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog ] ++ optional stdenv.isLinux (substituteAll { src = ./dlopen-absolute-paths.diff; @@ -64,59 +61,61 @@ stdenv.mkDerivation { outputs = [ "dev" "out" "drivers" "osmesa" ]; - # TODO: Figure out how to enable opencl without having a runtime dependency on clang configureFlags = [ "--sysconfdir=/etc" "--localstatedir=/var" "--with-dri-driverdir=$(drivers)/lib/dri" "--with-dri-searchpath=${driverLink}/lib/dri" - "--with-egl-platforms=x11,wayland,drm" - (optionalString (stdenv.system != "armv7l-linux") - "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast") - (optionalString (stdenv.system != "armv7l-linux") - "--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast") - - (enableFeature enableTextureFloats "texture-float") - (enableFeature grsecEnabled "glx-rts") - (enableFeature stdenv.isLinux "dri3") - (enableFeature stdenv.isLinux "nine") # Direct3D in Wine - "--enable-dri" - "--enable-driglx-direct" + "--enable-gles1" "--enable-gles2" + "--enable-dri" + ] ++ optional stdenv.isLinux "--enable-dri3" + ++ [ "--enable-glx" - "--enable-glx-tls" "--enable-gallium-osmesa" # used by wine - "--enable-gallium-llvm" "--enable-egl" "--enable-xa" # used in vmware driver "--enable-gbm" + ] ++ optional stdenv.isLinux "--enable-nine" # Direct3D in Wine + ++ [ "--enable-xvmc" "--enable-vdpau" + #"--enable-omx" + #"--enable-va" + + # TODO: Figure out how to enable opencl without having a runtime dependency on clang + "--disable-opencl" + + (if "armv7l-linux" == stdenv.system + then null + else "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast") "--enable-shared-glapi" "--enable-sysfs" + "--enable-driglx-direct" # seems enabled anyway + "--enable-glx-tls" + (if "armv7l-linux" == stdenv.system + then "--with-dri-drivers=" + else "--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast") + "--with-egl-platforms=x11,wayland,drm" + + "--enable-gallium-llvm" "--enable-llvm-shared-libs" - "--enable-omx" - "--enable-va" - "--disable-opencl" - ]; + ] ++ optional enableTextureFloats "--enable-texture-float" + ++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec nativeBuildInputs = [ pkgconfig file ]; - propagatedBuildInputs = with xorg; - [ libXdamage libXxf86vm ] + propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ] ++ optional stdenv.isLinux libdrm; buildInputs = with xorg; [ autoreconfHook intltool expat llvmPackages.llvm glproto dri2proto dri3proto presentproto libX11 libXext libxcb libXt libXfixes libxshmfence - libffi wayland libvdpau libelf libXvMC - libomxil-bellagio libva libpthreadstubs - (python.withPackages (ps: [ ps.Mako ])) + libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */ ] ++ optional stdenv.isLinux libudev; - enableParallelBuilding = true; doCheck = false; @@ -125,42 +124,42 @@ stdenv.mkDerivation { "localstatedir=\${TMPDIR}" ]; - # TODO: probably not all .la files are completely fixed, but it shouldn't matter; - postInstall = '' - # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM - mv -t "$drivers/lib/" \ - $out/lib/libXvMC* \ - $out/lib/d3d \ - $out/lib/vdpau \ - $out/lib/bellagio \ - $out/lib/libxatracker* \ - - mv $out/lib/dri/* $drivers/lib/dri + # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM; + # also move libOSMesa to $osmesa, as it's relatively big + # ToDo: probably not all .la files are completely fixed, but it shouldn't matter + postInstall = with stdenv.lib; '' + mv -t "$drivers/lib/" \ + $out/lib/libXvMC* \ + $out/lib/d3d \ + $out/lib/vdpau \ + $out/lib/libxatracker* - # move libOSMesa to $osmesa, as it's relatively big mkdir -p {$osmesa,$drivers}/lib/ - mv -t $osmesa/lib/ $out/lib/libOSMesa* + mv -t $osmesa/lib/ \ + $out/lib/libOSMesa* - # now fix references in .la files - sed "/^libdir=/s,$out,$osmesa," -i $osmesa/lib/libOSMesa*.la + '' + /* now fix references in .la files */ '' + sed "/^libdir=/s,$out,$osmesa," -i \ + $osmesa/lib/libOSMesa*.la - # set the default search path for DRI drivers; used e.g. by X server + '' + /* set the default search path for DRI drivers; used e.g. by X server */ '' substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}" ''; + #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM */ - # TODO: - # @vcunat isn't sure if drirc will be found when in $out/etc/; - # check $out doesn't depend on llvm: builder failures are ignored - # for some reason grep -qv '${llvmPackages.llvm}' -R "$out"; - postFixup = '' + postFixup = # add RPATH so the drivers can find the moved libgallium and libdricore9 # moved here to avoid problems with stripping patchelfed files + '' for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do if [[ ! -L "$lib" ]]; then patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib" fi done ''; + # ToDo + /* check $out doesn't depend on llvm */ '' + # builder failures are ignored for some reason + # grep -qv '${llvmPackages.llvm}' -R "$out" passthru = { inherit libdrm version driverLink; }; diff --git a/pkgs/development/python-modules/generic/run_setup.py b/pkgs/development/python-modules/generic/run_setup.py index e3a530eb0cb6..d980ac7d23d4 100644 --- a/pkgs/development/python-modules/generic/run_setup.py +++ b/pkgs/development/python-modules/generic/run_setup.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import setuptools import tokenize diff --git a/pkgs/development/tools/misc/lttng-tools/default.nix b/pkgs/development/tools/misc/lttng-tools/default.nix index 827c1d0e67f8..627a51916cb8 100644 --- a/pkgs/development/tools/misc/lttng-tools/default.nix +++ b/pkgs/development/tools/misc/lttng-tools/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ popt libuuid liburcu lttng-ust libxml2 ]; < |