2014-01-05 01:57:21 +00:00
|
|
|
{ stdenv, fetchurl, kernel }:
|
2016-08-01 19:26:02 +01:00
|
|
|
|
2014-01-05 01:57:21 +00:00
|
|
|
let
|
2016-08-01 19:26:02 +01:00
|
|
|
version = "6.30.223.271";
|
|
|
|
hashes = {
|
|
|
|
i686-linux = "1kaqa2dw3nb8k23ffvx46g8jj3wdhz8xa6jp1v3wb35cjfr712sg";
|
|
|
|
x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz";
|
|
|
|
};
|
|
|
|
|
|
|
|
arch = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "_64";
|
|
|
|
tarballVersion = stdenv.lib.replaceStrings ["."] ["_"] version;
|
|
|
|
tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz";
|
2010-12-09 19:05:19 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2014-01-05 01:57:21 +00:00
|
|
|
name = "broadcom-sta-${version}-${kernel.version}";
|
|
|
|
|
2016-08-01 19:26:02 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.broadcom.com/docs/linux_sta/${tarball}";
|
|
|
|
sha256 = hashes.${stdenv.system};
|
|
|
|
};
|
2014-01-05 01:57:21 +00:00
|
|
|
|
|
|
|
patches = [
|
2016-08-01 19:26:02 +01:00
|
|
|
./i686-build-failure.patch
|
2014-01-05 01:57:21 +00:00
|
|
|
./license.patch
|
2016-08-01 19:45:47 +01:00
|
|
|
./linux-4.7.patch
|
2015-05-05 20:09:51 +01:00
|
|
|
./gcc.patch
|
2014-01-05 01:57:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}";
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2016-08-01 19:57:18 +01:00
|
|
|
sourceRoot=broadcom-sta
|
|
|
|
mkdir "$sourceRoot"
|
|
|
|
tar xvf "$src" -C "$sourceRoot"
|
2014-01-05 01:57:21 +00:00
|
|
|
'';
|
2010-12-09 19:05:19 +00:00
|
|
|
|
2016-08-01 19:57:18 +01:00
|
|
|
installPhase = ''
|
|
|
|
binDir="$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
docDir="$out/share/doc/broadcom-sta/"
|
|
|
|
mkdir -p "$binDir" "$docDir"
|
|
|
|
cp wl.ko "$binDir"
|
|
|
|
cp lib/LICENSE.txt "$docDir"
|
|
|
|
'';
|
2010-12-09 19:05:19 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Kernel module driver for some Broadcom's wireless cards";
|
|
|
|
homepage = http://www.broadcom.com/support/802.11/linux_sta.php;
|
2014-11-06 00:44:33 +00:00
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
2014-01-05 01:57:21 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ phreedom vcunat ];
|
2010-12-09 19:05:19 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|