guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 8b5c9ad655ca3539140c6a4016f73ec55b9c43d8
Author: Wilko Meyer <[email protected]>
AuthorDate: Wed May 20 11:27:36 2026 +0200

    gnu: Add libchardet.
    
    * gnu/packages/textutils.scm (libchardet): New variable.
    
    Relates-to: guix/guix!7425
    Reviewed-by: Nguyễn Gia Phong <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/textutils.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index d5e3d66f51..2200647955 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
 ;;; Copyright © 2025 John Khoo <[email protected]>
 ;;; Copyright © 2026 orahcio <[email protected]>
+;;; Copyright © 2026 Wilko Meyer <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -278,6 +279,36 @@ case-folding, and other operations for data in the UTF-8 
encoding.")
     (properties
      (alist-delete 'hidden? (package-properties utf8proc-bootstrap)))))
 
+(define-public libchardet
+  (package
+    (name "libchardet")
+    (version "1.0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/Joungkyun/libchardet";
+                           "/releases/download/"
+                           version
+                           "/libchardet-"
+                           version
+                           ".tar.bz2"))
+       (sha256
+        (base32 "14hm4cqsbqlsynzniijz14pzsqbr5j98wwcgri8z6ylgiirxan49"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases
+      ;; fix for build error: bits/c++config.h: No such file or directory
+      #~(modify-phases %standard-phases
+          (add-before 'build 'unset-cplus-include-path
+            (lambda _
+              (unsetenv "CPLUS_INCLUDE_PATH"))))))
+    (native-inputs (list autoconf automake pkg-config perl))
+    (synopsis "Universal charset detector")
+    (description "Libchardet is a universal charset detector C/C++ API.")
+    (license license:mpl1.1)
+    (home-page "https://github.com/Joungkyun/libchardet";)))
+
 (define-public libconfuse
   (package
     (name "libconfuse")

Reply via email to