diff options
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/atheros/r3837.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/atheros/r3837.nix b/pkgs/os-specific/linux/atheros/r3837.nix new file mode 100644 index 000000000000..24cc66d8eb4c --- /dev/null +++ b/pkgs/os-specific/linux/atheros/r3837.nix @@ -0,0 +1,43 @@ +args : with args; + let localDefs = builderDefs.meta.function { + 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"; + }; + }; + in with localDefs; +let +preBuild = FullDepEntry ('' + echo Replacing HAL. + tar xvf ${hal20080528} + rm -r hal + mv ath_hal-* hal +'') ["minInit" "doUnpack"]; +postInstall = FullDepEntry ('' + ln -s $out/usr/local/bin $out/bin +'') [minInit doMakeInstall]; +in +stdenv.mkDerivation rec { + name = "atheros-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + ((lib.optional + (lib.getAttr ["freshHAL"] false args) + preBuild) + ++ [doMakeInstall postInstall + doForceShare doPropagate])); + meta = { + description = " + Atheros WiFi driver. +"; + inherit src; + }; +} |