3
0
Fork 0
forked from mirrors/nixpkgs

nonfree-firmware: Use the new kernel.org repository for tracking nonfree firmware changes

remove the obsolete iwlwifi firmware which is included in the repo.
This commit is contained in:
William A. Kennington III 2015-02-09 16:28:37 -08:00
parent f6f3813b65
commit 650b2258f0
4 changed files with 20 additions and 148 deletions

View file

@ -12,8 +12,7 @@ with lib;
default = false;
type = types.bool;
description = ''
Turn on this option if you want to enable all the firmware shipped with Debian/Ubuntu
and iwlwifi.
Turn on this option if you want to enable all the firmware shipped in linux-firmware.
'';
};
@ -26,7 +25,6 @@ with lib;
hardware.firmware = [
"${pkgs.firmwareLinuxNonfree}/lib/firmware"
"${pkgs.iwlegacy}/lib/firmware"
"${pkgs.iwlwifi}/lib/firmware"
];
};

View file

@ -1,72 +1,29 @@
# The firmware bundle as packaged by Debian. This should be "all" firmware that is not shipped
# as part of the kernel itself.
# You can either install the complete bundle, or write a separate package for individual
# devices that copies the firmware from this package.
{ stdenv, fetchurl, dpkg }:
{ stdenv, fetchgit }:
let
version = "0.43";
version = "17657c35869baa999b454e868cd3d5a7e1656425";
shortVersion = stdenv.lib.substring 0 7 version;
in
stdenv.mkDerivation {
name = "firmware-linux-nonfree-${shortVersion}";
packages = [
{ name = "adi"; sha256 = "13cwnbispivpd73k928l1i818ylhpahp6xh7d6pw59sswrsx6inw"; }
{ name = "atheros"; sha256 = "0sw9d52k3ynx1cxg7cq49pmm8y6vlqyhb9843hbyf6nbmjqj72bx"; }
{ name = "bnx2"; sha256 = "1r8scys27qj5shdbgl8ag9vi4hiidx4bp8yw4n4dcp288d9x7bbh"; }
{ name = "bnx2x"; sha256 = "03jx4vnn8irlwswydf4h3ya1kf064jkaj67jry2hr6qwpd4l8pgq"; }
{ name = "brcm80211"; sha256 = "01mkmjkg16kdd26pwlg4a1s1717fh0j602mwqhwh46k8zakg2lkh"; }
{ name = "intelwimax"; sha256 = "1avls6sx0pbsffrcs267r2r2rqlx2xrv8j9znc7ix1bi8g4fx91v"; }
{ name = "ipw2x00"; sha256 = "19zqc30hsz7snw020izm81qbap3xsygggnmbspxndw7jihz0amjs"; }
{ name = "ivtv"; sha256 = "1f2004lpw5nr9rxj3cl4ba0jdm51wkvsrbiy4drakawpjwh5y4qw"; }
{ name = "iwlwifi"; sha256 = "1538r751mx8nhg3xibnnrhnflvf3kl5y9rnm7rpl4wyrfgx61amd"; }
{ name = "libertas"; sha256 = "0svkqlsiqgmh970r38nh0c1pjx41zdfql2k2k5djw99fscjklacd"; }
{ name = "linux"; sha256 = "0j62v6vbh2287j3x5c9i0xspmhyh5k1z8dyajgix7k37xi4jvpy2"; }
{ name = "linux-nonfree"; sha256 = "1f5x72rzicivwm0sn9l6wjkx7z9a0b8n6c9m60xrqg36ly7mizzp"; }
{ name = "myricom"; sha256 = "17cdl885jlnja5m60l35xr2f84hv8z4cvg3d25vpp171s1vf1ks1"; }
{ name = "netxen"; sha256 = "122nava9ld1v8gcnqbdpx0kffv0rxm9glp4xg09ssvldy4myfgl7"; }
{ name = "qlogic"; sha256 = "02pgmprz1qwij7lw1lgmb8clgxj8v3mx0fyy1l4z7bffnpvip863"; }
{ name = "ralink"; sha256 = "0yw9gf9gm3jxmsndr8kcsf6829smm88kshfb4c8jn0n6f4yy9l7x"; }
{ name = "realtek"; sha256 = "0gay9x47pimdqj665sr1416l3bdyca9grsqpj0s9n6k1lmywrqx1"; }
{ name = "ti-connectivity"; sha256 = "1m6yk0827991hs46l8pp8iiwh1ms0rwlmwn64k2wr725k5yzg29b"; }
];
src = fetchgit {
url = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
rev = version;
sha256 = "15lv58wf3vjs4dpxvx3a7wn0pj83952wa2ab6ajfl3pbdhcvkzjb";
};
fetchPackage =
{ name, sha256 }: fetchurl {
url = "mirror://debian/pool/non-free/f/firmware-nonfree/firmware-${name}_${version}_all.deb";
inherit sha256;
};
srcs = map fetchPackage packages;
in stdenv.mkDerivation {
name = "firmware-linux-nonfree-${version}";
inherit srcs;
unpackPhase = ''
mkdir -p ./firmware
preInstall = ''
mkdir -p $out
'';
buildPhase = ''
for src in $srcs; do
dpkg-deb -W $src
dpkg-deb -x $src .
done
'';
installFlags = [ "DESTDIR=$(out)" ];
buildInputs = [ dpkg ];
installPhase = ''
mkdir -p $out/share $out/lib/firmware
cp -r lib/firmware/* "$out/lib/firmware/"
# iwlwifi is packaged separately, but we need Bluetooth fw
rm $out/lib/firmware/iwlwifi*
cp -r usr/share/doc $out/share/
find $out/share -name changelog.gz | xargs rm
'';
meta = {
description = "Binary firmware collection packaged by Debian";
meta = with stdenv.lib; {
description = "Binary firmware collection packaged by kernel.org";
homepage = http://packages.debian.org/sid/firmware-linux-nonfree;
license = stdenv.lib.licenses.unfreeRedistributableFirmware;
platforms = stdenv.lib.platforms.linux;
license = licenses.unfreeRedistributableFirmware;
platforms = platforms.linux;
maintainers = with maintainers; [ wkennington ];
};
}

View file

@ -1,81 +0,0 @@
{ stdenv, fetchurl }:
let
packages = [
# Kernel 2.6.29+
{ name = "5150-ucode-8.24.2.2"; sha256 = "1y8cah9xa8a9c7alh220cvmncjmwnacdz0kwsvg9lqr4cvzyclyj"; }
# Kernel 2.6.30+
{ name = "6000-ucode-9.221.4.1"; sha256 = "0sw3v9807agx4mxdrfgsw7f195gs1f4zscnzcgpc8gb664r6413z"; }
# Kernel 2.6.37+
{ name = "6050-ucode-41.28.5.1"; sha256 = "1i10rfn3kc07s2iqz79wvsrblhm360yz6v231dcz8sabvcyrlzar"; }
{ name = "100-ucode-39.31.5.1"; sha256 = "1jvzdaiklnw613c4drkjkcdlnnk6c9kk7f0jqdxfkgppydwssnc2"; }
# Kernel 2.6.38+
{ name = "5000-ucode-8.83.5.1-1"; sha256 = "0pkzr4gflp3j0jm4rw66jypk3xn4bvpgdsnxjqwanyd64aj6naxg"; }
# Kernel 3.2+
{ name = "6000g2b-ucode-18.168.6.1"; sha256 = "1shby6s9h4kfwmvg89505p61yq88ml1qccvw8h2m4l63a9mwg0qn"; }
{ name = "6000g2a-ucode-18.168.6.1"; sha256 = "1sdv4lkpfd87c95zbk8wgn0b4l4nbwkb0b4iwvrzpnmdarbn3wm7"; }
{ name = "1000-ucode-39.31.5.1"; sha256 = "0w69hfpwx79cph0517a6mkhsk51li2l0yhfr1jddmj3i4ny1y3zd"; }
{ name = "135-ucode-18.168.6.1"; sha256 = "1dvyzwkyzsmvlp13z84g2lzkr0w0p8mj7c98fwh3pwv0cmglf04c"; }
{ name = "105-ucode-18.168.6.1"; sha256 = "11z67ippn4hlmsnyv1lxknysrl3m5v908i9wf1nkm7kxw76biz04"; }
{ name = "2000-ucode-18.168.6.1"; sha256 = "0ax98hlmz11hqi0k81j5cizp2hwaah7j6s3hw7jdfsmwpzy9lwrm"; }
{ name = "2030-ucode-18.168.6.1"; sha256 = "0b69jpb46fk63ybyyb8lbh99j1d29ayp8fl98l18iqy3q7mx4ry8"; }
# Kernel 3.10+
{ name = "7260-ucode-22.1.7.0"; sha256 = "0m31p98zwr70k3b9akha0d8n7x9ym43yg992jk8zd94159g37k0y"; }
{ name = "3160-ucode-22.1.7.0"; sha256 = "0qfm854xv6dc6kqj0vym1avrirrshnxp9yqnlx356zvfnqyx4l33"; }
# Kernel 3.13+
{ name = "7260-ucode-22.24.8.0"; sha256 = "1zvw5dj3kv7rdnypcmp6na8mlfw735nzahy8qz35zrmda8b6gvqi"; }
{ name = "3160-ucode-22.24.8.0"; sha256 = "1jv3bhds3a3y2r719fqpc5cwb674hm3lwq9df11i6473f0xjs224"; }
{ name = "7265-ucode-22.24.8.0"; sha256 = "1pvmc58gyr62akzdj8gx02y3i3d67zwawm8zdvpg2q615721wjp9"; }
# Kernel 3.14.9+
{ name = "7260-ucode-25.228.9.0"; sha256 = "0ppx9lpkc2l9aggdadw4y2cpdz5zqyckshzhlb1qj60jbajiny36"; }
{ name = "3160-ucode-25.228.9.0"; sha256 = "125kh5p21bx808l2al8v9a1g63396d1a1chf4amqa9zrp2aajmk8"; }
{ name = "7265-ucode-25.228.9.0"; sha256 = "1dv9bai1s6vdigsahbrxjwlndnp2dsgkqz8j7021d34s99kbi6z8"; }
# Kernel 3.17+
{ name = "7260-ucode-23.11.10.0"; sha256 = "1d9w7kd3h3632qmwb44943lxdafjn3ii8ha9wdvqri3b8fjfn7sa"; }
{ name = "3160-ucode-23.11.10.0"; sha256 = "0ijpgfzz8735rsbkc6mvk3w7f1v9rr9dgy1l79vzmzc1vh2zpbdm"; }
{ name = "7265-ucode-23.11.10.0"; sha256 = "1az8nq6z1ns1220309wp8jq1sc5flz2ac5k41pgj50503h54rlvi"; }
];
fetchPackage =
{ name, sha256 }: fetchurl {
name = "iwlwifi-${name}.tgz";
url = "https://wireless.wiki.kernel.org/_media/en/users/drivers/iwlwifi-${name}.tgz";
inherit sha256;
};
srcs = map fetchPackage packages;
in stdenv.mkDerivation {
name = "iwlwifi";
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;
};
}

View file

@ -8548,8 +8548,6 @@ let
iw = callPackage ../os-specific/linux/iw { };
iwlwifi = callPackage ../os-specific/linux/firmware/iwlwifi { };
iwlegacy = callPackage ../os-specific/linux/firmware/iwlegacy { };
jfbview = callPackage ../os-specific/linux/jfbview { };