Subject: bug#77930: closed (Re: [bug#77930] [PATCH] gnu: Add guile-slugify.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 05 May 2025 22:25:03 +0000

Your bug report

#77930: [PATCH] gnu: Add guile-slugify

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
77930: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77930
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#77930] [PATCH] gnu: Add guile-slugify.
From: Ludovic Courtès <[email-masked]>
To: Ayush Jha <[email-masked]>
Cc: [email-masked]
Date: Tue, 06 May 2025 00:03:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Ayush Jha <[email-masked]> writes:

> * gnu/packages/guile-xyz.scm (guile-slugify): New variable.
>
> Change-Id: I4e7ab7a4821f53cf7372388efa07cea2fd3c17ef
> Signed-off-by: Ayush Jha <[email-masked]>

[...]

> +    (description
> +     "This package provides a procedure for converting strings into URL-friendly
> + slugs. A slug is a simplified version of a string, often used in URLs, that
> + contains only lowercase letters, digits, and hyphens. This package is inspired
> + by the 'slugify' function in the Django web framework. It is useful for
> + generating human-readable identifiers from arbitrary text.")
   ^
I removed the extra column of whitespace and address minor issues
reported by ‘guix lint’:

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index d6051f38ec..e213f17502 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -5507,7 +5507,7 @@ (define-public guile-slugify
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/ayys/guile-slugify.git")
+             (url "https://github.com/ayys/guile-slugify")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
@@ -5516,14 +5516,14 @@ (define-public guile-slugify
                             '("guix.scm" "test.scm")))))
     (build-system guile-build-system)
     (native-inputs (list guile-3.0))
-    (home-page "http://github.com/ayys/slugify.scm")
+    (home-page "https://github.com/ayys/guile-slugify")
     (synopsis "Convert arbitrary string to URL-friendly identifier in Guile")
     (description
-     "This package provides a procedure for converting strings into URL-friendly
-slugs. A slug is a simplified version of a string, often used in URLs, that
-contains only lowercase letters, digits, and hyphens.  This package is inspired
-by the 'slugify' function in the Django web framework.  It is useful for
-generating human-readable identifiers from arbitrary text.")
+     "This package provides a procedure for converting strings into
+URL-friendly slugs.  A slug is a simplified version of a string, often used in
+URLs, that contains only lowercase letters, digits, and hyphens.  This package
+is inspired by the @code{slugify} function in the Django web framework.  It is
+useful for generating human-readable identifiers from arbitrary text.")
     (license license:gpl3+)))
 
 (define-public guile-webutils

Applied, thanks!

Ludo’.

Subject: [PATCH] gnu: Add guile-slugify
From: Ayush Jha <[email-masked]>
To: [email-masked]
Cc: Ayush Jha <[email-masked]>
Date: Sat, 19 Apr 2025 18:39:36 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Adds slugify library for guile versions 3.0 and 2.2

Change-Id: I549000465584a7fe721aea17db5eb340ba8490b6
Signed-off-by: Ayush Jha <[email-masked]>
---
 gnu/packages/guile-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 537e84d3f8..1de04b46d0 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -5545,6 +5545,40 @@ (define-public guile-webutils
 as signed sessions, multipart message support, etc.")
       (license license:gpl3+))))
 
+(define-public guile-slugify
+  (let ((commit "3fbf2684d02b1689ce61df2d6ad983d1b1bf452d")
+        (revision "1"))
+    (package
+      (name "guile-slugify")
+      (version (git-version "0.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/ayys/guile-slugify.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1xg6dhcnd6m5z9d7yzsa2vzdhzgifyk92gkfb6md8rbc8dilp2rh"))
+                (snippet #~(for-each delete-file
+                            '("guix.scm" "test.scm" "LICENSE" "README.md")))))
+      (build-system guile-build-system)
+      (native-inputs (list guile-3.0))
+      (home-page "http://github.com/ayys/slugify.scm")
+      (synopsis "A slugify library for Guile inspired by Django's slugify function")
+      (description
+     "A simple Guile Scheme implementation of `slugify`, inspired by Django’s slugify.
+Converts human-readable text into clean, lowercase, URL-safe identifiers.")
+      (license license:gpl3+))))
+
+(define-public guile2.2-slugify
+  (package
+    (inherit guile-slugify)
+    (name "guile2.2-slugify")
+    (native-inputs
+     (modify-inputs (package-native-inputs guile-slugify)
+       (replace "guile" guile-2.2)))))
+
 (define-public guile2.2-webutils
   (package
     (inherit guile-webutils)

base-commit: e417d6fe8182c0b42b113490fec6a0297fd68fed
-- 
2.48.1