From 945337f01fbb7512703ac89e97c3128735a7a14c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 15 Oct 2023 18:25:11 +0100 Subject: [PATCH] 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 ''; did you forget to '#include '? > /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 ''; did you forget to '#include '? --- .../tools/misc/nxpmicro-mfgtools/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix b/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix index 5f6113343f73..594f90f752fe 100644 --- a/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix +++ b/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix @@ -1,5 +1,6 @@ { 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 ];