diff --git a/pkgs/additional/linux-firmware-megous/default.nix b/pkgs/additional/linux-firmware-megous/default.nix new file mode 100644 index 000000000..a8d7231d9 --- /dev/null +++ b/pkgs/additional/linux-firmware-megous/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, lib +, fetchgit +, anx7688 ? true # USB-C chip (pinephone) +, ov5640 ? true # camera (pinephone: rear camera) +, rtl_bt ? true # rtl8723cs bluetooth (pinephone) +# other files in megi's repo: +# - brcm/ +# - brcmfmac43362-* +# - brcmfmac43455-sdio-*: BCM43455 WiFi/BT (raspberry pi 4b) +# - brcmfmac43456-* +# - hm5065-*.bin: 5 MP sensor used in the pine devboards (likely not in the phones) +# - regulatory.db +# - rockchip/dptx.bin +# - rtlwifi/rtl8188eufw.bin +# - rtw88/rtw8822c-*.bin +# - rtw89/rtw8852a_fw.bin +}: +stdenv.mkDerivation { + name = "linux-firmware-megous"; + version = "unstable-2023-2023-05-06"; + src = fetchgit { + url = "https://megous.com/git/linux-firmware"; + rev = "0510074346983ad33b3d52ce8f5d6a8f89a564a8"; + hash = "sha256-qZVkGv4PCqKSYz92yy0+9oZY7dPW24rmj5obeaVXt0Y="; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p "$out/lib/firmware" + ${lib.optionalString rtl_bt "cp -R rtl_bt $out/lib/firmware"} + ${lib.optionalString anx7688 "cp anx7688-fw.bin $out/lib/firmware"} + ${lib.optionalString ov5640 "cp ov5640_af.bin $out/lib/firmware"} + ''; + + meta = with lib; { + description = "firmware files associated with megi's kernel, particularly for the pinephone"; + homepage = "https://xnux.eu/howtos/build-pinephone-kernel.html#toc-firmware-files"; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 7c0a479d9..193314b6d 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -44,6 +44,7 @@ let koreader-from-src = callPackage ./additional/koreader-from-src { }; ldd-aarch64 = callPackage ./additional/ldd-aarch64 { }; lightdm-mobile-greeter = callPackage ./additional/lightdm-mobile-greeter { }; + linux-firmware-megous = callPackage ./additional/linux-firmware-megous { }; linux-manjaro = callPackage ./additional/linux-manjaro { }; linux-megous = callPackage ./additional/linux-megous { }; mcg = callPackage ./additional/mcg { };