Commit 945337f0 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

nxpmicro-mfgtools: pull upstream fix for gcc-13

Without the change build against gcc-13 fails as:

    $ nix build --impure --expr 'with import ./. {}; nxpmicro-mfgtools.override { stdenv = gcc13Stdenv; }'
    error: builder for '/nix/store/rx3ckzd1z975b3jnx24q53h8mc1a6y4v-nxpmicro-mfgtools-1.5.21.drv' failed with exit code 2;
           last 10 log lines:
           >       | ^~~~~~~~
           > /build/source/libuuu/libcomm.h:146:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
           > /build/source/libuuu/libcomm.h:147:1: error: 'uint64_t' does not name a type
           >   147 | uint64_t str_to_uint64(const string &str, bool * conversion_suceeded = nullptr);
           >       | ^~~~~~~~
           > /build/source/libuuu/libcomm.h:147:1: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
parent d4e6749f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, bzip2
@@ -21,6 +22,16 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-XVvGsHltlA3h9hd3C88G3s2wIZ1EVM6DmvdiwD82vTw=";
  };

  patches = [
    # Backport upstream fix for gcc-13 support:
    #   https://github.com/nxp-imx/mfgtools/pull/360
    (fetchpatch {
      name = "gcc-13.patch";
      url = "https://github.com/nxp-imx/mfgtools/commit/24fd043225903247f71ac10666d820277c0b10b1.patch";
      hash = "sha256-P7n6+Tiz10GIQ7QOd/qQ3BI7Wo5/66b0EwjFSpOUSJg=";
    })
  ];

  nativeBuildInputs = [ cmake pkg-config installShellFiles ];

  buildInputs = [ bzip2 libusb1 libzip openssl zstd ];