1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-25 02:59:45 +01:00
nixos-hardware/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix

33 lines
1.1 KiB
Nix
Raw Normal View History

{stdenv, lib, pkgs, firmwareLinuxNonfree, ...}:
let
repos = (pkgs.callPackage ../../../repos.nix {});
killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian";
in
firmwareLinuxNonfree.overrideAttrs (old: rec {
pname = "microsoft-surface-go-firmware-linux-nonfree";
srcs = [
firmwareLinuxNonfree.src
2021-02-27 10:28:08 +01:00
killernetworking_firmware
];
sourceRoot = firmwareLinuxNonfree.src;
dontMakeSourcesWritable = true;
postInstall = ''
# 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
# Install the Surface Go Wifi firmware:
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
'';
2021-08-25 06:57:46 +02:00
outputHash = "176cf5b9f370x2a532h2afjfkrxy13gqdygc11bam0sg8dlnrv21";
meta = with lib; {
description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware";
platforms = platforms.linux;
priority = 5;
};
})