mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 17:38:41 +08:00
chore: format repo using treefmt-nix and nixfmt-rfc-style
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.hardware.visionfive2;
|
||||
in
|
||||
@@ -34,15 +39,19 @@ in
|
||||
|
||||
config = {
|
||||
system.build = {
|
||||
opensbi = (pkgs.callPackage ./opensbi.nix {}).overrideAttrs (f: p: {
|
||||
src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src;
|
||||
patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or []);
|
||||
});
|
||||
opensbi = (pkgs.callPackage ./opensbi.nix { }).overrideAttrs (
|
||||
_f: p: {
|
||||
src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src;
|
||||
patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or [ ]);
|
||||
}
|
||||
);
|
||||
|
||||
uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (f: p: {
|
||||
src = if cfg.uboot.src != null then cfg.uboot.src else p.src;
|
||||
patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or []);
|
||||
});
|
||||
uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (
|
||||
_f: p: {
|
||||
src = if cfg.uboot.src != null then cfg.uboot.src else p.src;
|
||||
patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or [ ]);
|
||||
}
|
||||
);
|
||||
|
||||
updater-flash = pkgs.writeShellApplication {
|
||||
name = "visionfive2-firmware-update-flash";
|
||||
|
||||
Reference in New Issue
Block a user