1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/os-specific/linux/atheros/r2756.nix
Marc Weber 52647ea3b0 FullDepEntry -> fullDepEntry, PackEntry -> packEntry
svn path=/nixpkgs/trunk/; revision=15662
2009-05-19 23:25:58 +00:00

40 lines
1.2 KiB
Nix

args : with args;
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2756-20071018.tar.gz;
sha256 = "0mm1kx9pjvvla792rv7k48yhsa0fpzvd1717g9xzazjsz2mqwzyv";
};
buildInputs = [];
configureFlags = [];
makeFlags = [''KERNELPATH=${kernel}/lib/modules/*/build'' ''DESTDIR=$out''];
patchAR2425x86 = (if args ? pci001c_rev01 && args.pci001c_rev01 then
fetchurl {
url = http://madwifi.org/attachment/ticket/1679/madwifi-ng-0933.ar2425.20071130.i386.patch?format=raw;
name = "madwifi-AR2425-x86.patch";
sha256 = "11xpx5g9w7ilagvj60prc3s8a3x0n5n4mr0b7nh0lxwrbjdgjjfg";
} else "");
} null; /* null is a terminator for sumArgs */
in with localDefs;
let
doPatch = fullDepEntry (if patchAR2425x86 !="" then ''
cd hal
patch -Np1 -i ${patchAR2425x86}
cd ..
'' else "") [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 [doPatch doMakeInstall
postInstall doForceShare doPropagate]);
meta = {
description = "Atheros WiFi driver.";
inherit src;
};
}