mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
ath9k-htc-blobless-firmware: use name expected by the kernel
The kernel asks for the firmware with the version string in the filename[1], so it's not easy to load the "blobs" from this package. With this change you can just add the package with a `lib.hiPrio` to `hardware.firmware` and it will be loaded correctly. Note: I used symlinks instead of simply renaming the files in order to not introduce a breaking change.
This commit is contained in:
parent
4ae814f720
commit
cc065fe18a
@ -9,9 +9,13 @@
|
||||
, enableUnstable ? false
|
||||
}:
|
||||
|
||||
let
|
||||
stableVersion = "1.4.0";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ath9k-htc-blobless-firmware";
|
||||
version = if enableUnstable then "unstable-2022-05-22" else "1.4.0";
|
||||
version = if enableUnstable then "unstable-2022-05-22" else stableVersion;
|
||||
|
||||
src = fetchFromGitHub ({
|
||||
owner = "qca";
|
||||
@ -61,7 +65,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dt $out/lib/firmware/ath9k_htc/ target_firmware/*.fw
|
||||
install -Dt "$out/lib/firmware/ath9k_htc/" target_firmware/*.fw
|
||||
# make symlinks so that firmware will be automatically found
|
||||
ln -s htc_7010.fw "$out/lib/firmware/ath9k_htc/htc_7010-${stableVersion}.fw"
|
||||
ln -s htc_9271.fw "$out/lib/firmware/ath9k_htc/htc_9271-${stableVersion}.fw"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user