From 0f1acb3e10a65bc0f5a7218f1c60ab512e0a35a7 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Thu, 30 Nov 2023 12:17:23 +0800 Subject: [PATCH] flake: fix not-os Signed-off-by: Florian Agbuya --- flake.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 02f1bf8..afcb8f2 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,21 @@ inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; inputs.not-os.url = github:cleverca22/not-os; inputs.not-os.inputs.nixpkgs.follows = "nixpkgs"; - + outputs = { self, nixpkgs, not-os }: let 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"; @@ -207,10 +218,10 @@ 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; extraModules = [ - "${not-os}/zynq_image.nix" + "${patched-not-os}/zynq_image.nix" ]; platform = system: (import nixpkgs { config = {}; }).platforms.armv7l-hf-multiplatform; system = "x86_64-linux"; @@ -227,4 +238,8 @@ zc706-not-os = not-os-configured.config.system.build.zynq_image; }; }; + + nixConfig = { + allow-import-from-derivation = true; + }; }