biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / by-name / mk / mkbootimage / package.nix
blob278162bafcd6f0680a0cf098d7802346ed3133b2
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , elfutils
5 , pcre
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "mkbootimage";
10   version = "2.3-unstable-2022-05-26";
12   src = fetchFromGitHub {
13     owner = "antmicro";
14     repo = "zynq-mkbootimage";
15     rev = "872363ce32c249f8278cf107bc6d3bdeb38d849f";
16     hash = "sha256-5FPyAhUWZDwHbqmp9J2ZXTmjaXPz+dzrJMolaNwADHs=";
17   };
19   # Using elfutils because libelf is being discontinued
20   # See https://github.com/NixOS/nixpkgs/pull/271568
21   buildInputs = [ elfutils pcre ];
23   postPatch = ''
24     substituteInPlace Makefile --replace "git rev-parse --short HEAD" "echo ${finalAttrs.src.rev}"
25   '';
27   installPhase = ''
28     runHook preInstall
30     install -Dm755 mkbootimage -t $out/bin
32     runHook postInstall
33   '';
35   hardeningDisable = [ "fortify" ];
37   meta = with lib; {
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";
44   };