Skip to content

Instantly share code, notes, and snippets.

@osmano807
Last active December 28, 2018 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osmano807/8b8e9b37043007c68c4cbfb69ee3e562 to your computer and use it in GitHub Desktop.
Save osmano807/8b8e9b37043007c68c4cbfb69ee3e562 to your computer and use it in GitHub Desktop.
QCA9377 NixOS
{ config, lib, pkgs, ... }:
let
qca9377_firmware = pkgs.callPackage ./qca9377_firmware.nix { };
in
{
hardware.firmware = with pkgs; [
# firmwareLinuxNonfree
qca9377_firmware ];
}
{ stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "qca9377_firmware-${version}";
version = "5";
src = ./firmware-5.bin;
sourceRoot = ".";
dontBuild = true;
unpackPhase = ''
cp "$src" .
'';
installPhase = ''
mkdir -p "$out/lib/firmware/ath10k/QCA9377/hw1.0"
cp "$src" "$out/lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin"
cp "$src" "$out/lib/firmware/ath10k/QCA9377/hw1.0/firmware-6.bin"
'';
# Firmware blobs do not need fixing and should not be modified
dontFixup = true;
meta = with stdenv.lib; {
description = "Binary firmware for QCA9377 chipset";
homepage = https://github.com/kvalo/ath10k-firmware;
license = licenses.unfreeRedistributableFirmware;
platforms = platforms.linux;
# priority = 6; # give precedence to kernel firmware
};
passthru = { inherit version; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment