2022-08-12 15:51:22 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl, cabextract, bt-fw-converter }:
|
2017-05-03 04:30:21 +00:00
|
|
|
|
2022-08-12 15:51:22 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "broadcom-bt-firmware";
|
2017-08-28 20:04:11 +00:00
|
|
|
version = "12.0.1.1012";
|
2017-05-03 04:30:21 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-08-28 20:04:11 +00:00
|
|
|
url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/04/852bb503-de7b-4810-a7dd-cbab62742f09_7cf83a4c194116648d17707ae37d564f9c70bec2.cab";
|
|
|
|
sha256 = "1b1qjwxjk4y91l3iz157kms8601n0mmiik32cs6w9b1q4sl4pxx9";
|
2017-05-03 04:30:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cabextract bt-fw-converter ];
|
|
|
|
|
|
|
|
unpackCmd = ''
|
2019-08-15 12:41:18 +00:00
|
|
|
mkdir -p ${pname}-${version}
|
|
|
|
cabextract $src --directory ${pname}-${version}
|
2017-05-03 04:30:21 +00:00
|
|
|
'';
|
2017-05-07 06:28:05 +00:00
|
|
|
|
2017-05-03 04:30:21 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/firmware/brcm
|
|
|
|
bt-fw-converter -f bcbtums.inf -o $out/lib/firmware/brcm
|
|
|
|
for filename in $out/lib/firmware/brcm/*.hcd
|
|
|
|
do
|
|
|
|
linkname=$(basename $filename | awk 'match($0,/^(BCM)[0-9A-Z]+(-[0-9a-z]{4}-[0-9a-z]{4}\.hcd)$/,c) { print c[1]c[2] }')
|
|
|
|
if ! [ -z $linkname ]
|
|
|
|
then
|
2018-08-07 14:02:44 +00:00
|
|
|
ln -s --relative -T $filename $out/lib/firmware/brcm/$linkname
|
2017-05-03 04:30:21 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2018-08-07 14:02:44 +00:00
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHash = "042frb2dmrqfj8q83h5p769q6hg2b3i8fgnyvs9r9a71z7pbsagq";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-05-03 04:30:21 +00:00
|
|
|
description = "Firmware for Broadcom WIDCOMM® Bluetooth devices";
|
2021-07-31 17:01:50 +00:00
|
|
|
homepage = "https://www.catalog.update.microsoft.com/Search.aspx?q=Broadcom+bluetooth";
|
2017-05-08 07:50:03 +00:00
|
|
|
license = licenses.unfree;
|
2017-05-03 04:30:21 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ zraexy ];
|
|
|
|
};
|
2017-05-07 06:28:05 +00:00
|
|
|
}
|