2008-08-22 16:10:04 +04:00
|
|
|
args : with args;
|
2008-11-05 00:24:10 +03:00
|
|
|
let localDefs = builderDefs.passthru.function {
|
2008-08-22 16:10:04 +04:00
|
|
|
src = fetchurl {
|
|
|
|
url = http://snapshots.madwifi.org/madwifi-trunk/madwifi-trunk-r3837-20080802.tar.gz;
|
|
|
|
sha256 = "0yj6jxlygb5bdnysmn47dn4wi220ma310vd885a1pl7hp3ky216m";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [];
|
|
|
|
configureFlags = [];
|
|
|
|
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
|
|
|
|
hal20080528 = fetchurl {
|
|
|
|
url = http://people.freebsd.org/~sam/ath_hal-20080528.tgz;
|
|
|
|
sha256 = "1a6glkd8n46876hl48ib08p81qwsvrk4153j4b9xrxgid6f8bar9";
|
|
|
|
};
|
2008-10-28 10:28:16 +03:00
|
|
|
injectionPatchFile = ./inj.patch;
|
2008-08-22 16:10:04 +04:00
|
|
|
};
|
|
|
|
in with localDefs;
|
|
|
|
let
|
2009-05-20 03:25:58 +04:00
|
|
|
preBuild = fullDepEntry (''
|
2008-08-22 16:10:04 +04:00
|
|
|
echo Replacing HAL.
|
|
|
|
tar xvf ${hal20080528}
|
|
|
|
rm -r hal
|
|
|
|
mv ath_hal-* hal
|
|
|
|
'') ["minInit" "doUnpack"];
|
2009-05-20 03:25:58 +04:00
|
|
|
postInstall = fullDepEntry (''
|
2008-08-22 16:10:04 +04:00
|
|
|
ln -s $out/usr/local/bin $out/bin
|
|
|
|
'') [minInit doMakeInstall];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "atheros-"+version;
|
2008-10-28 10:28:16 +03:00
|
|
|
patches = lib.optional
|
2009-05-24 14:57:41 +04:00
|
|
|
(lib.attrByPath ["injectionPatch"] false args)
|
2008-10-28 10:28:16 +03:00
|
|
|
injectionPatchFile;
|
2008-08-22 16:10:04 +04:00
|
|
|
builder = writeScript (name + "-builder")
|
|
|
|
(textClosure localDefs
|
|
|
|
((lib.optional
|
2009-05-24 14:57:41 +04:00
|
|
|
(lib.attrByPath ["freshHAL"] false args)
|
2008-08-22 16:10:04 +04:00
|
|
|
preBuild)
|
2008-10-28 10:28:16 +03:00
|
|
|
++ [doPatch doMakeInstall postInstall
|
2008-08-22 16:10:04 +04:00
|
|
|
doForceShare doPropagate]));
|
|
|
|
meta = {
|
2009-03-03 16:27:40 +03:00
|
|
|
description = "Atheros WiFi driver";
|
2008-08-22 16:10:04 +04:00
|
|
|
inherit src;
|
|
|
|
};
|
|
|
|
}
|