nixos-config/rtl8761b.nix

28 lines
894 B
Nix
Raw Normal View History

2020-11-13 18:44:30 +00:00
{ config, pkgs, ... }:
{
hardware.firmware = with pkgs; [ (stdenv.mkDerivation rec {
name = "rtl8761b-fw";
fw = fetchurl {
url = "https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/e58b611f34f2f5ff57bb0d8cdf1b2e4751e3ccbd/bt/rtkbt/Firmware/BT/rtl8761b_fw";
sha256 = "0b59a1f2422c006837c4b5e46b59d49bfdbca1defb958adbbc0d57ebdc19cc82";
};
config = fetchurl {
url = "https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/e58b611f34f2f5ff57bb0d8cdf1b2e4751e3ccbd/bt/rtkbt/Firmware/BT/rtl8761b_config";
sha256 = "aa86a092ee58e96256331d5c28c199ceaadec434460e98e7dea20e411e1aa570";
};
unpackPhase = ":";
buildPhase = ''
dn=$out/lib/firmware
mkdir -p $dn/rtl_bt
ln -s ${fw} $dn/rtl_bt/rtl8761b_fw.bin
ln -s ${config} $dn/rtl_bt/rtl8761b_config.bin
'';
installPhase = ":";
}) ];
}