8 stdenv.mkDerivation (finalAttrs: {
10 version = "2.3-unstable-2022-05-26";
12 src = fetchFromGitHub {
14 repo = "zynq-mkbootimage";
15 rev = "872363ce32c249f8278cf107bc6d3bdeb38d849f";
16 hash = "sha256-5FPyAhUWZDwHbqmp9J2ZXTmjaXPz+dzrJMolaNwADHs=";
19 # Using elfutils because libelf is being discontinued
20 # See https://github.com/NixOS/nixpkgs/pull/271568
21 buildInputs = [ elfutils pcre ];
24 substituteInPlace Makefile --replace "git rev-parse --short HEAD" "echo ${finalAttrs.src.rev}"
30 install -Dm755 mkbootimage -t $out/bin
35 hardeningDisable = [ "fortify" ];
38 description = "Open source replacement of the Xilinx bootgen application";
39 homepage = "https://github.com/antmicro/zynq-mkbootimage";
40 license = licenses.bsd2;
41 platforms = platforms.linux;
42 maintainers = [ maintainers.fsagbuya ];
43 mainProgram = "mkbootimage";