mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-27 05:19:43 +01:00
Merge pull request #382 from ursi/microsoft-surface-wifi
Refactor ath10k-replace to no longer need an outputHash
This commit is contained in:
commit
a8d33117de
1 changed files with 10 additions and 17 deletions
|
@ -3,30 +3,23 @@ let
|
||||||
repos = (pkgs.callPackage ../../../repos.nix {});
|
repos = (pkgs.callPackage ../../../repos.nix {});
|
||||||
killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian";
|
killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian";
|
||||||
in
|
in
|
||||||
firmwareLinuxNonfree.overrideAttrs (old: rec {
|
stdenv.mkDerivation {
|
||||||
pname = "microsoft-surface-go-firmware-linux-nonfree";
|
pname = "microsoft-surface-go-firmware-linux-nonfree";
|
||||||
srcs = [
|
inherit (firmwareLinuxNonfree) version;
|
||||||
firmwareLinuxNonfree.src
|
src = firmwareLinuxNonfree;
|
||||||
killernetworking_firmware
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
];
|
|
||||||
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
|
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
# Install the Surface Go Wifi firmware:
|
# Install the Surface Go Wifi firmware:
|
||||||
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
|
cp ${killernetworking_firmware}/board.bin lib/firmware/ath10k/QCA6174/hw2.1/
|
||||||
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
|
cp ${killernetworking_firmware}/board.bin lib/firmware/ath10k/QCA6174/hw3.0/
|
||||||
'';
|
|
||||||
|
|
||||||
outputHash = "176cf5b9f370x2a532h2afjfkrxy13gqdygc11bam0sg8dlnrv21";
|
mkdir $out; cp -r ./. $out
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware";
|
description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
priority = 5;
|
priority = 5;
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|
Loading…
Reference in a new issue