about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text')
-rw-r--r--nixpkgs/pkgs/tools/text/html2text/default.nix3
-rw-r--r--nixpkgs/pkgs/tools/text/mecab/base.nix4
-rw-r--r--nixpkgs/pkgs/tools/text/riffdiff/default.nix6
-rw-r--r--nixpkgs/pkgs/tools/text/source-highlight/default.nix16
4 files changed, 22 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/tools/text/html2text/default.nix b/nixpkgs/pkgs/tools/text/html2text/default.nix
index fff3e44baf69..7ef802e925fb 100644
--- a/nixpkgs/pkgs/tools/text/html2text/default.nix
+++ b/nixpkgs/pkgs/tools/text/html2text/default.nix
@@ -13,6 +13,9 @@ stdenv.mkDerivation rec {
     substituteInPlace configure \
         --replace /bin/echo echo \
         --replace CXX=unknown ':'
+  '' + lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace HTMLParser.C \
+      --replace "register " ""
   '';
 
   # the --prefix has no effect
diff --git a/nixpkgs/pkgs/tools/text/mecab/base.nix b/nixpkgs/pkgs/tools/text/mecab/base.nix
index 572ec28c0750..ea572104238c 100644
--- a/nixpkgs/pkgs/tools/text/mecab/base.nix
+++ b/nixpkgs/pkgs/tools/text/mecab/base.nix
@@ -15,5 +15,9 @@ finalAttrs: {
     "--with-charset=utf8"
   ];
 
+  # mecab uses several features that have been removed in C++17.
+  # Force the language mode to C++14, so that it can compile with clang 16.
+  makeFlags = [ "CXXFLAGS=-std=c++14" ];
+
   doCheck = true;
 }
diff --git a/nixpkgs/pkgs/tools/text/riffdiff/default.nix b/nixpkgs/pkgs/tools/text/riffdiff/default.nix
index cd5e2caa8f0d..8b71eeec4818 100644
--- a/nixpkgs/pkgs/tools/text/riffdiff/default.nix
+++ b/nixpkgs/pkgs/tools/text/riffdiff/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "riffdiff";
-  version = "2.27.0";
+  version = "2.27.1";
 
   src = fetchFromGitHub {
     owner = "walles";
     repo = "riff";
     rev = version;
-    hash = "sha256-yrIZsCxoFV9LFh96asYxpAYv1KvrLq+RlqL8gZXaeak=";
+    hash = "sha256-cW43nt8Go4VjEwXpCieGYIXwG1XMexslgriMsZ0BB1g=";
   };
 
-  cargoHash = "sha256-tO49qAEW15q76hLcHOtniwLqGy29MZ/dabyZHYAsiME=";
+  cargoHash = "sha256-phTo0XvCiTnBFF5r5myvwmiWnpcYLnkaMLcaXw4oL/Y=";
 
   meta = with lib; {
     description = "A diff filter highlighting which line parts have changed";
diff --git a/nixpkgs/pkgs/tools/text/source-highlight/default.nix b/nixpkgs/pkgs/tools/text/source-highlight/default.nix
index c8a775e64459..d20b3692f31c 100644
--- a/nixpkgs/pkgs/tools/text/source-highlight/default.nix
+++ b/nixpkgs/pkgs/tools/text/source-highlight/default.nix
@@ -14,16 +14,24 @@ stdenv.mkDerivation rec {
   patches = [
     # gcc-11 compat upstream patch
     (fetchpatch {
-      url = "http://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=904949c9026cb772dc93fbe0947a252ef47127f4";
-      sha256 = "1wnj0jmkmrwjww7qk9dvfxh8h06jdn7mi8v2fvwh95b6x87z5l47";
+      url = "https://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=904949c9026cb772dc93fbe0947a252ef47127f4";
+      hash = "sha256-h9DyD+pmlQT5dmKjWI9t0gCIYHe7pYkP55LnOqsE0vI=";
       excludes = [ "ChangeLog" ];
     })
 
     # Upstream fix for clang-13 and gcc-12 test support
     (fetchpatch {
       name = "gcc-12.patch";
-      url = "http://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=ab9fe5cb9b85c5afab94f2a7f4b6d7d473c14ee9";
-      sha256 = "1v33zd2766k7cdgmajw2lffw9wd7v4f8z01f40z53f6bp608nr62";
+      url = "https://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=ab9fe5cb9b85c5afab94f2a7f4b6d7d473c14ee9";
+      hash = "sha256-wmSLgLnLuFE+IC6AjxzZp/HEnaOCS1VfY2cac0T7Y+w=";
+    })
+  ] ++ lib.optionals stdenv.cc.isClang [
+    # Adds compatibility with C++17 by removing the `register` storage class specifier.
+    (fetchpatch {
+      name = "remove-register-keyword";
+      url = "https://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=416b39758dba2c74515584514a959ad1b0ad50d1";
+      hash = "sha256-R5A7IGHhU82EqceMCsuNBanhRz4dFVqiaH8637dr7jw=";
+      includes = [ "lib/*" ];
     })
   ];