diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 0253c70f2dd4..7fd0ee34a991 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -16,7 +16,6 @@ let ati_unfree = { modules = [ kernelPackages.ati_drivers_x11 ]; driverName = "fglrx"; }; nouveau = { modules = [ pkgs.xf86_video_nouveau ]; }; nvidia = { modules = [ kernelPackages.nvidia_x11 ]; }; - nvidiaLegacy96 = { modules = [ kernelPackages.nvidia_x11_legacy96 ]; driverName = "nvidia"; }; nvidiaLegacy173 = { modules = [ kernelPackages.nvidia_x11_legacy173 ]; driverName = "nvidia"; }; nvidiaLegacy304 = { modules = [ kernelPackages.nvidia_x11_legacy304 ]; driverName = "nvidia"; }; unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; }; @@ -443,7 +442,6 @@ in boot.extraModulePackages = optional (elem "nvidia" driverNames) kernelPackages.nvidia_x11 ++ - optional (elem "nvidiaLegacy96" driverNames) kernelPackages.nvidia_x11_legacy96 ++ optional (elem "nvidiaLegacy173" driverNames) kernelPackages.nvidia_x11_legacy173 ++ optional (elem "nvidiaLegacy304" driverNames) kernelPackages.nvidia_x11_legacy304 ++ optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions ++ @@ -497,7 +495,6 @@ in pkgs.xdg_utils ] ++ optional (elem "nvidia" driverNames) kernelPackages.nvidia_x11 - ++ optional (elem "nvidiaLegacy96" driverNames) kernelPackages.nvidia_x11_legacy96 ++ optional (elem "nvidiaLegacy173" driverNames) kernelPackages.nvidia_x11_legacy173 ++ optional (elem "nvidiaLegacy304" driverNames) kernelPackages.nvidia_x11_legacy304 ++ optional (elem "virtualbox" driverNames) xorg.xrefresh @@ -521,8 +518,6 @@ in XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. } // optionalAttrs (elem "nvidia" driverNames) { LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11}/lib"; - } // optionalAttrs (elem "nvidiaLegacy96" driverNames) { - LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy96}/lib"; } // optionalAttrs (elem "nvidiaLegacy173" driverNames) { LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy173}/lib"; } // optionalAttrs (elem "nvidiaLegacy304" driverNames) { @@ -544,8 +539,6 @@ in ${optionalString cfg.driSupport32Bit "ln -sf ${pkgs_i686.linuxPackages.nvidia_x11.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"} '' - else if elem "nvidiaLegacy96" driverNames then - "ln -sf ${kernelPackages.nvidia_x11_legacy96} /run/opengl-driver" else if elem "nvidiaLegacy173" driverNames then "ln -sf ${kernelPackages.nvidia_x11_legacy173} /run/opengl-driver" else if elem "nvidiaLegacy304" driverNames then diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 652b2ed92c10..2ce134090fe5 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2, libX11, xproto, libXext -, libXcursor, libXmu, qt4, libIDL, SDL, libcap, zlib, libpng, glib, kernelDev, lvm2 +, libXcursor, libXmu, qt4, libIDL, SDL, libcap, zlib, libpng, glib, kernel, lvm2 , which, alsaLib, curl, gawk , xorriso, makeself, perl, pkgconfig , javaBindings ? false, jdk ? null @@ -52,7 +52,7 @@ let }; in stdenv.mkDerivation { - name = "virtualbox-${version}-${kernelDev.version}"; + name = "virtualbox-${version}-${kernel.version}"; src = fetchurl { url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"; @@ -61,14 +61,14 @@ in stdenv.mkDerivation { buildInputs = [ iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor qt4 libIDL SDL - libcap glib kernelDev lvm2 python alsaLib curl pam xorriso makeself perl + libcap glib lvm2 python alsaLib curl pam xorriso makeself perl pkgconfig which libXmu ] ++ optional javaBindings jdk ++ optional pythonBindings python; prePatch = '' set -x - MODULES_BUILD_DIR=`echo ${kernelDev}/lib/modules/*/build` + MODULES_BUILD_DIR=`echo ${kernel.dev}/lib/modules/*/build` sed -e 's@/lib/modules/`uname -r`/build@'$MODULES_BUILD_DIR@ \ -e 's@MKISOFS --version@MKISOFS -version@' \ -e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \ diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index de38843c7f1b..805e0b867d97 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lib, patchelf, cdrkit, kernelDev, which, makeWrapper +{ stdenv, fetchurl, lib, patchelf, cdrkit, kernel, which, makeWrapper , xorg, dbus, virtualbox }: let @@ -8,14 +8,14 @@ let in stdenv.mkDerivation { - name = "VirtualBox-GuestAdditions-${version}-${kernelDev.version}"; + name = "VirtualBox-GuestAdditions-${version}-${kernel.version}"; src = fetchurl { url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso"; sha256 = "f11a7f13dfe7bf9f246fb877144bb467fe6deadcd876568ec79b6ccd3b59d767"; }; - KERN_DIR = "${kernelDev}/lib/modules/*/build"; + KERN_DIR = "${kernel.dev}/lib/modules/*/build"; buildInputs = [ patchelf cdrkit makeWrapper dbus ]; @@ -115,7 +115,7 @@ stdenv.mkDerivation { for i in * do cd $i - kernelVersion=$(cd ${kernelDev}/lib/modules; ls) + kernelVersion=$(cd ${kernel.dev}/lib/modules; ls) export MODULE_DIR=$out/lib/modules/$kernelVersion/misc find . -type f | xargs sed -i -e "s|-o root||g" \ -e "s|-g root||g" diff --git a/pkgs/os-specific/linux/acpi-call/default.nix b/pkgs/os-specific/linux/acpi-call/default.nix index 9fd8168948d5..2882c804c504 100644 --- a/pkgs/os-specific/linux/acpi-call/default.nix +++ b/pkgs/os-specific/linux/acpi-call/default.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchgit, kernelDev }: +{ stdenv, fetchgit, kernel }: stdenv.mkDerivation { - name = "acpi-call-${kernelDev.version}"; + name = "acpi-call-${kernel.version}"; src = fetchgit { url = "git://github.com/mkottman/acpi_call.git"; @@ -12,12 +12,12 @@ stdenv.mkDerivation { preBuild = '' sed -e 's/break/true/' -i examples/turn_off_gpu.sh sed -e 's@/bin/bash@.bin/sh@' -i examples/turn_off_gpu.sh - sed -e "s@/lib/modules/\$(.*)@${kernelDev}/lib/modules/${kernelDev.modDirVersion}@" -i Makefile + sed -e "s@/lib/modules/\$(.*)@${kernel.dev}/lib/modules/${kernel.modDirVersion}@" -i Makefile ''; installPhase = '' - mkdir -p $out/lib/modules/${kernelDev.modDirVersion}/misc - cp acpi_call.ko $out/lib/modules/${kernelDev.modDirVersion}/misc + mkdir -p $out/lib/modules/${kernel.modDirVersion}/misc + cp acpi_call.ko $out/lib/modules/${kernel.modDirVersion}/misc mkdir -p $out/bin cp examples/turn_off_gpu.sh $out/bin/test_discrete_video_off.sh chmod a+x $out/bin/test_discrete_video_off.sh diff --git a/pkgs/os-specific/linux/atheros/0.9.4.nix b/pkgs/os-specific/linux/atheros/0.9.4.nix deleted file mode 100644 index 341bdc3f1bbf..000000000000 --- a/pkgs/os-specific/linux/atheros/0.9.4.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, fetchurl, builderDefs, kernelDev }: - let localDefs = builderDefs.passthru.function { - src = /* put a fetchurl here */ - fetchurl { - url = http://downloads.sourceforge.net/madwifi/madwifi-0.9.4.tar.gz; - sha256 = "06jd5b8rfw7rmiva6jgmrb7n26g5plcg9marbnnmg68gbcqbr3xh"; - }; - - buildInputs = []; - configureFlags = []; - makeFlags = [''KERNELPATH=${kernelDev}/lib/modules/*/build'' ''DESTDIR=$out'']; - }; - in with localDefs; -let -postInstall = fullDepEntry ('' - ln -s $out/usr/local/bin $out/bin -'') [minInit doMakeInstall]; -in -stdenv.mkDerivation rec { - name = "atheros-0.9.4-${kernelDev.version}"; - builder = writeScript (name + "-builder") - (textClosure localDefs [doMakeInstall - postInstall doForceShare doPropagate]); - meta = { - description = "Atheros WiFi driver"; - inherit src; - }; -} diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix index 51430f6e4eb4..1aea10141d53 100644 --- a/pkgs/os-specific/linux/ati-drivers/default.nix +++ b/pkgs/os-specific/linux/ati-drivers/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernelDev, xlibs, which, imake +{ stdenv, fetchurl, kernel, xlibs, which, imake , mesa # for fgl_glxgears , libXxf86vm, xf86vidmodeproto # for fglrx_gamma , xorg, makeWrapper, glibc, patchelf @@ -22,9 +22,9 @@ assert stdenv.system == "x86_64-linux"; -stdenv.mkDerivation rec { - name = "ati-drivers-${version}-${kernel.version}"; - version = "13.4"; + +stdenv.mkDerivation { + name = "ati-drivers-13.4-${kernel.version}"; builder = ./builder.sh; @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { mesa ]; - kernel = kernelDev; + kernel = kernel.dev; inherit glibc /* glibc only used for setting interpreter */; @@ -71,6 +71,7 @@ stdenv.mkDerivation rec { maintainers = [stdenv.lib.maintainers.marcweber]; platforms = [ "x86_64-linux" ]; hydraPlatforms = []; + broken = true; }; # moved assertions here because the name is evaluated when the NixOS manual is generated diff --git a/pkgs/os-specific/linux/aufs-util/2.nix b/pkgs/os-specific/linux/aufs-util/2.nix deleted file mode 100644 index e4968b920486..000000000000 --- a/pkgs/os-specific/linux/aufs-util/2.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, fetchurl, kernelDev, aufs }: - -assert aufs != null; - -let version = "20100506"; in - -stdenv.mkDerivation { - name = "aufs2-util-${version}-${kernelDev.version}"; - - src = fetchurl { - url = "http://tarballs.nixos.org/aufs2-util-git-${version}.tar.bz2"; - sha256 = "0ly0c3p8fjxqbk8k5rmm1a91wg8wcrvhi1lv4aawalkkk8rqbnwk"; - }; - - buildInputs = [ aufs ]; - - makeFlags = - [ "KDIR=${kernelDev}/lib/modules/${kernelDev.version}/build" - "Install=install" - "DESTDIR=$(out)" - ]; - - postInstall = - '' - mv $out/usr/* $out - rmdir $out/usr - - cp aufs.shlib $out/lib/ - - substituteInPlace $out/bin/aubrsync \ - --replace /sbin/mount $out/sbin/mount \ - --replace /usr/lib/aufs.shlib $out/lib/aufs.shlib - ''; - - meta = { - description = "Utilities for AUFS2"; - homepage = http://aufs.sourceforge.net/; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/aufs-util/3.nix b/pkgs/os-specific/linux/aufs-util/3.nix deleted file mode 100644 index 9997c2743a50..000000000000 --- a/pkgs/os-specific/linux/aufs-util/3.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ stdenv, fetchgit, kernelDev, aufs }: - -assert aufs != null; - -stdenv.mkDerivation { - name = "aufs3-util-${aufs.patch.version}-${kernelDev.version}"; - - src = fetchgit { - url = git://aufs.git.sourceforge.net/gitroot/aufs/aufs-util.git; - rev = aufs.patch.utilRev; - sha256 = aufs.patch.utilHash; - }; - - buildInputs = [ aufs ]; - - makeFlags = - [ "KDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build" - "Install=install" - "DESTDIR=$(out)" - ]; - - postInstall = - '' - mv $out/usr/* $out - rmdir $out/usr - - cp aufs.shlib $out/lib/ - - substituteInPlace $out/bin/aubrsync \ - --replace /sbin/mount $out/sbin/mount \ - --replace /usr/lib/aufs.shlib $out/lib/aufs.shlib - ''; - - meta = { - description = "Utilities for AUFS3"; - homepage = http://aufs.sourceforge.net/; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/aufs/2.nix b/pkgs/os-specific/linux/aufs/2.nix deleted file mode 100644 index a4a40823f7a2..000000000000 --- a/pkgs/os-specific/linux/aufs/2.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ stdenv, fetchurl, kernelDev, perl, fetchgit }: - -assert kernelDev.features ? aufsBase; - -let version = "20100522"; in - -stdenv.mkDerivation { - name = "aufs2-${version}-${kernelDev.version}"; - - src = - if (builtins.lessThan (builtins.compareVersions kernelDev.version "2.6.35") 0) then - fetchurl { - url = "http://tarballs.nixos.org/aufs2-standalone-git-${version}.tar.bz2"; - sha256 = "1g4mw4qx2xzpygdwjiw36bkhfz1hi7wxx7w79n2h0lr5grzzdnd6"; - } - else - fetchgit { - url = "http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git"; - rev = "d950eef373ff1e0448ad3945b734da6ab050571d"; - sha256 = "816145b0341bd7862df50c058144cf6ebc25c05d2976f781ff0fe10d4559b853"; - }; - - buildInputs = [ perl ]; - - makeFlags = "KDIR=${kernelDev}/lib/modules/${kernelDev.version}/build"; - - installPhase = - '' - mkdir -p $out/lib/modules/${kernelDev.version}/misc - cp aufs.ko $out/lib/modules/${kernelDev.version}/misc - - # Install the headers because aufs2-util requires them. - cp -prvd include $out/ - ''; - - meta = { - description = "Another Unionfs implementation for Linux (second generation)"; - homepage = http://aufs.sourceforge.net/; - maintainers = [ stdenv.lib.maintainers.eelco - stdenv.lib.maintainers.raskin ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/aufs/3.nix b/pkgs/os-specific/linux/aufs/3.nix deleted file mode 100644 index 2f566d3abff7..000000000000 --- a/pkgs/os-specific/linux/aufs/3.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ stdenv, kernelDev, perl }: - -let - - aufsPredicate = x: - if x ? features then - (if x.features ? aufs3 then x.features.aufs3 else false) - else false; - featureAbort = abort "This kernel does not have aufs 3 support"; - patch = stdenv.lib.findFirst aufsPredicate featureAbort kernelDev.kernelPatches; - -in - -stdenv.mkDerivation { - name = "aufs3-${patch.version}-${kernelDev.version}"; - - src = patch.patch.src; - - buildInputs = [ perl ]; - - makeFlags = "KDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build"; - - NIX_CFLAGS_COMPILE="-I${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build/include/generated"; - - installPhase = - '' - mkdir -p $out/lib/modules/${kernelDev.modDirVersion}/misc - cp -v aufs.ko $out/lib/modules/${kernelDev.modDirVersion}/misc - - # Install the headers because aufs3-util requires them. - mkdir -p $out/include/linux - cp -v usr/include/linux/aufs_type.h $out/include/linux - ''; - - passthru = { inherit patch; }; - - meta = { - description = "Another Unionfs implementation for Linux (third generation)"; - homepage = http://aufs.sourceforge.net/; - maintainers = [ stdenv.lib.maintainers.eelco - stdenv.lib.maintainers.raskin ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/batman-adv/default.nix b/pkgs/os-specific/linux/batman-adv/default.nix index e4b4d1104b0d..0b7b6a0cafb4 100644 --- a/pkgs/os-specific/linux/batman-adv/default.nix +++ b/pkgs/os-specific/linux/batman-adv/default.nix @@ -1,17 +1,17 @@ -{ stdenv, fetchurl, kernelDev }: +{ stdenv, fetchurl, kernel }: -let base = "batman-adv-2013.2.0"; in +let base = "batman-adv-2013.4.0"; in stdenv.mkDerivation rec { - name = "${base}-${kernelDev.version}"; + name = "${base}-${kernel.version}"; src = fetchurl { url = "http://downloads.open-mesh.org/batman/releases/${base}/${base}.tar.gz"; - sha1 = "7d2aff2ad118cbc5452de43f7e9da8374521ec0e"; + sha1 = "870a85df5410b3b5623be69e75297e642c91a7d4"; }; preBuild = '' - makeFlags="KERNELPATH=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build" + makeFlags="KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" sed -i -e "s,INSTALL_MOD_DIR=,INSTALL_MOD_PATH=$out INSTALL_MOD_DIR=," \ -e /depmod/d Makefile ''; diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix index 675fe7695af9..373f814f6e02 100644 --- a/pkgs/os-specific/linux/bbswitch/default.nix +++ b/pkgs/os-specific/linux/bbswitch/default.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchurl, kernelDev }: +{ stdenv, fetchurl, kernel }: let baseName = "bbswitch"; version = "0.7"; - name = "${baseName}-${version}-${kernelDev.version}"; + name = "${baseName}-${version}-${kernel.version}"; in @@ -17,13 +17,13 @@ stdenv.mkDerivation { preBuild = '' substituteInPlace Makefile \ - --replace "\$(shell uname -r)" "${kernelDev.modDirVersion}" \ - --replace "/lib/modules" "${kernelDev}/lib/modules" + --replace "\$(shell uname -r)" "${kernel.modDirVersion}" \ + --replace "/lib/modules" "${kernel.dev}/lib/modules" ''; installPhase = '' - ensureDir $out/lib/modules/${kernelDev.modDirVersion}/misc - cp bbswitch.ko $out/lib/modules/${kernelDev.modDirVersion}/misc + ensureDir $out/lib/modules/${kernel.modDirVersion}/misc + cp bbswitch.ko $out/lib/modules/${kernel.modDirVersion}/misc ensureDir $out/bin tee $out/bin/discrete_vga_poweroff << EOF diff --git a/pkgs/os-specific/linux/blcr/default.nix b/pkgs/os-specific/linux/blcr/default.nix index d0d81abb244b..0cc4e3741c26 100644 --- a/pkgs/os-specific/linux/blcr/default.nix +++ b/pkgs/os-specific/linux/blcr/default.nix @@ -1,13 +1,13 @@ -{ stdenv, fetchurl, kernelDev, perl, makeWrapper }: +{ stdenv, fetchurl, kernel, perl, makeWrapper }: # BLCR 0.8.4 works for kernel version up to 2.6.38 (including 2.6.38.x) # BLCR 0.8.5 should works for kernel version up to 3.7.1 assert stdenv.isLinux; -assert builtins.compareVersions "3.7.2" kernelDev.version == 1; +assert builtins.compareVersions "3.7.2" kernel.version == 1; stdenv.mkDerivation { - name = "blcr_${kernelDev.version}-0.8.5"; + name = "blcr_${kernel.version}-0.8.5"; src = fetchurl { url = http://crd.lbl.gov/assets/Uploads/FTG/Projects/CheckpointRestart/downloads/blcr-0.8.5.tar.gz; @@ -18,9 +18,9 @@ stdenv.mkDerivation { preConfigure = '' configureFlagsArray=( - --with-linux=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build - --with-kmod-dir=$out/lib/modules/${kernelDev.modDirVersion} - --with-system-map=${kernelDev}/System.map + --with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build + --with-kmod-dir=$out/lib/modules/${kernel.modDirVersion} + --with-system-map=${kernel}/System.map ) ''; diff --git a/pkgs/os-specific/linux/broadcom-sta-v6/default.nix b/pkgs/os-specific/linux/broadcom-sta-v6/default.nix deleted file mode 100644 index db4337c0ff28..000000000000 --- a/pkgs/os-specific/linux/broadcom-sta-v6/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ stdenv, fetchurl, kernelDev }: -let - version = "6_30_223_141"; -in -stdenv.mkDerivation { - name = "broadcom-sta-${version}-${kernelDev.version}"; - - src = if stdenv.system == "i686-linux" then ( - fetchurl { - url = "http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-${version}.tar.gz"; - sha256 = "19wra62dpm0x0byksh871yxr128b4v13kzkzqv56igjfpzv36z6m"; - } ) else ( - fetchurl { - url = "http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${version}.tar.gz"; - sha256 = "0jlvch7d3khmmg5kp80x4ka33hidj8yykqjcqq6j56z2g6wb4dsz"; - } - ); - - buildInputs = [ kernelDev ]; - patches = [ - ./linux-recent.patch - ./license.patch - ]; - - makeFlags = "KBASE=${kernelDev}/lib/modules/${kernelDev.modDirVersion}"; - - unpackPhase = '' - sourceRoot=broadcom-sta - mkdir "$sourceRoot" - tar xvf "$src" -C "$sourceRoot" - ''; - - installPhase = - '' - binDir="$out/lib/modules/${kernelDev.modDirVersion}/kernel/net/wireless/" - docDir="$out/share/doc/broadcom-sta/" - mkdir -p "$binDir" "$docDir" - cp wl.ko "$binDir" - cp lib/LICENSE.txt "$docDir" - ''; - - meta = { - description = "Kernel module driver for some Broadcom's wireless cards"; - homepage = http://www.broadcom.com/support/802.11/linux_sta.php; - license = "unfree-redistributable"; - maintainers = with stdenv.lib.maintainers; [ phreedom vcunat ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/os-specific/linux/broadcom-sta-v6/license.patch b/pkgs/os-specific/linux/broadcom-sta-v6/license.patch deleted file mode 100644 index aebb46365195..000000000000 --- a/pkgs/os-specific/linux/broadcom-sta-v6/license.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c ---- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900 -+++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900 -@@ -171,6 +171,8 @@ - static void wl_free_if(wl_info_t *wl, wl_if_t *wlif); - static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info); - -+MODULE_LICENSE("MIXED/Proprietary"); -+ - #if defined(WL_CONFIG_RFKILL) - #include - static int wl_init_rfkill(wl_info_t *wl); - diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix index 816a099e243c..5955543f8e1e 100644 --- a/pkgs/os-specific/linux/broadcom-sta/default.nix +++ b/pkgs/os-specific/linux/broadcom-sta/default.nix @@ -1,38 +1,37 @@ -{ stdenv, fetchurl, kernelDev }: - -let version = "5_100_82_112"; - bits = if stdenv.system == "i686-linux" then "32" else - assert stdenv.system == "x86_64-linux"; "64"; +{ stdenv, fetchurl, kernel }: +let + version = "6_30_223_141"; in - stdenv.mkDerivation { - name = "broadcom-sta-${version}-${kernelDev.version}"; + name = "broadcom-sta-${version}-${kernel.version}"; - src = fetchurl { - url = "http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86_${bits}-v${version}.tar.gz"; - sha256 = if bits == "32" - then "1rvhw9ngw0djxyyjx5m01c0js89zs3xiwmra03al6f9q7cbf7d45" - else "1qsarnry10f5m8a73wbr9cg2ifs00sqg6x0ay59l72vl9hb2zlww"; - }; + src = if stdenv.system == "i686-linux" then ( + fetchurl { + url = "http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-${version}.tar.gz"; + sha256 = "19wra62dpm0x0byksh871yxr128b4v13kzkzqv56igjfpzv36z6m"; + } ) else ( + fetchurl { + url = "http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${version}.tar.gz"; + sha256 = "0jlvch7d3khmmg5kp80x4ka33hidj8yykqjcqq6j56z2g6wb4dsz"; + } + ); - buildInputs = [ kernelDev ]; - patches = - [ ./makefile.patch ./linux-2.6.39.patch ./linux-3.2.patch - ./linux-3.4.patch ./license.patch - ]; + patches = [ + ./linux-recent.patch + ./license.patch + ]; - makeFlags = "KDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build"; + makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}"; - unpackPhase = - '' + unpackPhase = '' sourceRoot=broadcom-sta mkdir "$sourceRoot" tar xvf "$src" -C "$sourceRoot" - ''; + ''; installPhase = '' - binDir="$out/lib/modules/${kernelDev.modDirVersion}/kernel/net/wireless/" + binDir="$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" docDir="$out/share/doc/broadcom-sta/" mkdir -p "$binDir" "$docDir" cp wl.ko "$binDir" @@ -43,7 +42,7 @@ stdenv.mkDerivation { description = "Kernel module driver for some Broadcom's wireless cards"; homepage = http://www.broadcom.com/support/802.11/linux_sta.php; license = "unfree-redistributable"; - maintainers = [ stdenv.lib.maintainers.vcunat ]; + maintainers = with stdenv.lib.maintainers; [ phreedom vcunat ]; platforms = stdenv.lib.platforms.linux; }; } diff --git a/pkgs/os-specific/linux/broadcom-sta/license.patch b/pkgs/os-specific/linux/broadcom-sta/license.patch index b320d977e8b0..aebb46365195 100644 --- a/pkgs/os-specific/linux/broadcom-sta/license.patch +++ b/pkgs/os-specific/linux/broadcom-sta/license.patch @@ -1,12 +1,13 @@ diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c --- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900 +++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900 -@@ -163,6 +163,8 @@ +@@ -171,6 +171,8 @@ static void wl_free_if(wl_info_t *wl, wl_if_t *wlif); static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info); +MODULE_LICENSE("MIXED/Proprietary"); + - static struct pci_device_id wl_id_table[] = { - { PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - { PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + #if defined(WL_CONFIG_RFKILL) + #include + static int wl_init_rfkill(wl_info_t *wl); + diff --git a/pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch b/pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch deleted file mode 100644 index ca07c918c360..000000000000 --- a/pkgs/os-specific/linux/broadcom-sta/linux-2.6.39.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- old/src/wl/sys/wl_cfg80211.c -+++ new/src/wl/sys/wl_cfg80211.c -@@ -1811,7 +1811,7 @@ - notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) + - wl_get_ielen(wl); - freq = ieee80211_channel_to_frequency(notif_bss_info->channel --#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) - ,(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ - #endif - ); diff --git a/pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch b/pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch deleted file mode 100644 index b491537cb86f..000000000000 --- a/pkgs/os-specific/linux/broadcom-sta/linux-3.2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.112/src/wl/sys/wl_linux.c ---- broadcom-sta-5.100.82.112.orig/src/wl/sys/wl_linux.c 2011-10-23 01:56:55.000000000 +0900 -+++ broadcom-sta-5.100.82.112/src/wl/sys/wl_linux.c 2011-11-22 00:56:07.021520421 +0900 -@@ -385,7 +385,9 @@ - #endif - .ndo_get_stats = wl_get_stats, - .ndo_set_mac_address = wl_set_mac_address, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) - .ndo_set_multicast_list = wl_set_multicast_list, -+#endif - .ndo_do_ioctl = wl_ioctl - }; - diff --git a/pkgs/os-specific/linux/broadcom-sta/linux-3.4.patch b/pkgs/os-specific/linux/broadcom-sta/linux-3.4.patch deleted file mode 100644 index 854131c641b2..000000000000 --- a/pkgs/os-specific/linux/broadcom-sta/linux-3.4.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- broadcom-sta.orig/src/wl/sys/wl_linux.c -+++ broadcom-sta.new/src/wl/sys/wl_linux.c -@@ -40,7 +40,9 @@ - #include - #define WLC_MAXBSSCFG 1 - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) - #include -+#endif - #include - #include - #include diff --git a/pkgs/os-specific/linux/broadcom-sta-v6/linux-recent.patch b/pkgs/os-specific/linux/broadcom-sta/linux-recent.patch similarity index 100% rename from pkgs/os-specific/linux/broadcom-sta-v6/linux-recent.patch rename to pkgs/os-specific/linux/broadcom-sta/linux-recent.patch diff --git a/pkgs/os-specific/linux/broadcom-sta/makefile.patch b/pkgs/os-specific/linux/broadcom-sta/makefile.patch deleted file mode 100644 index 6ba8527e2673..000000000000 --- a/pkgs/os-specific/linux/broadcom-sta/makefile.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- src/Makefile 2010-10-08 00:32:59.000000000 +0200 -+++ src/Makefile 2010-11-09 11:06:28.832999850 +0100 -@@ -27,10 +27,10 @@ - EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped - - all: -- KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` -+ KBUILD_NOPEDANTIC=1 make -C ${KDIR} M=`pwd` - - clean: -- KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean -+ KBUILD_NOPEDANTIC=1 make -C ${KDIR} clean - - install: -- install -D -m 755 wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/wl.ko -+ install -D -m 755 wl.ko $out/lib/modules/${kernelVersion}/kernel/drivers/net/wireless/wl.ko diff --git a/pkgs/os-specific/linux/cryptodev/default.nix b/pkgs/os-specific/linux/cryptodev/default.nix index 7a818530ca2d..022ea648fea3 100644 --- a/pkgs/os-specific/linux/cryptodev/default.nix +++ b/pkgs/os-specific/linux/cryptodev/default.nix @@ -1,8 +1,8 @@ -{ fetchurl, stdenv, kernelDev, onlyHeaders ? false }: +{ fetchurl, stdenv, kernel, onlyHeaders ? false }: stdenv.mkDerivation rec { pname = "cryptodev-linux-1.6"; - name = "${pname}-${kernelDev.version}"; + name = "${pname}-${kernel.version}"; src = fetchurl { url = "http://download.gna.org/cryptodev-linux/${pname}.tar.gz"; @@ -10,12 +10,12 @@ stdenv.mkDerivation rec { }; buildPhase = if !onlyHeaders then '' - make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \ + make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ SUBDIRS=`pwd` INSTALL_PATH=$out '' else ":"; installPhase = stdenv.lib.optionalString (!onlyHeaders) '' - make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \ + make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ INSTALL_MOD_PATH=$out SUBDIRS=`pwd` modules_install '' + '' mkdir -p $out/include/crypto diff --git a/pkgs/os-specific/linux/e1000e/default.nix b/pkgs/os-specific/linux/e1000e/default.nix index e1abeea49b70..db5f88b935fd 100644 --- a/pkgs/os-specific/linux/e1000e/default.nix +++ b/pkgs/os-specific/linux/e1000e/default.nix @@ -1,19 +1,17 @@ -{ stdenv, fetchurl, kernelDev }: +{ stdenv, fetchurl, kernel }: stdenv.mkDerivation { - name = "e1000e-1.5.1-${kernelDev.version}"; + name = "e1000e-2.5.4-${kernel.version}"; src = fetchurl { - url = "mirror://sourceforge/e1000/e1000e-1.5.1.tar.gz"; - sha256 = "0nzjlarpqcpm5y112n3vzra4qv32hiygpfkk10y8g4nln4adhqsw"; + url = "mirror://sourceforge/e1000/e1000e-2.5.4.tar.gz"; + sha256 = "0bmihkc7y37jzwi996ryqblnyflyhhbimbnrnmlk419vxlzg1pzi"; }; - buildInputs = [ kernelDev ]; - configurePhase = '' cd src - kernel_version=$( cd ${kernelDev}/lib/modules && echo * ) - sed -i -e 's|/lib/modules|${kernelDev}/lib/modules|' Makefile + kernel_version=${kernel.modDirVersion} + sed -i -e 's|/lib/modules|${kernel.dev}/lib/modules|' Makefile export makeFlags="BUILD_KERNEL=$kernel_version" ''; diff --git a/pkgs/os-specific/linux/exmap/default.nix b/pkgs/os-specific/linux/exmap/default.nix deleted file mode 100644 index 1b372ca3dbfc..000000000000 --- a/pkgs/os-specific/linux/exmap/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ fetchurl, stdenv, kernelDev, pkgconfig, gtkmm, boost, pcre }: - -stdenv.mkDerivation rec { - name = "exmap-0.10-${kernelDev.version}"; - - src = fetchurl { - url = "http://www.berthels.co.uk/exmap/download/${name}.tgz"; - sha256 = "0z00dhl6bdmaz7p9wlvnj0izf0zlrlkv34fz449kxyislpzzxmgn"; - }; - - patchPhase = '' - substituteInPlace "kernel/Makefile" \ - --replace '/lib/modules/$(shell uname -r)/build' \ - ${kernelDev}/lib/modules/*/build - - # The `proc_root' variable (the root of `/proc') is no longer exported - # since 2.6.26. Fortunately, one can pass `NULL' instead of `&proc_root'. - # See http://lkml.org/lkml/2008/3/30/57 . - substituteInPlace "kernel/exmap.c" \ - --replace "&proc_root" "NULL" - - substituteInPlace "src/Makefile" --replace "-Werror" "" - ''; - - buildInputs = [ kernelDev pkgconfig gtkmm boost pcre ]; - - buildPhase = "make build"; - - # XXX: The tests can only be run one the `exmap' module is loaded. - doCheck = false; - #checkPhase = "make test" - - installPhase = '' - mkdir -p "$out/share/${name}" - cp kernel/*.ko "$out/share/${name}" - - mkdir -p "$out/bin" - cp src/{gexmap,exmtool,elftool,showproc} "$out/bin" - ''; - - meta = { - description = "Exmap, a tool showing the physical memory usage of processes"; - - longDescription = '' - Exmap is a utility which takes a snapshot of how the physical - memory and swap space are currently used by all the processes on - your system. It examines which page of memory are shared between - which processes, so that it can share the cost of the pages - fairly when calculating usage totals. - ''; - - homepage = http://www.berthels.co.uk/exmap/; - - license = "GPLv2+"; - }; -} diff --git a/pkgs/os-specific/linux/frandom/default.nix b/pkgs/os-specific/linux/frandom/default.nix index a28ba527218e..419207882f83 100644 --- a/pkgs/os-specific/linux/frandom/default.nix +++ b/pkgs/os-specific/linux/frandom/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl, kernelDev }: +{ stdenv, fetchurl, kernel }: let baseName = "frandom-1.1"; in stdenv.mkDerivation rec { - name = "${baseName}-${kernelDev.version}"; + name = "${baseName}-${kernel.version}"; src = fetchurl { url = "mirror://sourceforge/frandom/${baseName}.tar.gz"; @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { }; preBuild = '' - kernelVersion=$(cd ${kernelDev}/lib/modules && ls) + kernelVersion=${kernel.modDirVersion} substituteInPlace Makefile \ --replace "\$(shell uname -r)" "$kernelVersion" \ - --replace "/lib/modules" "${kernelDev}/lib/modules" + --replace "/lib/modules" "${kernel.dev}/lib/modules" ''; installPhase = '' - kernelVersion=$(cd ${kernelDev}/lib/modules && ls) + kernelVersion=${kernel.modDirVersion} ensureDir $out/lib/modules/$kernelVersion/misc cp frandom.ko $out/lib/modules/$kernelVersion/misc diff --git a/pkgs/os-specific/linux/iscsitarget/default.nix b/pkgs/os-specific/linux/iscsitarget/default.nix deleted file mode 100644 index e07409aa08d3..000000000000 --- a/pkgs/os-specific/linux/iscsitarget/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchurl, kernelDev, module_init_tools}: - -stdenv.mkDerivation rec { - name = "iscsitarget-1.4.20.2-${kernelDev.version}"; - - src = fetchurl { - url = "mirror://sourceforge/iscsitarget/iscsitarget/1.4.20.2/${name}.tar.gz"; - sha256 = "126kp0yc7vmvdbaw2xfav89340b0h91dvvyib5qbvyrq40n8wg0g"; - }; - - KSRC = "${kernelDev}/lib/modules/*/build"; - - DESTDIR = "$(out)"; - - preConfigure = '' - export PATH=$PATH:${module_init_tools}/sbin - sed -i 's|/usr/|/|' Makefile - ''; - - buildInputs = [ module_init_tools ]; - - meta = { - description = "iSCSI Enterprise Target (IET), software for building an iSCSI storage system on Linux"; - license = "GPLv2+"; - homepage = http://iscsitarget.sourceforge.net; - }; -} diff --git a/pkgs/os-specific/linux/iwlwifi/default.nix b/pkgs/os-specific/linux/iwlwifi/default.nix deleted file mode 100644 index 1a28720f0042..000000000000 --- a/pkgs/os-specific/linux/iwlwifi/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{stdenv, fetchurl, kernelDev}: - -let version = "1.2.25"; in - -stdenv.mkDerivation rec { - name = "iwlwifi-${version}-${kernelDev.version}"; - - src = fetchurl { - url = "http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-${version}.tgz"; - sha256 = "09fjy0swcyd77fdp8x2825wj5cd73hwbzl8mz9sy2ha21p1qwq1d"; - }; - - preBuild = '' - substituteInPlace scripts/generate_compatible \ - --replace '/usr/bin/env /bin/bash' $shell - substituteInPlace Makefile \ - --replace /sbin/depmod true - - # Urgh, we need the complete kernel sources for some header - # files. So unpack the original kernel source tarball and copy - # the configured include directory etc. on top of it. - kernelVersion=$(cd ${kernelDev}/lib/modules && ls) - kernelBuild=$(echo ${kernelDev}/lib/modules/$kernelVersion/source) - tar xvfj ${kernelDev.src} - kernelSource=$(echo $(pwd)/linux-*) - cp -prd $kernelBuild/* $kernelSource - - makeFlags=KSRC=$kernelSource - make $makeFlags || true - make $makeFlags - - installFlags=KMISC=$out/lib/modules/$kernelVersion/misc - ''; # */ - - meta = { - description = "Intel Wireless WiFi Link drivers for Linux"; - homepage = http://www.intellinuxwireless.org/; - license = "GPLv2"; - }; -} diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix new file mode 100644 index 000000000000..e4ce19457058 --- /dev/null +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -0,0 +1,25 @@ +{ stdenv, kernel, perl }: + +let + baseBuildFlags = [ "INSTALL_HDR_PATH=$(out)" "headers_install" ]; +in stdenv.mkDerivation { + name = "linux-headers-${kernel.version}"; + + inherit (kernel) src patches; + + nativeBuildInputs = [ perl ]; + + buildFlags = [ "ARCH=${stdenv.platform.kernelArch}" ] ++ baseBuildFlags; + + crossAttrs = { + inherit (kernel.crossDrv) src patches; + buildFlags = [ "ARCH=${stdenv.cross.platform.kernelArch}" ] ++ baseBuildFlags; + }; + + installPhase = '' + find $out \( -name ..install.cmd -o -name .install \) -print0 | xargs -0 rm + ''; + + # Headers shouldn't reference anything else + allowedReferences = []; +} diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index c8910f8ed06e..67e8f0655393 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -144,7 +144,7 @@ let # !!! No documentation on how much of the source tree must be kept # If/when kernel builds fail due to missing files, you can undelete # them here - ls -A | grep -v Makefile | xargs rm -fR + find -empty -type d -delete '' else optionalString installsFirmware '' make firmware_install $makeFlags "''${makeFlagsArray[@]}" \ $installFlags "''${installFlagsArray[@]}" diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index b55312fe5609..efa23f67846b 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -18,24 +18,6 @@ let }; }; - makeAufs3StandalonePatch = {version, rev, sha256}: - - stdenv.mkDerivation { - name = "aufs3-standalone-${version}.patch"; - - src = fetchgit { - url = git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git; - inherit sha256 rev; - }; - - phases = [ "unpackPhase" "installPhase" ]; - - # Instructions from http://aufs.git.sourceforge.net/git/gitweb.cgi?p=aufs/aufs3-standalone.git;a=blob;f=Documentation/filesystems/aufs/README;h=b8cf077635b323d1b454266366f05f476bbd09cb;hb=1067b9d8d64d23c70d905c9cd3c90a669e39c4d4 - installPhase = '' - cat aufs3-base.patch aufs3-proc_map.patch aufs3-standalone.patch > $out - ''; - }; - makeAppArmorPatch = {apparmor, version}: stdenv.mkDerivation { name = "apparmor-${version}.patch"; @@ -68,34 +50,6 @@ rec { features.secPermPatch = true; }; - aufs3_2 = rec { - name = "aufs3.2"; - version = "3.2.20121210"; - utilRev = "91af15f977d12e02165759620005f6ce1a4d7602"; - utilHash = "dda4df89828dcf0e4012d88b4aa3eda8c30af69d6530ff5fedc2411de872c996"; - patch = makeAufs3StandalonePatch { - inherit version; - rev = "0bf50c3b82f98e2ddc4c9ba0657f28ebfa8d15cb"; - sha256 = "bc4b65cb77c62744db251da98488fdf4962f14a144c045cea6cbbbd42718ff89"; - }; - features.aufsBase = true; - features.aufs3 = true; - }; - - aufs3_4 = rec { - name = "aufs3.4"; - version = "3.4.20121210"; - utilRev = "91af15f977d12e02165759620005f6ce1a4d7602"; - utilHash = "dda4df89828dcf0e4012d88b4aa3eda8c30af69d6530ff5fedc2411de872c996"; - patch = makeAufs3StandalonePatch { - inherit version; - rev = "2faacd9baffb37df3b9062cc554353eebe68df1e"; - sha256 = "3ecf97468f5e85970d9fd2bfc61e38c7f5ae2c6dde0045d5a17de085c411d452"; - }; - features.aufsBase = true; - features.aufs3 = true; - }; - no_xsave = { name = "no-xsave"; patch = ./no-xsave.patch; diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 04924f013a45..3fb18a234729 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -1,13 +1,13 @@ -{ stdenv, kernelDev, elfutils, python, perl, newt, slang, asciidoc, xmlto +{ stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto , docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig , withGtk ? false, gtk ? null }: assert withGtk -> gtk != null; stdenv.mkDerivation { - name = "perf-linux-${kernelDev.version}"; + name = "perf-linux-${kernel.version}"; - inherit (kernelDev) src patches; + inherit (kernel) src patches; preConfigure = '' cd tools/perf @@ -31,6 +31,7 @@ stdenv.mkDerivation { propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ]; makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-"; elfutils = elfutils.crossDrv; + inherit (kernel.crossDrv) src patches; }; meta = { diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 97bdd9ebacb2..df44cb68d8bd 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -1,74 +1,48 @@ -{ stdenv, fetchurl, perl, bison, mktemp, linuxHeaders, linuxHeadersCross, kernelDev ? null }: - -assert stdenv.isLinux; +{ stdenv, fetchurl, kernelHeaders, kernel, perl }: let - version = "1.5.24"; - baseMakeFlags = ["V=1" "prefix=$out" "SHLIBDIR=$out/lib"]; + version = "2.0.3"; + + commonMakeFlags = [ + "prefix=$(out)" + "SHLIBDIR=$(out)/lib" + ]; in stdenv.mkDerivation { - name = "klibc-${version}${stdenv.lib.optionalString (kernelDev != null) "-${kernelDev.version}"}"; + name = "klibc-${version}-${kernel.version}"; src = fetchurl { - url = "mirror://kernel/linux/libs/klibc/1.5/klibc-${version}.tar.bz2"; - sha256 = "18lm32dlj9k2ky9wwk274zmc3jndgrb41b6qm82g3lza6wlw3yki"; + url = "mirror://kernel/linux/libs/klibc/2.0/klibc-${version}.tar.xz"; + sha256 = "02035f2b230020de569d40605485121e0fe481ed33a93bdb8bf8c6ee2695fffa"; }; - # Trick to make this build on nix. It expects to have the kernel sources - # instead of only the linux kernel headers. - # So it cannot run the 'make headers_install' it wants to run. - # We don't install the headers, so klibc will not be useful as libc, but - # usually in nixpkgs we only use the userspace tools comming with klibc. - prePatch = stdenv.lib.optionalString (kernelDev == null) '' - sed -i -e /headers_install/d scripts/Kbuild.install - ''; - - makeFlags = baseMakeFlags; + patches = [ ./no-reinstall-kernel-headers.patch ]; - inherit linuxHeaders; + nativeBuildInputs = [ perl ]; + + makeFlags = commonMakeFlags ++ [ + "KLIBCARCH=${stdenv.platform.kernelArch}" + "KLIBCKERNELSRC=${kernelHeaders}" + ] ++ stdenv.lib.optional (stdenv.platform.kernelArch == "arm") "CONFIG_AEABI=y"; crossAttrs = { - makeFlags = baseMakeFlags ++ [ "CROSS_COMPILE=${stdenv.cross.config}-" - "KLIBCARCH=${stdenv.cross.arch}" ]; - - patchPhase = '' - sed -i 's/-fno-pic -mno-abicalls/& -mabi=32/' usr/klibc/arch/mips/MCONFIG - sed -i /KLIBCKERNELSRC/d scripts/Kbuild.install - # Wrong check for __mips64 in klibc - sed -i s/__mips64__/__mips64/ usr/include/fcntl.h - ''; - - linuxHeaders = linuxHeadersCross; + makeFlags = commonMakeFlags ++ [ + "KLIBCARCH=${stdenv.cross.platform.kernelArch}" + "KLIBCKERNELSRC=${kernelHeaders.crossDrv}" + "CROSS_COMPILE=${stdenv.cross.config}-" + ] ++ stdenv.lib.optional (stdenv.cross.platform.kernelArch == "arm") "CONFIG_AEABI=y"; }; - - # The AEABI option concerns only arm systems, and does not affect the build for - # other systems. - preBuild = '' - sed -i /CONFIG_AEABI/d defconfig - echo "CONFIG_AEABI=y" >> defconfig - makeFlags=$(eval "echo $makeFlags") - '' + (if kernelDev == null then '' - mkdir linux - cp -prsd $linuxHeaders/include linux/ - chmod -R u+w linux/include/ - '' else '' - tar xvf ${kernelDev.src} - mv linux* linux - cd linux - ln -sv ${kernelDev}/config .config - make prepare - cd .. - ''); - # Install static binaries as well. postInstall = '' dir=$out/lib/klibc/bin.static mkdir $dir cp $(find $(find . -name static) -type f ! -name "*.g" -a ! -name ".*") $dir/ cp usr/dash/sh $dir/ + + for file in ${kernelHeaders}/include/*; do + ln -sv $file $out/lib/klibc/include + done ''; - - nativeBuildInputs = [ perl bison mktemp ]; } diff --git a/pkgs/os-specific/linux/klibc/no-reinstall-kernel-headers.patch b/pkgs/os-specific/linux/klibc/no-reinstall-kernel-headers.patch new file mode 100644 index 000000000000..d3e55fc8731d --- /dev/null +++ b/pkgs/os-specific/linux/klibc/no-reinstall-kernel-headers.patch @@ -0,0 +1,11 @@ +diff -Naur klibc-2.0.3-orig/scripts/Kbuild.install klibc-2.0.3/scripts/Kbuild.install +--- klibc-2.0.3-orig/scripts/Kbuild.install 2013-12-03 13:53:46.000000000 -0500 ++++ klibc-2.0.3/scripts/Kbuild.install 2014-01-04 18:17:09.342609021 -0500 +@@ -95,7 +95,6 @@ + $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include + $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib + $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin +- $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install + $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/. + $(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include + $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1 diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index e58d61e426ba..b9cc34345dff 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, kernelDev }: +{ stdenv, fetchurl, kernel }: stdenv.mkDerivation rec { pname = "lttng-modules-2.3.0"; - name = "${pname}-${kernelDev.version}"; + name = "${pname}-${kernel.version}"; src = fetchurl { url = "https://lttng.org/files/lttng-modules/${pname}.tar.bz2"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { patches = [ ./lttng-fix-build-error-on-linux-3.2.patch ]; preConfigure = '' - export KERNELDIR="${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build" + export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" export INSTALL_MOD_PATH="$out" ''; diff --git a/pkgs/os-specific/linux/ndiswrapper/default.nix b/pkgs/os-specific/linux/ndiswrapper/default.nix index e2db1a4106ba..f95de4335648 100644 --- a/pkgs/os-specific/linux/ndiswrapper/default.nix +++ b/pkgs/os-specific/linux/ndiswrapper/default.nix @@ -1,14 +1,17 @@ -{ stdenv, fetchurl, kernelDev, perl }: +{ stdenv, fetchurl, kernel, perl, kmod }: stdenv.mkDerivation { - name = "ndiswrapper-1.56-${kernelDev.version}"; + name = "ndiswrapper-1.59-${kernel.version}"; + + patches = [ ./no-sbin.patch ]; # need at least .config and include - kernel = kernelDev; + kernel = kernel.dev; buildPhase = " echo make KBUILD=$(echo \$kernel/lib/modules/*/build); echo -n $kernel/lib/modules/*/build > kbuild_path + export PATH=${kmod}/sbin:$PATH make KBUILD=$(echo \$kernel/lib/modules/*/build); "; @@ -23,14 +26,11 @@ stdenv.mkDerivation { # should we use unstable? src = fetchurl { - url = mirror://sourceforge/ndiswrapper/ndiswrapper-1.56.tar.gz; - sha256 = "10yqg1a08v6z1qm1qr1v4rbhl35c90gzrazapr09vp372hky8f57"; + url = mirror://sourceforge/ndiswrapper/ndiswrapper-1.59.tar.gz; + sha256 = "1g6lynccyg4m7gd7vhy44pypsn8ifmibq6rqgvc672pwngzx79b6"; }; - buildInputs = [ kernelDev perl ]; - - # this is a patch against svn head, not stable version - patches = [./prefix.patch]; + buildInputs = [ perl ]; meta = { description = "Ndis driver wrapper for the Linux kernel"; diff --git a/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch b/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch new file mode 100644 index 000000000000..cfc048d772bd --- /dev/null +++ b/pkgs/os-specific/linux/ndiswrapper/no-sbin.patch @@ -0,0 +1,12 @@ +diff -Naur ndiswrapper-1.59-orig/driver/Makefile ndiswrapper-1.59/driver/Makefile +--- ndiswrapper-1.59-orig/driver/Makefile 2013-11-28 14:42:35.000000000 -0500 ++++ ndiswrapper-1.59/driver/Makefile 2014-01-04 18:31:43.242377375 -0500 +@@ -191,7 +191,7 @@ + rm -rf .tmp_versions + + install: config_check $(MODULE) +- @/sbin/modinfo $(MODULE) | grep -q "^vermagic: *$(KVERS) " || \ ++ @modinfo $(MODULE) | grep -q "^vermagic: *$(KVERS) " || \ + { echo "$(MODULE)" is not for Linux $(KVERS); exit 1; } + mkdir -p -m 755 $(DESTDIR)$(INST_DIR) + install -m 0644 $(MODULE) $(DESTDIR)$(INST_DIR) diff --git a/pkgs/os-specific/linux/ndiswrapper/prefix.patch b/pkgs/os-specific/linux/ndiswrapper/prefix.patch deleted file mode 100644 index ec77f4cae791..000000000000 --- a/pkgs/os-specific/linux/ndiswrapper/prefix.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -r -u ndiswrapper-1.53/driver/loader.c ndiswrapper-1.53/driver/loader.c ---- ndiswrapper-1.53/driver/loader.c 2008-05-28 06:54:08.000000000 +0400 -+++ ndiswrapper-1.53/driver/loader.c 2008-06-15 17:05:07.000000000 +0400 -@@ -100,7 +100,7 @@ - EXIT1(return NULL); - } - INIT_COMPLETION(loader_complete); -- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env, 1); -+ ret = call_usermodehelper(USERMOD_HELPER, argv, env, 1); - if (ret) { - up(&loader_mutex); - ERROR("couldn't load driver %s; check system log " -@@ -262,7 +262,7 @@ - EXIT1(return NULL); - } - INIT_COMPLETION(loader_complete); -- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env, 1); -+ ret = call_usermodehelper(USERMOD_HELPER, argv, env, 1); - if (ret) { - up(&loader_mutex); - ERROR("couldn't load file %s/%s; check system log " -@@ -698,7 +698,7 @@ - EXIT1(return NULL); - } - INIT_COMPLETION(loader_complete); -- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env, 1); -+ ret = call_usermodehelper(USERMOD_HELPER, argv, env, 1); - if (ret) { - up(&loader_mutex); - TRACE1("couldn't load device %04x:%04x; check system " -diff -r -u ndiswrapper-1.53/driver/Makefile ndiswrapper-1.53/driver/Makefile ---- ndiswrapper-1.53/driver/Makefile 2008-05-28 06:54:08.000000000 +0400 -+++ ndiswrapper-1.53/driver/Makefile 2008-06-15 17:03:31.000000000 +0400 -@@ -95,6 +95,10 @@ - EXTRA_CFLAGS += -DWRAP_PREEMPT - endif - -+ifdef DIST_DESTDIR -+EXTRA_CFLAGS += -DPREFIX=\"$(DIST_DESTDIR)\" -+endif -+ - OBJS = crt.o hal.o iw_ndis.o loader.o ndis.o ntoskernel.o ntoskernel_io.o \ - pe_linker.o pnp.o proc.o rtl.o wrapmem.o wrapndis.o wrapper.o - -diff -r -u ndiswrapper-1.53/driver/ndiswrapper.h ndiswrapper-1.53/driver/ndiswrapper.h ---- ndiswrapper-1.53/driver/ndiswrapper.h 2008-05-28 06:54:08.000000000 +0400 -+++ ndiswrapper-1.53/driver/ndiswrapper.h 2008-06-15 17:06:37.000000000 +0400 -@@ -19,8 +19,17 @@ - #define DRIVER_VERSION "1.53" - #define UTILS_VERSION "1.9" - -+#ifndef PREFIX -+#define PREFIX -+#endif -+ - #define DRIVER_NAME "ndiswrapper" --#define DRIVER_CONFIG_DIR "/etc/ndiswrapper" -+ -+#ifndef DRIVER_CONFIG_DIR -+# define DRIVER_CONFIG_DIR PREFIX "/etc/ndiswrapper" -+#endif -+ -+#define USERMOD_HELPER PREFIX "/sbin/loadndisdriver" - - #define SSID_MAX_WPA_IE_LEN 40 - #define NDIS_ESSID_MAX_SIZE 32 diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix index 9a34c503f6d3..a863ee8a4d04 100644 --- a/pkgs/os-specific/linux/netatop/default.nix +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, kernelDev, zlib }: +{ stdenv, fetchurl, kernel, zlib }: stdenv.mkDerivation { - name = "netatop-${kernelDev.version}-0.3"; + name = "netatop-${kernel.version}-0.3"; src = fetchurl { url = http://www.atoptool.nl/download/netatop-0.3.tar.gz; @@ -12,9 +12,9 @@ stdenv.mkDerivation { preConfigure = '' patchShebangs mkversion - sed -i -e 's,^KERNDIR.*,KERNDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build,' \ + sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \ */Makefile - sed -i -e 's,/lib/modules.*extra,'$out'/lib/modules/${kernelDev.modDirVersion}/extra,' \ + sed -i -e 's,/lib/modules.*extra,'$out'/lib/modules/${kernel.modDirVersion}/extra,' \ -e s,/usr,$out, \ -e /init.d/d \ -e /depmod/d \ @@ -23,7 +23,7 @@ stdenv.mkDerivation { preInstall = '' ensureDir $out/bin $out/sbin $out/share/man/man{4,8} - ensureDir $out/lib/modules/${kernelDev.modDirVersion}/extra + ensureDir $out/lib/modules/${kernel.modDirVersion}/extra ''; meta = { diff --git a/pkgs/os-specific/linux/nvidia-x11/builder-legacy.sh b/pkgs/os-specific/linux/nvidia-x11/builder-legacy.sh index 6062566cbfb1..7d39dd311897 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder-legacy.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder-legacy.sh @@ -29,11 +29,10 @@ buildPhase() { # Create the module. kernelVersion=$(cd $kernel/lib/modules && ls) - sysSrc=$(echo $kernel/lib/modules/$kernelVersion/build/) + sysSource=$(echo $kernel/lib/modules/$kernelVersion/source) + sysOut=$(echo $kernel/lib/modules/$kernelVersion/build) unset src # used by the nv makefile - # Hack necessary to compile on 2.6.28. - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$sysSrc/include/asm/mach-default" - make SYSSRC=$sysSrc module + make SYSSRC=$sysSource SYSOUT=$sysOut module cd ../../.. fi } diff --git a/pkgs/os-specific/linux/nvidia-x11/builder-legacy304.sh b/pkgs/os-specific/linux/nvidia-x11/builder-legacy304.sh index bb8beab29c58..7771fb988f58 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder-legacy304.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder-legacy304.sh @@ -14,11 +14,10 @@ buildPhase() { echo "Building linux driver against kernel: $kernel"; cd kernel kernelVersion=$(cd $kernel/lib/modules && ls) - sysSrc=$(echo $kernel/lib/modules/$kernelVersion/build/) + sysSrc=$(echo $kernel/lib/modules/$kernelVersion/source) + sysOut=$(echo $kernel/lib/modules/$kernelVersion/build) unset src # used by the nv makefile - # Hack necessary to compile on 2.6.28. - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$sysSrc/include/asm/mach-default -I$sysSrc/include/generated" - make SYSSRC=$sysSrc module + make SYSSRC=$sysSrc SYSOUT=$sysOut module cd .. fi } diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 28e2bd5642c0..51144bc10519 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -16,11 +16,10 @@ buildPhase() { echo "Building linux driver against kernel: $kernel"; cd kernel kernelVersion=$(cd $kernel/lib/modules && ls) - sysSrc=$(echo $kernel/lib/modules/$kernelVersion/build/) + sysSrc=$(echo $kernel/lib/modules/$kernelVersion/source) + sysOut=$(echo $kernel/lib/modules/$kernelVersion/build) unset src # used by the nv makefile - # Hack necessary to compile on 2.6.28. - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$sysSrc/include/asm/mach-default -I$sysSrc/include/generated" - make SYSSRC=$sysSrc module + make SYSSRC=$sysSrc SYSOUT=$sysOut module cd .. fi } diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 02eb65123d80..c89e5550f3ec 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernelDev ? null, xlibs, zlib, perl +{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl , gtk, atk, pango, glib, gdk_pixbuf , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit @@ -15,7 +15,7 @@ let in stdenv.mkDerivation { - name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernelDev.version}"}"; + name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}"; builder = ./builder.sh; @@ -34,7 +34,7 @@ stdenv.mkDerivation { inherit versionNumber libsOnly; - kernel = if libsOnly then null else kernelDev; + kernel = if libsOnly then null else kernel.dev; dontStrip = true; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix index a03e3d4ca7e4..d85c0c1a389f 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix @@ -1,13 +1,13 @@ -{stdenv, fetchurl, kernelDev, xlibs, zlib, gtk, atk, pango, glib, gdk_pixbuf}: +{stdenv, fetchurl, kernel, xlibs, zlib, gtk, atk, pango, glib, gdk_pixbuf}: let - versionNumber = "173.14.36"; + versionNumber = "173.14.39"; in stdenv.mkDerivation { - name = "nvidia-x11-${versionNumber}-${kernelDev.version}"; + name = "nvidia-x11-${versionNumber}-${kernel.version}"; builder = ./builder-legacy.sh; @@ -15,16 +15,16 @@ stdenv.mkDerivation { if stdenv.system == "i686-linux" then fetchurl { url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run"; - sha256 = "19wnikms9wradf1kmaywnp7hykrdm4xqz2ka7az66s3ma096y95c"; + sha256 = "08xb7s7cxmj4zv4i3645kjhlhhwxiq6km9ixmsw3vv91f7rkb6d0"; } else if stdenv.system == "x86_64-linux" then fetchurl { url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run"; - sha256 = "1xf1w6qvqw0a3vd807hp3cgqmzm1wkpz2by52p0qgpjqld421k2s"; + sha256 = "1p2ls0xj81l8v4n6dbjj3p5wlw1iyhgzyvqcv4h5fdxhhs2cb3md"; } else throw "nvidia-x11 does not support platform ${stdenv.system}"; - kernel = kernelDev; + kernel = kernel.dev; inherit versionNumber; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix index bd88e847b6ee..0665ff83ea78 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernelDev ? null, xlibs, zlib, perl +{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl , gtk, atk, pango, glib, gdk_pixbuf , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit @@ -11,7 +11,7 @@ with stdenv.lib; let versionNumber = "304.117"; in stdenv.mkDerivation { - name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernelDev.version}"}"; + name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}"; builder = ./builder-legacy304.sh; @@ -30,7 +30,7 @@ stdenv.mkDerivation { inherit versionNumber libsOnly; - kernel = if libsOnly then null else kernelDev; + kernel = if libsOnly then null else kernel.dev; dontStrip = true; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy96.nix b/pkgs/os-specific/linux/nvidia-x11/legacy96.nix deleted file mode 100644 index 32fc3632b05a..000000000000 --- a/pkgs/os-specific/linux/nvidia-x11/legacy96.nix +++ /dev/null @@ -1,44 +0,0 @@ -{stdenv, fetchurl, kernelDev, xlibs, zlib, gtk, atk, pango, glib}: - -let - - versionNumber = "96.43.23"; - -in - -stdenv.mkDerivation { - name = "nvidia-x11-${versionNumber}-${kernelDev.version}"; - - builder = ./builder-legacy.sh; - - src = - if stdenv.system == "i686-linux" then - fetchurl { - url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run"; - sha256 = "0hi10h26l51mknr57zsdg0zaxcqdz1lp3hsz0hi1c1vkpbsavrji"; - } - else if stdenv.system == "x86_64-linux" then - fetchurl { - url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run"; - sha256 = "09vynha40rsxpklj1m0qjfg853ckdpi9g87h06irikh405x57kzp"; - } - else throw "nvidia-x11 does not support platform ${stdenv.system}"; - - kernel = kernelDev; - - inherit versionNumber; - - dontStrip = true; - - glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; - - cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.gcc.gcc]; - - programPath = stdenv.lib.makeLibraryPath [ gtk atk pango glib xlibs.libXv ]; - - meta = { - homepage = http://www.nvidia.com/object/unix.html; - description = "X.org driver and kernel module for Legacy NVIDIA graphics cards"; - license = "unfree"; - }; -} diff --git a/pkgs/os-specific/linux/open-iscsi/default.nix b/pkgs/os-specific/linux/open-iscsi/default.nix index 60e0e4d189c0..e28593d02522 100644 --- a/pkgs/os-specific/linux/open-iscsi/default.nix +++ b/pkgs/os-specific/linux/open-iscsi/default.nix @@ -1,14 +1,15 @@ -{ stdenv, fetchurl, kernelDev}: - -stdenv.mkDerivation rec { - name = "open-iscsi-2.0-871-${kernelDev.version}"; +{ stdenv, fetchurl, kernel}: +let + pname = "open-iscsi-2.0-871"; +in stdenv.mkDerivation { + name = "${pname}-${kernel.version}"; src = fetchurl { - url = "http://www.open-iscsi.org/bits/${name}.tar.gz"; + url = "http://www.open-iscsi.org/bits/${pname}.tar.gz"; sha256 = "1jvx1agybaj4czhz41bz37as076spicsmlh5pjksvwl2mr38gsmw"; }; - KSRC = "${kernelDev}/lib/modules/*/build"; + KSRC = "${kernel.dev}/lib/modules/*/build"; DESTDIR = "$(out)"; preConfigure = '' @@ -21,5 +22,6 @@ stdenv.mkDerivation rec { description = "A high performance, transport independent, multi-platform implementation of RFC3720"; license = "GPLv2+"; homepage = http://www.open-iscsi.org; + broken = true; }; } diff --git a/pkgs/os-specific/linux/psmouse-alps/default.nix b/pkgs/os-specific/linux/psmouse-alps/default.nix index 834acd72ef20..65f1a5cf6c61 100644 --- a/pkgs/os-specific/linux/psmouse-alps/default.nix +++ b/pkgs/os-specific/linux/psmouse-alps/default.nix @@ -1,15 +1,17 @@ -{ stdenv, fetchurl, kernelDev, zlib }: +{ stdenv, fetchurl, kernel, zlib }: /* Only useful for kernels 3.2 to 3.5. Fails to build in 3.8. 3.9 upstream already includes a proper alps driver for this */ +assert builtins.compareVersions "3.8" kernel.version == 1; + let ver = "1.3"; bname = "psmouse-alps-${ver}"; in stdenv.mkDerivation { - name = "psmouse-alps-${kernelDev.version}-${ver}"; + name = "psmouse-alps-${kernel.version}-${ver}"; src = fetchurl { url = http://www.dahetral.com/public-download/alps-psmouse-dlkm-for-3-2-and-3-5/at_download/file; @@ -19,12 +21,12 @@ stdenv.mkDerivation { buildPhase = '' cd src/${bname}/src - make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \ + make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ SUBDIRS=`pwd` INSTALL_PATH=$out ''; installPhase = '' - make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \ + make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ INSTALL_MOD_PATH=$out SUBDIRS=`pwd` modules_install ''; diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index 6a9a4cc963fa..ee264f67127a 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, kernelDev, perl, autoconf, automake, libtool, coreutils, gawk }: +{ stdenv, fetchurl, kernel, perl, autoconf, automake, libtool, coreutils, gawk }: stdenv.mkDerivation { - name = "spl-0.6.2-${kernelDev.version}"; + name = "spl-0.6.2-${kernel.version}"; src = fetchurl { url = http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-0.6.2.tar.gz; sha256 = "196scl8q0bkkak6m0p1l1fz254cgsizqm73bf9wk3iynamq7qmrw"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { patches = [ ./install_prefix.patch ]; - buildInputs = [ perl kernelDev autoconf automake libtool ]; + buildInputs = [ perl autoconf automake libtool ]; preConfigure = '' ./autogen.sh @@ -23,8 +23,8 @@ stdenv.mkDerivation { ''; configureFlags = '' - --with-linux=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build - --with-linux-obj=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build + --with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source + --with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build ''; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/tp_smapi/default.nix b/pkgs/os-specific/linux/tp_smapi/default.nix index 140021605eaf..40d9e7c10682 100644 --- a/pkgs/os-specific/linux/tp_smapi/default.nix +++ b/pkgs/os-specific/linux/tp_smapi/default.nix @@ -1,23 +1,21 @@ -{stdenv, fetchurl, kernelDev}: +{stdenv, fetchurl, kernel}: stdenv.mkDerivation { - name = "tp_smapi-0.41-${kernelDev.version}"; + name = "tp_smapi-0.41-${kernel.version}"; src = fetchurl { url = "https://github.com/downloads/evgeni/tp_smapi/tp_smapi-0.41.tar.gz"; sha256 = "6aef02b92d10360ac9be0db29ae390636be55017990063a092a285c70b54e666"; }; - buildInputs = [ kernelDev ]; - makeFlags = [ - "KBASE=${kernelDev}/lib/modules/${kernelDev.modDirVersion}" + "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}" "SHELL=/bin/sh" ]; installPhase = '' - install -v -D -m 644 thinkpad_ec.ko "$out/lib/modules/${kernelDev.modDirVersion}/kernel/drivers/firmware/thinkpad_ec.ko" - install -v -D -m 644 tp_smapi.ko "$out/lib/modules/${kernelDev.modDirVersion}/kernel/drivers/firmware/tp_smapi.ko" + install -v -D -m 644 thinkpad_ec.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/firmware/thinkpad_ec.ko" + install -v -D -m 644 tp_smapi.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/firmware/tp_smapi.ko" ''; dontStrip = true; diff --git a/pkgs/os-specific/linux/v86d/default.nix b/pkgs/os-specific/linux/v86d/default.nix index 4c6045e1a6cb..2ad3087d6a17 100644 --- a/pkgs/os-specific/linux/v86d/default.nix +++ b/pkgs/os-specific/linux/v86d/default.nix @@ -1,7 +1,7 @@ -{stdenv, fetchurl, klibc, kernelDev, withKlibc ? true}: +{stdenv, fetchurl, klibc, kernel, withKlibc ? true}: stdenv.mkDerivation rec { - name = "v86d-${version}-${kernelDev.version}"; + name = "v86d-${version}-${kernel.version}"; version = "0.1.10"; src = fetchurl { @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { configureFlags = if withKlibc then [ "--with-klibc" ] else [ "--default" ]; makeFlags = [ - "KDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/source" + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" "DESTDIR=$(out)" ]; @@ -27,7 +27,6 @@ stdenv.mkDerivation rec { homepage = http://dev.gentoo.org/~spock/projects/uvesafb/; license = "BSD"; platforms = [ "i686-linux" "x86_64-linux" ]; - broken = true; }; } diff --git a/pkgs/os-specific/linux/wis-go7007/default.nix b/pkgs/os-specific/linux/wis-go7007/default.nix index 7f27196ba6bd..538686720257 100644 --- a/pkgs/os-specific/linux/wis-go7007/default.nix +++ b/pkgs/os-specific/linux/wis-go7007/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, kernelDev, ncurses, fxload}: +{stdenv, fetchurl, kernel, ncurses, fxload}: let @@ -12,7 +12,7 @@ let in stdenv.mkDerivation { - name = "wis-go7007-0.9.8-${kernelDev.version}"; + name = "wis-go7007-0.9.8-${kernel.version}"; src = fetchurl { url = http://gentoo.osuosl.org/distfiles/wis-go7007-linux-0.9.8.tar.bz2; @@ -47,16 +47,6 @@ stdenv.mkDerivation { ''; preBuild = '' - # Urgh, we need the complete kernel sources for some header - # files. So unpack the original kernel source tarball and copy - # the configured include directory etc. on top of it. - kernelVersion=$(cd ${kernelDev}/lib/modules && ls) - kernelBuild=$(echo ${kernelDev}/lib/modules/$kernelVersion/source) - tar xvfj ${kernelDev.src} - kernelSource=$(echo $(pwd)/linux-*) - cp -prd $kernelBuild/* $kernelSource - - #includeDir=$out/lib/modules/$kernelVersion/source/include/linux includeDir=$TMPDIR/scratch substituteInPlace Makefile \ --replace '$(DESTDIR)$(KSRC)/include/linux' $includeDir \ @@ -65,7 +55,7 @@ stdenv.mkDerivation { mkdir -p $out/etc/hotplug/usb mkdir -p $out/etc/udev/rules.d - makeFlagsArray=(KERNELSRC=$kernelSource \ + makeFlagsArray=(KERNELSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source \ FIRMWARE_DIR=$out/firmware FXLOAD=${fxload}/sbin/fxload \ DESTDIR=$out SKIP_DEPMOD=1 \ USE_UDEV=y) @@ -79,5 +69,6 @@ stdenv.mkDerivation { meta = { description = "Kernel module for the Micronas GO7007, used in a number of USB TV devices"; homepage = http://oss.wischip.com/; + broken = true; }; } diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 06615d170a17..67ed1312826a 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, kernelDev, spl, perl, autoconf, automake, libtool, zlib, libuuid, coreutils, utillinux }: +{ stdenv, fetchurl, kernel, spl, perl, autoconf, automake, libtool, zlib, libuuid, coreutils, utillinux }: stdenv.mkDerivation { - name = "zfs-0.6.2-${kernelDev.version}"; + name = "zfs-0.6.2-${kernel.version}"; src = fetchurl { url = http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-0.6.2.tar.gz; @@ -10,7 +10,7 @@ stdenv.mkDerivation { patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ]; - buildInputs = [ kernelDev spl perl autoconf automake libtool zlib libuuid coreutils ]; + buildInputs = [ spl perl autoconf automake libtool zlib libuuid coreutils ]; # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work NIX_CFLAGS_LINK = "-lgcc_s"; @@ -28,8 +28,8 @@ stdenv.mkDerivation { ''; configureFlags = '' - --with-linux=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build - --with-linux-obj=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build + --with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source + --with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build --with-spl=${spl}/libexec/spl ''; diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix index 462ecadd346d..ba0b80fc61e8 100644 --- a/pkgs/servers/openafs-client/default.nix +++ b/pkgs/servers/openafs-client/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, which, autoconf, automake, flex, yacc, - kernelDev, glibc, ncurses, perl, krb5 }: + kernel, glibc, ncurses, perl, krb5 }: assert stdenv.isLinux; stdenv.mkDerivation { - name = "openafs-1.6.1-${kernelDev.version}"; + name = "openafs-1.6.1-${kernel.version}"; src = fetchurl { url = http://www.openafs.org/dl/openafs/1.6.1/openafs-1.6.1-src.tar.bz2; @@ -14,7 +14,7 @@ stdenv.mkDerivation { buildInputs = [ autoconf automake flex yacc ncurses perl which ]; preConfigure = '' - ln -s ${kernelDev}/lib/modules/*/build $TMP/linux + ln -s ${kernel.dev}/lib/modules/*/build $TMP/linux patchShebangs . for i in `grep -l -R '/usr/\(include\|src\)' .`; do diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c595cba8f064..56f812136dc6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6707,7 +6707,6 @@ let inherit fetchurl stdenv perl linuxManualConfig; kernelPatches = [ kernelPatches.sec_perm_2_6_24 - # kernelPatches.aufs3_2 ]; }; @@ -6757,7 +6756,6 @@ let inherit fetchurl stdenv perl linuxManualConfig; kernelPatches = [ kernelPatches.sec_perm_2_6_24 - # kernelPatches.aufs3_4 ] ++ lib.optionals (platform.kernelArch == "mips") [ kernelPatches.mips_fpureg_emu kernelPatches.mips_fpu_sigill @@ -6831,8 +6829,6 @@ let linuxPackagesFor = kernel: self: let callPackage = newScope self; in { inherit kernel; - kernelDev = kernel.dev or kernel; - acpi_call = callPackage ../os-specific/linux/acpi-call {}; batman_adv = callPackage ../os-specific/linux/batman-adv {}; @@ -6841,45 +6837,20 @@ let ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { }; - aufs = - if self.kernel.features ? aufs2 then - callPackage ../os-specific/linux/aufs/2.nix { } - else if self.kernel.features ? aufs3 then - callPackage ../os-specific/linux/aufs/3.nix { } - else null; - - aufs_util = - if self.kernel.features ? aufs2 then - callPackage ../os-specific/linux/aufs-util/2.nix { } - else if self.kernel.features ? aufs3 then - callPackage ../os-specific/linux/aufs-util/3.nix { } - else null; - blcr = callPackage ../os-specific/linux/blcr { }; cryptodev = callPackage ../os-specific/linux/cryptodev { }; e1000e = callPackage ../os-specific/linux/e1000e {}; - exmap = callPackage ../os-specific/linux/exmap { }; - frandom = callPackage ../os-specific/linux/frandom { }; - iscsitarget = callPackage ../os-specific/linux/iscsitarget { }; - - iwlwifi = callPackage ../os-specific/linux/iwlwifi { }; - lttngModules = callPackage ../os-specific/linux/lttng-modules { }; - atheros = callPackage ../os-specific/linux/atheros/0.9.4.nix { }; - broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { }; - broadcom_sta6 = callPackage ../os-specific/linux/broadcom-sta-v6/default.nix { }; - nvidia_x11 = callPackage ../os-specific/linux/nvidia-x11 { }; - nvidia_x11_legacy96 = callPackage ../os-specific/linux/nvidia-x11/legacy96.nix { }; nvidia_x11_legacy173 = callPackage ../os-specific/linux/nvidia-x11/legacy173.nix { }; nvidia_x11_legacy304 = callPackage ../os-specific/linux/nvidia-x11/legacy304.nix { }; @@ -6889,9 +6860,9 @@ let wis_go7007 = callPackage ../os-specific/linux/wis-go7007 { }; - klibc = callPackage ../os-specific/linux/klibc { - linuxHeaders = glibc.kernelHeaders; - }; + kernelHeaders = callPackage ../os-specific/linux/kernel-headers { }; + + klibc = callPackage ../os-specific/linux/klibc { }; /* compiles but has to be integrated into the kernel somehow Let's have it uncommented and finish it.. @@ -6906,10 +6877,6 @@ let spl = callPackage ../os-specific/linux/spl/default.nix { }; - sysprof = callPackage ../development/tools/profiling/sysprof { - inherit (gnome) libglade; - }; - tp_smapi = callPackage ../os-specific/linux/tp_smapi { }; v86d = callPackage ../os-specific/linux/v86d { }; @@ -7098,6 +7065,10 @@ let sysfsutils = callPackage ../os-specific/linux/sysfsutils { }; + sysprof = callPackage ../development/tools/profiling/sysprof { + inherit (gnome) libglade; + }; + # Provided with sysfsutils. libsysfs = sysfsutils; systool = sysfsutils; @@ -7114,7 +7085,6 @@ let inherit (gnome) libglademm; }; - # In nixos, you can set systemd.package = pkgs.systemd_with_lvm2 to get # LVM2 working in systemd. systemd_with_lvm2 = pkgs.lib.overrideDerivation pkgs.systemd (p: { diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix index ef7b1da92ab6..74778c57fe82 100644 --- a/pkgs/top-level/release-python.nix +++ b/pkgs/top-level/release-python.nix @@ -1082,8 +1082,6 @@ let acpi_call = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; atheros = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; ati_drivers_x11 = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; - aufs = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; - aufs_util = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; bbswitch = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; broadcom_sta = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; }; cryptodev = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };