From 678b9f50cfcc7c1b2f2c6c11cbf857dfaf1face2 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Tue, 28 Nov 2023 13:47:45 +0800 Subject: [PATCH] flake: use nixpkgs-unstable to build u-boot --- flake.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 03dcad0..ba8b1f9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,16 @@ { description = "Not-OS port to the Zynq-7000 platform"; - inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; + inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05; + inputs.nixpkgs-unstable.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 }: + outputs = { self, nixpkgs, nixpkgs-unstable, not-os }: let pkgs = import nixpkgs { system = "x86_64-linux"; }; + # To be used for building u-boot. + pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; }; gnu-platform = "arm-none-eabi"; @@ -174,7 +178,9 @@ dontFixup = true; }; - u-boot = pkgs.pkgsCross.armv7l-hf-multiplatform.buildUBoot { + # U-boot needs the recent patch in master to fix cross-compile issues. + # See https://github.com/NixOS/nixpkgs/pull/265411. + u-boot = pkgs-unstable.pkgsCross.armv7l-hf-multiplatform.buildUBoot { defconfig = "xilinx_zynq_virt_defconfig"; preConfigure = '' export DEVICE_TREE=zynq-zc706