2021-02-06 06:55:27 -05:00
|
|
|
{stdenv, pkgs, firmwareLinuxNonfree, ...}:
|
|
|
|
let
|
|
|
|
repos = (pkgs.callPackage ../repos.nix {});
|
2021-02-06 19:31:26 -05:00
|
|
|
ath10k = ./ath10k;
|
|
|
|
# ath10k = repos.ath10k-firmware;
|
2021-02-06 06:55:27 -05:00
|
|
|
in
|
|
|
|
|
|
|
|
firmwareLinuxNonfree.overrideAttrs (old: rec {
|
|
|
|
pname = "microsoft-surface-go-firmware-linux-nonfree";
|
|
|
|
srcs = [
|
|
|
|
firmwareLinuxNonfree.src
|
2021-02-06 19:31:26 -05:00
|
|
|
ath10k
|
2021-02-06 06:55:27 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = firmwareLinuxNonfree.src;
|
|
|
|
priority = 1;
|
|
|
|
|
|
|
|
dontMakeSourcesWritable = true;
|
|
|
|
postInstall = ''
|
2021-02-06 19:31:26 -05:00
|
|
|
# Delete the non-working firmware:
|
|
|
|
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board.bin
|
|
|
|
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board-2.bin
|
2021-02-06 06:55:27 -05:00
|
|
|
|
2021-02-06 19:31:26 -05:00
|
|
|
# Install the Surface Go Wifi firmware:
|
|
|
|
cp ${ath10k}/K1535_Debian/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
|
|
|
|
cp ${ath10k}/K1535_Debian/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
|
2021-02-06 06:55:27 -05:00
|
|
|
'';
|
|
|
|
})
|