1
0
Fork 0

add Antmicro Zynq mkbootimage utility

This commit is contained in:
Sebastien Bourdeauducq 2020-05-01 10:50:10 +08:00
parent dffbab2707
commit 53e1af81b6
2 changed files with 26 additions and 0 deletions

24
mkbootimage.nix Normal file
View File

@ -0,0 +1,24 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
pname = "mkbootimage";
version = "2.2";
src = pkgs.fetchFromGitHub {
owner = "antmicro";
repo = "zynq-mkbootimage";
rev = "4ee42d782a9ba65725ed165a4916853224a8edf7";
sha256 = "1k1mbsngqadqihzjgvwvsrkvryxy5ladpxd9yh9iqn2s7fxqwqa9";
};
propagatedBuildInputs = [ pkgs.libelf pkgs.pcre ];
patchPhase =
''
substituteInPlace Makefile --replace "git rev-parse --short HEAD" "echo nix"
'';
installPhase =
''
mkdir -p $out/bin
cp mkbootimage $out/bin
'';
}

View File

@ -22,6 +22,8 @@ in
vivado vivado
pkgs.llvm_9 pkgs.llvm_9
pkgs.lld_9 pkgs.lld_9
(import ./mkbootimage.nix { inherit pkgs; })
]; ];
XARGO_RUST_SRC = "${rustPlatform.rust.rustc.src}/src"; XARGO_RUST_SRC = "${rustPlatform.rust.rustc.src}/src";