2012-02-07 09:14:34 +00:00
|
|
|
# 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.
|
2012-01-14 09:31:12 +00:00
|
|
|
|
2013-08-14 02:56:07 +01:00
|
|
|
{ stdenv, fetchurl, dpkg }:
|
2012-01-12 17:16:11 +00:00
|
|
|
|
2012-02-07 09:14:34 +00:00
|
|
|
let
|
2013-08-14 02:56:07 +01:00
|
|
|
version = "0.40";
|
2012-01-12 17:16:11 +00:00
|
|
|
|
2012-02-07 09:14:34 +00:00
|
|
|
packages = [
|
2013-08-14 02:56:07 +01:00
|
|
|
{ name = "adi"; sha256 = "0wwks9ff4n772435s57z1fjrffi4xl9nxnfn3v7xfcwdjb395d88"; }
|
|
|
|
{ name = "atheros"; sha256 = "1gj7hfnyclzgyq06scynaclnfajhs6lw5i51j1w1hikv4yh20djz"; }
|
|
|
|
{ name = "bnx2"; sha256 = "15qjj0sfjin5cbkpby29r5czn11xyiyyc4fmhwlqvgfgrnbp0aqk"; }
|
|
|
|
{ name = "bnx2x"; sha256 = "08nvbln94ff47b2q0avxj1aa2wx4qih8sq8knbq54lp46kjf3k0h"; }
|
|
|
|
{ name = "brcm80211"; sha256 = "1ndsw3s6xkr1n39nf9ig1xhnaglx5qvvvm8rh6ah41v644lzha79"; }
|
|
|
|
{ name = "intelwimax"; sha256 = "1qwxmykh90v92asn4ivq0fak761hs7hd2zmz1dpkjidwsycrfyqn"; }
|
|
|
|
{ name = "ipw2x00"; sha256 = "0a2nb17b5n3k1b6y4dbi5i8k1fm19ba2abq2jh2hjjmyyl3y388m"; }
|
|
|
|
{ name = "ivtv"; sha256 = "1239gsjq16f4kd1yn77iq3ar8ndx3pzd16kpqafr1h2y0zwh452r"; }
|
|
|
|
{ name = "iwlwifi"; sha256 = "03kmh5szd02pkbm1nlyz99fr2njhg88wiv73f1fz485m9rvgga43"; }
|
|
|
|
{ name = "libertas"; sha256 = "0qjziwmwqbp83hxrjw7x3ralxg4ib9y23bcbn1g8yb5b6m84ca6b"; }
|
|
|
|
{ name = "linux"; sha256 = "0ypidsrrfx4kvbfisdpgx2fzbil7g2jixgqhnv960iy5l348amrl"; }
|
|
|
|
{ name = "linux-nonfree"; sha256 = "0p9ql3cdxljflh48r6z40kpyisbzp3s3g1qjb9f64n6cppllwjfr"; }
|
|
|
|
{ name = "myricom"; sha256 = "12spfaq7z2bb93cy15zldlic1wx2v6h9sn7ny09nkzy4m26zds4q"; }
|
|
|
|
{ name = "netxen"; sha256 = "03gmda16bdqw8a4x8x11ph41ksjh48hxydv0f0z3gi3czgbh7sn3"; }
|
|
|
|
{ name = "qlogic"; sha256 = "1ah8rrwzi44p1l4q8qkql18djmn5kihsiinpy204xklm1csf3vs1"; }
|
|
|
|
{ name = "ralink"; sha256 = "005549jk0wnyfnb247awv2wncsx5is05m1hdwcd33iq0dlbmm39b"; }
|
|
|
|
{ name = "realtek"; sha256 = "1ai1klzrql8qxmb7945xiqlkfkyz8admrpb10b3r4ixvclkrvfi2"; }
|
2012-02-07 09:14:34 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
fetchPackage =
|
|
|
|
{ name, sha256 }: fetchurl {
|
|
|
|
url = "mirror://debian/pool/non-free/f/firmware-nonfree/firmware-${name}_${version}_all.deb";
|
|
|
|
inherit sha256;
|
2012-01-12 17:16:11 +00:00
|
|
|
};
|
2012-01-14 09:31:12 +00:00
|
|
|
|
2012-02-07 09:14:34 +00:00
|
|
|
srcs = map fetchPackage packages;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "firmware-linux-nonfree-${version}";
|
|
|
|
inherit srcs;
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2013-08-14 02:56:07 +01:00
|
|
|
mkdir -p ./firmware
|
2012-02-07 09:14:34 +00:00
|
|
|
'';
|
2012-01-12 17:16:11 +00:00
|
|
|
|
2012-02-07 09:14:34 +00:00
|
|
|
buildPhase = ''
|
|
|
|
for src in $srcs; do
|
|
|
|
dpkg-deb -W $src
|
|
|
|
dpkg-deb -x $src .
|
|
|
|
done
|
|
|
|
'';
|
2012-01-12 17:16:11 +00:00
|
|
|
|
2012-02-07 09:14:34 +00:00
|
|
|
buildInputs = [ dpkg ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2013-08-14 02:59:38 +01:00
|
|
|
mkdir -p $out/share
|
2012-02-07 09:14:34 +00:00
|
|
|
cp -r lib/firmware/* "$out/"
|
2013-08-14 02:59:38 +01:00
|
|
|
cp -r usr/share/doc $out/share/
|
|
|
|
find $out/share -name changelog.gz | xargs rm
|
2012-02-07 09:14:34 +00:00
|
|
|
'';
|
2012-01-12 17:16:11 +00:00
|
|
|
|
|
|
|
meta = {
|
2012-02-07 09:14:34 +00:00
|
|
|
description = "Binary firmware collection packaged by Debian";
|
2013-08-14 02:56:07 +01:00
|
|
|
homepage = http://packages.debian.org/sid/firmware-linux-nonfree;
|
2013-06-05 21:44:08 +01:00
|
|
|
license = stdenv.lib.licenses.unfreeRedistributableFirmware;
|
2013-05-23 20:00:07 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-01-12 17:16:11 +00:00
|
|
|
};
|
|
|
|
}
|