-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
33 lines (33 loc) · 1.15 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ pkgsPath ? builtins.fetchTarball (builtins.fromJSON (builtins.readFile ./nixpkgs.json))
, system ? builtins.currentSystem
, pkgs ? import pkgsPath { inherit system; }
, pkgsTarget ? pkgs.pkgsCross.aarch64-multiplatform-musl
}: let
callPackage = pkgs.newScope (pkgs // self);
self = rec {
coreboot = callPackage ./coreboot.nix {};
u-boot = pkgsTarget.buildUBoot {
name = "u-boot-chromebook_bob";
defconfig = "chromebook_bob_defconfig";
filesToInstall = ["u-boot-dtb.bin"];
postConfigure = ''
sed -i 's/CONFIG_SYS_TEXT_BASE=.*/CONFIG_SYS_TEXT_BASE=0x00a00000/' .config
'';
enableParallelBuilding = true;
};
flashrom = pkgs.flashrom.overrideAttrs ({makeFlags ? [], buildInputs ? [], ...}: {
name = "flashrom-ccd";
src = pkgs.fetchgit {
url = "https://review.coreboot.org/flashrom.git";
rev = "c7e9a6e15153684672bbadd1fc6baed8247ba0f6";
sha256 = "09njximl6rdjnpx6d3asvb587q6x3jqbf8107cfygy1b7c051ryd";
};
buildInputs = buildInputs ++ [ pkgs.libusb1 ];
});
all = pkgs.runCommandNoCC "indigo" {} ''
mkdir -p $out
cp ${coreboot}/coreboot.rom $out/
cp ${flashrom}/bin/flashrom $out/
'';
};
in self