Subject: [RFC PATCH] gnu: Add rename.

From: Marius Bakke <[email-masked]>
Date: Fri, 24 Nov 2017 02:12:51 +0100

Hello!

I packaged this to help rename a bunch of patches.

It installs an executable called 'rename' which conflicts with the
(limited) one in util-linux, due to the latter being part of
%base-packages.

Are there preferences to either:

* Install this one as 'perl-rename'; or
* Drop the `rename` executable from util-linux.

If there are no comments I'll go with the conservative #1.

From 1065207246f5c5bd38ee0539e251ec6f4f65af22 Mon Sep 17 00:00:00 2001
From: Marius Bakke <[email-masked]>
Date: Fri, 24 Nov 2017 01:27:18 +0100
Subject: [PATCH] gnu: Add rename.

* gnu/packages/admin.scm (rename): New public variable.
---
 gnu/packages/admin.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index cd2b9a633..f604ff4d7 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2017 Ben Sturmfels <[email-masked]>
 ;;; Copyright © 2017 Ethan R. Jones <[email-masked]>
 ;;; Copyright © 2017 Christopher Allan Webber <[email-masked]>
+;;; Copyright © 2017 Marius Bakke <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
@@ -755,6 +757,33 @@ console window to allow commands to be interactively run on multiple servers
 over ssh connections.")
     (license license:gpl2+)))
 
+(define-public rename
+  (package
+    (name "rename")
+    (version "0.20")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
+                    version ".tar.gz"))
+       (sha256
+        (base32
+         "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)))
+    (propagated-inputs
+     `(("perl-test-pod" ,perl-test-pod)
+       ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
+    (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
+    (synopsis "Rename multiple files")
+    (description "@command{rename} renames the filenames supplied according
+to the Perl regular expression specified as the first argument. If a given
+filename is not modified by the expression, it will not be renamed.  If no
+filenames are given on the command line, filenames will be read via standard
+input.")
+    (license license:perl-license)))
+
 (define-public rottlog
   (package
     (name "rottlog")
-- 
2.15.0

Thanks,
Marius