Subject: [PATCH v3 4/5] gnu: Add libcsv.

From: Sughosha <[email-masked]>
Date: Thu, 23 Jan 2025 15:42:23 +0530

* gnu/packages/csv.scm: New file.
* gnu/local.mk: Register it.

Change-Id: Iadf1ea33c273d7ce616546c4c2c0d554ae722029
---
 gnu/local.mk         |  1 +
 gnu/packages/csv.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 gnu/packages/csv.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 5091f93eb8..7193f4daf0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -230,6 +230,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/cross-toolchain.scm		\
   %D%/packages/crypto.scm			\
   %D%/packages/cryptsetup.scm			\
+  %D%/packages/csv.scm				\
   %D%/packages/cups.scm				\
   %D%/packages/curl.scm				\
   %D%/packages/cvassistant.scm			\
diff --git a/gnu/packages/csv.scm b/gnu/packages/csv.scm
new file mode 100644
index 0000000000..c08ec03e01
--- /dev/null
+++ b/gnu/packages/csv.scm
@@ -0,0 +1,42 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2025 Sughosha <[email-masked]>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages csv)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public libcsv
+  (package
+    (name "libcsv")
+    (version "3.0.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/libcsv/libcsv/libcsv-"
+                                  version "/libcsv-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1r6pxdxrc3vfil1f9ng1dblm82asdqz6hkz7dj4vkkh3p0f47h6r"))))
+    (build-system gnu-build-system)
+    (home-page "http://sourceforge.net/projects/libcsv/")
+    (synopsis "CSV parser and writer library")
+    (description
+     "The CSV library provides a flexible, intuitive interface for parsing and
+writing csv data.")
+    (license license:lgpl2.1+)))
-- 
2.47.1