GNU bug report logs - #77930
[PATCH] gnu: Add guile-slugify

Previous Next

Package: guix-patches;

Reported by: Ayush Jha <ayushjha <at> protonmail.com>

Date: Sat, 19 Apr 2025 22:45:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

To reply to this bug, email your comments to 77930 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#77930; Package guix-patches. (Sat, 19 Apr 2025 22:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ayush Jha <ayushjha <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 19 Apr 2025 22:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ayush Jha <ayushjha <at> protonmail.com>
To: guix-patches <at> gnu.org
Cc: Ayush Jha <ayushjha <at> protonmail.com>
Subject: [PATCH] gnu: Add guile-slugify
Date: Sat, 19 Apr 2025 18:39:36 +0000
Adds slugify library for guile versions 3.0 and 2.2

Change-Id: I549000465584a7fe721aea17db5eb340ba8490b6
Signed-off-by: Ayush Jha <ayushjha <at> protonmail.com>
---
 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






Information forwarded to guix-patches <at> gnu.org:
bug#77930; Package guix-patches. (Thu, 24 Apr 2025 09:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 77930 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Ayush Jha <ayushjha <at> protonmail.com>
Cc: 77930 <at> debbugs.gnu.org
Subject: Re: [bug#77930] [PATCH] gnu: Add guile-slugify
Date: Thu, 24 Apr 2025 10:45:06 +0200
Hello,

Ayush Jha <ayushjha <at> protonmail.com> writes:

> Adds slugify library for guile versions 3.0 and 2.2
>
> Change-Id: I549000465584a7fe721aea17db5eb340ba8490b6
> Signed-off-by: Ayush Jha <ayushjha <at> protonmail.com>

Nice.  Bonus point if you write a commit log that follows our
conventions—you can use ‘./etc/committer.scm’ to do that, but otherwise
we can do it on your behalf.

> +(define-public guile-slugify
> +  (let ((commit "3fbf2684d02b1689ce61df2d6ad983d1b1bf452d")
> +        (revision "1"))

I suppose there’s no release tag?

> +                (snippet #~(for-each delete-file
> +                            '("guix.scm" "test.scm" "LICENSE" "README.md")))))

Why delete these files?  I would keep them unless there’s a good reason
to do this.

> +      (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")

Maybe “Produce URL-safe identifiers from arbitrary string”?  See
<https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html>.

> +      (description
> +     "A simple Guile Scheme implementation of `slugify`, inspired by Django’s slugify.
> +Converts human-readable text into clean, lowercase, URL-safe identifiers.")

Likewise, could you make it a full sentence?

> +(define-public guile2.2-slugify
> +  (package
> +    (inherit guile-slugify)
> +    (name "guile2.2-slugify")

Unless there’s a need for Guile 2.2 support, I would omit it.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#77930; Package guix-patches. (Thu, 24 Apr 2025 20:46:01 GMT) Full text and rfc822 format available.

Message #11 received at 77930 <at> debbugs.gnu.org (full text, mbox):

From: Ayush Jha <ayushjha <at> protonmail.com>
To: 77930 <at> debbugs.gnu.org
Subject: (No Subject)
Date: Thu, 24 Apr 2025 20:45:11 +0000
> Nice.  Bonus point if you write a commit log that follows our
> conventions—you can use ‘./etc/committer.scm’ to do that, but otherwise we
> can do it on your behalf.

I'll take that bonus point please! I used `commiter.scm` to generate the
commit for this version of the patch.

> I suppose there’s no release tag?

There is now :) I am using the git tag instead of the commit.

> Why delete these files?  I would keep them unless there’s a good reason to
> do this.

I just removed them to keep things neat. I am now keeping LICENSE, and
README.md files, but am removing "guix.scm" and "test.scm" because otherwise
guile tries (and fails) to compile them.

> Unless there’s a need for Guile 2.2 support, I would omit it.

I've removed guile-2.2 support for this package.


I also tried to format the synopsis and description based on the guix docs you
linked.






Information forwarded to guix-patches <at> gnu.org:
bug#77930; Package guix-patches. (Thu, 24 Apr 2025 20:46:02 GMT) Full text and rfc822 format available.

Message #14 received at 77930 <at> debbugs.gnu.org (full text, mbox):

From: Ayush Jha <ayushjha <at> protonmail.com>
To: 77930 <at> debbugs.gnu.org
Cc: Ayush Jha <ayushjha <at> protonmail.com>
Subject: [PATCH] gnu: Add guile-slugify.
Date: Thu, 24 Apr 2025 20:45:40 +0000
* gnu/packages/guile-xyz.scm (guile-slugify): New variable.

Change-Id: I4e7ab7a4821f53cf7372388efa07cea2fd3c17ef
Signed-off-by: Ayush Jha <ayushjha <at> protonmail.com>
---
 gnu/packages/guile-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a8abefa474..449420c4b8 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -5518,6 +5518,33 @@ (define (guile-sls->sls file)
 gnome-keyring, and many more.")
     (license license:expat)))
 
+(define-public guile-slugify
+  (package
+    (name "guile-slugify")
+    (version "0.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ayys/guile-slugify.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1xg6dhcnd6m5z9d7yzsa2vzdhzgifyk92gkfb6md8rbc8dilp2rh"))
+       (snippet #~(for-each delete-file
+                            '("guix.scm" "test.scm")))))
+    (build-system guile-build-system)
+    (native-inputs (list guile-3.0))
+    (home-page "http://github.com/ayys/slugify.scm")
+    (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.")
+    (license license:gpl3+)))
+
 (define-public guile-webutils
   (let ((commit "d309d65a85247e4f3cea63a17defd1e6d35d821f")
         (revision "1"))

base-commit: 85b5c2c8f66aed05730f6c7bdeabfaadf619bb8f
-- 
2.38.1






Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 05 May 2025 22:25:03 GMT) Full text and rfc822 format available.

Notification sent to Ayush Jha <ayushjha <at> protonmail.com>:
bug acknowledged by developer. (Mon, 05 May 2025 22:25:03 GMT) Full text and rfc822 format available.

Message #19 received at 77930-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ayush Jha <ayushjha <at> protonmail.com>
Cc: 77930-done <at> debbugs.gnu.org
Subject: Re: [bug#77930] [PATCH] gnu: Add guile-slugify.
Date: Tue, 06 May 2025 00:03:02 +0200
[Message part 1 (text/plain, inline)]
Hi,

Ayush Jha <ayushjha <at> protonmail.com> writes:

> * gnu/packages/guile-xyz.scm (guile-slugify): New variable.
>
> Change-Id: I4e7ab7a4821f53cf7372388efa07cea2fd3c17ef
> Signed-off-by: Ayush Jha <ayushjha <at> protonmail.com>

[...]

> +    (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’:

[Message part 2 (text/x-patch, inline)]
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
[Message part 3 (text/plain, inline)]
Applied, thanks!

Ludo’.

This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.