2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, perl, perlPackages, bluez }:
|
2017-05-02 22:17:04 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bt-fw-converter";
|
2017-05-02 22:17:04 +01:00
|
|
|
version = "2017-02-19";
|
|
|
|
rev = "2d8b34402df01c6f7f4b8622de9e8b82fadf4153";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/winterheart/broadcom-bt-firmware/${rev}/tools/bt-fw-converter.pl";
|
|
|
|
sha256 = "c259b414a4a273c89a0fa7159b3ef73d1ea62b6de91c3a7c2fcc832868e39f4b";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ perl perlPackages.RegexpGrammars bluez ];
|
|
|
|
|
|
|
|
unpackCmd = ''
|
2019-08-15 13:41:18 +01:00
|
|
|
mkdir -p ${pname}-${version}
|
|
|
|
cp $src ${pname}-${version}/bt-fw-converter.pl
|
2017-05-02 22:17:04 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D -m755 bt-fw-converter.pl $out/bin/bt-fw-converter
|
|
|
|
substituteInPlace $out/bin/bt-fw-converter --replace /usr/bin/hex2hcd ${bluez}/bin/hex2hcd
|
|
|
|
wrapProgram $out/bin/bt-fw-converter --set PERL5LIB $PERL5LIB
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/winterheart/broadcom-bt-firmware/";
|
2017-05-02 22:17:04 +01:00
|
|
|
description = "A tool that converts hex to hcd based on inf file";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ zraexy ];
|
|
|
|
};
|
2021-01-19 21:20:11 +00:00
|
|
|
}
|