diff options
author | Tobias Hammerschmidt <tobias.hammerschmidt@gmx.de> | 2010-12-09 19:05:19 +0000 |
---|---|---|
committer | Tobias Hammerschmidt <tobias.hammerschmidt@gmx.de> | 2010-12-09 19:05:19 +0000 |
commit | 4c9fe18b8a49d9a0e9a2d5117b4e51686bfdf4ac (patch) | |
tree | f6d03a1369d968b08436e9647bc541f1f7054ae1 /pkgs/os-specific | |
parent | 9568a1bc80048069a3303a6f5c98e781af188c68 (diff) |
broadcom wireless driver - patch by Vladimír Čunát
svn path=/nixpkgs/trunk/; revision=25044
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/broadcom-sta/default.nix | 45 | ||||
-rw-r--r-- | pkgs/os-specific/linux/broadcom-sta/makefile.patch | 16 |
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix new file mode 100644 index 0000000000000..cf8fde4751cc7 --- /dev/null +++ b/pkgs/os-specific/linux/broadcom-sta/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl, kernel }: + +let version = "5.60.246.6"; + bits = if stdenv.system == "i686-linux" then "32" else + assert stdenv.system == "x86_64-linux"; "64"; +in + +stdenv.mkDerivation { + name = "broadcom-sta-${version}"; + src = fetchurl { + url = "http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86-${bits}_v${version}.tar.gz"; + sha256 = if bits == "32" + then "0y8ap9zhfsg1k603qf5a7n73zvsw7nkqh42dlcyxan5zdzmgcqdx" + else "0z8a57fpajiag830g1ifc9vrm7wk5bm7dwi7a9ljm3cns3an07fl"; + }; + + buildInputs = [ kernel ]; + patches = [ ./makefile.patch ]; + + makeFlags = "KDIR=${kernel}/lib/modules/${kernel.version}/build"; + + unpackPhase = + '' + sourceRoot=broadcom-sta + mkdir "$sourceRoot" + tar xvf "$src" -C "$sourceRoot" + ''; + + installPhase = + '' + binDir="$out/lib/modules/${kernel.version}/kernel/net/wireless/" + docDir="$out/share/doc/broadcom-sta/" + ensureDir "$binDir" "$docDir" + cp wl.ko "$binDir" + cp lib/LICENSE.txt "$docDir" + ''; + + meta = { + description = "Kernel module driver for some Broadcom's wireless cards"; + homepage = http://www.broadcom.com/support/802.11/linux_sta.php; + license = "unfree-redistributable"; + maintainers = [ stdenv.lib.maintainers.neznalek ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/broadcom-sta/makefile.patch b/pkgs/os-specific/linux/broadcom-sta/makefile.patch new file mode 100644 index 0000000000000..6ba8527e2673c --- /dev/null +++ b/pkgs/os-specific/linux/broadcom-sta/makefile.patch @@ -0,0 +1,16 @@ +--- src/Makefile 2010-10-08 00:32:59.000000000 +0200 ++++ src/Makefile 2010-11-09 11:06:28.832999850 +0100 +@@ -27,10 +27,10 @@ + EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped + + all: +- KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` ++ KBUILD_NOPEDANTIC=1 make -C ${KDIR} M=`pwd` + + clean: +- KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean ++ KBUILD_NOPEDANTIC=1 make -C ${KDIR} clean + + install: +- install -D -m 755 wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/wl.ko ++ install -D -m 755 wl.ko $out/lib/modules/${kernelVersion}/kernel/drivers/net/wireless/wl.ko |