Add iwlegacy firmware for old Intel wireless cards

This commit is contained in:
Thomas Tuegel 2014-12-03 10:09:21 -06:00
parent b023a0bdfb
commit f7c27885d0
3 changed files with 50 additions and 0 deletions

View File

@ -25,6 +25,7 @@ with lib;
config = mkIf config.hardware.enableAllFirmware {
hardware.firmware = [
"${pkgs.firmwareLinuxNonfree}/lib/firmware"
"${pkgs.iwlegacy}/lib/firmware"
"${pkgs.iwlwifi}/lib/firmware"
];
};

View File

@ -0,0 +1,47 @@
{ stdenv, fetchurl }:
let
packages = [
# Kernel 2.6.28+
{ name = "4965-ucode-228.61.2.24"; sha256 = "1n5af3cci0v40w4gr0hplqr1lfvhghlbzdbf60d6185vpcny2l5m"; }
# Kernel 2.6.29+
{ name = "3945-ucode-15.32.2.9"; sha256 = "0baf07lblwsq841zdcj9hicf11jiq06sz041qcybc6l8yyhhcqjk"; }
];
fetchPackage =
{ name, sha256 }: fetchurl {
name = "iwlwifi-${name}.tgz";
url = "http://wireless.kernel.org/en/users/Drivers/iwlegacy?action=AttachFile&do=get&target=iwlwifi-${name}.tgz";
inherit sha256;
};
srcs = map fetchPackage packages;
in stdenv.mkDerivation {
name = "iwlegacy";
inherit srcs;
unpackPhase = ''
mkdir -p ./firmware
'';
buildPhase = ''
for src in $srcs; do
tar zxf $src
done
'';
installPhase = ''
mkdir -p $out/lib/firmware
cp -r iwlwifi-*/*.ucode "$out/lib/firmware/"
'';
meta = {
description = "Binary firmware collection from intel";
homepage = http://wireless.kernel.org/en/users/Drivers/iwlwifi;
license = stdenv.lib.licenses.unfreeRedistributableFirmware;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ ttuegel ];
};
}

View File

@ -8131,6 +8131,8 @@ let
iwlwifi = callPackage ../os-specific/linux/firmware/iwlwifi { };
iwlegacy = callPackage ../os-specific/linux/firmware/iwlegacy { };
jujuutils = callPackage ../os-specific/linux/jujuutils { };
kbd = callPackage ../os-specific/linux/kbd { };