{stdenv, fetchurl}: stdenv.mkDerivation rec { pname = "mkbootimg"; version = "2020.05.18"; src = fetchurl { url = "https://github.com/osm0sis/mkbootimg/archive/${version}.tar.gz"; sha256 = "1zz06x31rak9sv5v01kj3cvqvzh5qvq34p00paw5p3jl0lxvnvwc"; }; installPhase = '' mkdir -p $out/bin cp -v mkbootimg $out/bin/ cp -v unpackbootimg $out/bin/ chmod +x $out/bin/* ''; NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ]; }