flake: fix not-os #5

Merged
sb10q merged 1 commits from fsagbuya/nix-servo:not-os into master 2023-12-12 17:04:59 +08:00
1 changed files with 18 additions and 3 deletions
Showing only changes of commit 0f1acb3e10 - Show all commits

View File

@ -4,10 +4,21 @@
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
inputs.not-os.url = github:cleverca22/not-os; inputs.not-os.url = github:cleverca22/not-os;
inputs.not-os.inputs.nixpkgs.follows = "nixpkgs"; inputs.not-os.inputs.nixpkgs.follows = "nixpkgs";
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;
};
} }