4fa4ab3a6e
First, pass in `self' again so that overriding works properly (thanks for pointing that out, @edolstra) Second, instead of having linuxPackages*.kernel mean something different inside the set and out, add a new attribute linuxPackages*.kernelDev, which for the generic kernel is simply linuxPackages*.kernel but for the manual-config kernel is the `dev' output (which has the build tree, source tree, etc.) The second change required trivial modifications in a bunch of expressions, I verified that all of the linuxPackages* sets defined in all-packages.nix have the same drv paths before and after the change. Signed-off-by: Shea Levy <shea@shealevy.com>
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{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";
|
|
};
|
|
}
|