flake: fix not-os

Signed-off-by: Florian Agbuya <fa@m-labs.ph>
This commit is contained in:
Florian Agbuya 2023-11-30 12:17:23 +08:00
parent ba3934bb06
commit 0f1acb3e10
1 changed files with 18 additions and 3 deletions

View File

@ -8,6 +8,17 @@
outputs = { self, nixpkgs, not-os }: outputs = { self, nixpkgs, not-os }:
let let
pkgs = import nixpkgs { system = "x86_64-linux"; }; pkgs = import nixpkgs { system = "x86_64-linux"; };
not-os-patches = [
{
url = "https://patch-diff.githubusercontent.com/raw/cleverca22/not-os/pull/25.patch";
sha256 = "0cca105sidviariwpj2hy72c6yjrcv4m4pzjmvmmp9fkcv2pi3aa";
}
];
patched-not-os = pkgs.applyPatches {
name = "not-os-patched";
src = not-os;
patches = map pkgs.fetchpatch not-os-patches;
};
gnu-platform = "arm-none-eabi"; gnu-platform = "arm-none-eabi";
@ -207,10 +218,10 @@
echo file binary-dist $out/boot.bin >> $out/nix-support/hydra-build-products echo file binary-dist $out/boot.bin >> $out/nix-support/hydra-build-products
''; '';
not-os-configured = (import "${not-os}" { not-os-configured = (import patched-not-os {
inherit nixpkgs; inherit nixpkgs;
extraModules = [ extraModules = [
"${not-os}/zynq_image.nix" "${patched-not-os}/zynq_image.nix"
]; ];
platform = system: (import nixpkgs { config = {}; }).platforms.armv7l-hf-multiplatform; platform = system: (import nixpkgs { config = {}; }).platforms.armv7l-hf-multiplatform;
system = "x86_64-linux"; system = "x86_64-linux";
@ -227,4 +238,8 @@
zc706-not-os = not-os-configured.config.system.build.zynq_image; zc706-not-os = not-os-configured.config.system.build.zynq_image;
}; };
}; };
nixConfig = {
allow-import-from-derivation = true;
};
} }