about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-10-15 18:25:11 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-10-15 18:25:11 +0100
commit945337f01fbb7512703ac89e97c3128735a7a14c (patch)
tree9ffb03c8a4b9291d4fb25936f2157d835ef642e2
parentd4e6749f94e6f3f63b98d328e2d3152a11a1903e (diff)
downloadnixlib-945337f01fbb7512703ac89e97c3128735a7a14c.tar
nixlib-945337f01fbb7512703ac89e97c3128735a7a14c.tar.gz
nixlib-945337f01fbb7512703ac89e97c3128735a7a14c.tar.bz2
nixlib-945337f01fbb7512703ac89e97c3128735a7a14c.tar.lz
nixlib-945337f01fbb7512703ac89e97c3128735a7a14c.tar.xz
nixlib-945337f01fbb7512703ac89e97c3128735a7a14c.tar.zst
nixlib-945337f01fbb7512703ac89e97c3128735a7a14c.zip
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>'?
-rw-r--r--pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix11
1 files changed, 11 insertions, 0 deletions
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 ];