about summary refs log tree commit diff
path: root/pkgs/development/libraries/cm256cc
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-08-20 12:34:54 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-08-20 12:34:54 +0100
commit55e4f1fea4c38928bef9db71b12010c5e6ecad38 (patch)
tree78699877b312e3b24c390993c0682c115f214cb3 /pkgs/development/libraries/cm256cc
parente7eb1f799cce31b7acfc694348e4daf9300acd41 (diff)
cm256cc: pull fix pending upstream inclusion for gcc-13
Without the change build fails on `gcc-13` as:

    $ nix build --impure --expr 'with import ./. {}; cm256cc.override { stdenv = gcc13Stdenv; }' -L
    ...
    /build/source/unit_test/data.h:37:9: error: 'uint16_t' does not name a type
       37 |         uint16_t i;
          |         ^~~~~~~~
    /build/source/unit_test/data.h:33:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
       32 | #include <string.h>
      +++ |+#include <cstdint>
Diffstat (limited to 'pkgs/development/libraries/cm256cc')
-rw-r--r--pkgs/development/libraries/cm256cc/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/libraries/cm256cc/default.nix b/pkgs/development/libraries/cm256cc/default.nix
index 4b49bcbbcc998..0e8b03aa72366 100644
--- a/pkgs/development/libraries/cm256cc/default.nix
+++ b/pkgs/development/libraries/cm256cc/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, boost } :
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost } :
 
 stdenv.mkDerivation rec {
   pname = "cm256cc";
@@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-T7ZUVVYGdzAialse//MoqWCVNBpbZvzWMAKc0cw7O9k=";
   };
 
+  patches = [
+    # Pull fix pending upstream inclusion for gcc-13 support:
+    #   https://github.com/f4exb/cm256cc/pull/18
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/f4exb/cm256cc/commit/a7f142bcdae8be1c646d67176ba0ba0f7e8dcd68.patch";
+      hash = "sha256-J7bm44sqnGsdPhJxQrE8LDxZ6tkTzLslHQnnKmtgrtM=";
+    })
+  ];
+
   nativeBuildInputs = [ cmake ];
   buildInputs = [ boost ];