Fixed rtl8192cfw firmware package.

Also, added a package that fetches all firmware from dwmw2's repo on kernel.org.
Specific firmware can then simply copy the driver out of this repo. Perhaps it
would actually be useful to write some abstraction for that.

Anyway, I'm not sure if fetching the git repo is a good idea to start with. The
repo does not have tags, so I'm forced to either take the HEAD or a particular
commit (chose the last option). However, this is likely to need ongoing
maintenance.

svn path=/nixpkgs/trunk/; revision=31492
This commit is contained in:
Arie Middelkoop 2012-01-12 10:17:29 +00:00
parent 0d69e2a9d0
commit 0a2ad94a0e
3 changed files with 29 additions and 18 deletions

View File

@ -0,0 +1,14 @@
{stdenv, fetchgit}:
let
repo = "git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git";
src = fetchgit {
url = repo;
rev = "15888a2eab052ac3d3f49334e4f6f05f347a516e";
sha256 = "df63b71dd56ad85f97784076eeced76849e95cb30a9909e8322f7fdd54f227b4";
};
meta = {
description = "GIT repo of the linux firmware binaries";
homepage = repo;
};
in stdenv.lib.setName "linux-firmware" (stdenv.lib.addMetaAttrs meta src)

View File

@ -1,23 +1,18 @@
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "rtl8192c-fw";
src = fetchurl {
url = "ftp://WebUser:AxPL9s3k@202.134.71.21/cn/wlan/92ce_se_de_linux_mac80211_0004.0816.2011.tar.gz";
sha256 = "1kg63h5rj4kja2csmqsrxjipb1wpznfbrvn9cla9d9byksy5fn64";
};
phases = [ "unpackPhase" "installPhase" ];
# Installation copies the firmware AND the license. The license
# says: "Your rights to redistribute the Software shall be
# contingent upon your installation of this Agreement in its
# entirety in the same directory as the Software."
installPhase = "ensureDir $out; cp -a firmware/* $out";
{stdenv, linuxFirmware}:
let
src = linuxFirmware;
dir = "rtlwifi";
file = "rtl8192cfw.bin";
meta = {
description = "Firmware for the Realtek RTL8192c wireless cards";
homepage = "http://www.realtek.com";
license = "non-free";
};
};
in stdenv.mkDerivation {
name = "rtl8192c-fw";
inherit src meta dir file;
phases = [ "installPhase" ];
installPhase = "ensureDir $out/$dir && cp $src/$dir/$file $out/$dir/$file";
}

View File

@ -6026,6 +6026,8 @@ let
rtkit = callPackage ../os-specific/linux/rtkit { };
linuxFirmware = callPackage ../os-specific/linux/firmware/dwmw2 { };
rtl8192cfw = callPackage ../os-specific/linux/firmware/rtl8192c { };
rtl8168e2fw = callPackage ../os-specific/linux/firmware/rtl8168e-2 { };