unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68180] [PATCH 0/4] Add emacs-pde
@ 2023-12-31 16:49 Maxim Cournoyer
  2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
  2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
  0 siblings, 2 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2023-12-31 16:49 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

This adds PDE, a Perl development environment for Emacs that provides online
documentation.


Maxim Cournoyer (4):
  gnu: emacs: Add awk, find, sed and sh to PATH wrapper.
  build: perl: Accept Gexps for #:module-build-flags.
  gnu: perl-b-keywords: Update to 1.26.
  gnu: Add emacs-pde.

 gnu/packages/emacs-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/emacs.scm     | 21 ++++++----
 gnu/packages/perl.scm      |  4 +-
 guix/build-system/perl.scm |  4 +-
 4 files changed, 105 insertions(+), 10 deletions(-)


base-commit: 2a242e86379ebddbdddf2927f26e5e27a98fc605
-- 
2.41.0





^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 0/4] Add emacs-pde
  2023-12-31 16:49 [bug#68180] [PATCH 0/4] Add emacs-pde Maxim Cournoyer
@ 2024-01-02  1:58 ` Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
                     ` (3 more replies)
  2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
  1 sibling, 4 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02  1:58 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

This adds PDE, a Perl development environment for Emacs that provides online
documentation.

Changes in v2:
 - Patch references in place instead of wrapping via PATH

Maxim Cournoyer (4):
  gnu: emacs: Patch awk, find, sed and sh commands.
  build: perl: Accept Gexps for #:module-build-flags.
  gnu: perl-b-keywords: Update to 1.26.
  gnu: Add emacs-pde.

 gnu/packages/emacs-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/emacs.scm     | 56 +++++++++++++++++++++++--
 gnu/packages/perl.scm      |  4 +-
 guix/build-system/perl.scm |  4 +-
 4 files changed, 143 insertions(+), 7 deletions(-)


base-commit: 2a242e86379ebddbdddf2927f26e5e27a98fc605
-- 
2.41.0





^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands.
  2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
@ 2024-01-02  1:58   ` Maxim Cournoyer
  2024-01-02  7:07     ` Andrew Tropin via Guix-patches via
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02  1:58 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

Before this change, using Emacs in a pure environment, e.g. 'guix shell --pure
emacs', would cause problems such as:

  jka-compr-insert-file-contents: Uncompression program ‘sh’ not found

And other problems were found requiring the other tools.

* gnu/packages/emacs.scm (emacs-minimal) [arguments]: Extend the
patch-program-file-names phase.
[inputs]: Add findutils, gawk and sed.

Change-Id: Ifb4fe2fc12ddc9eae387adb3da3f7821fab78e65
---

Changes in v2:
 - Patch references in place instead of wrapping via PATH

 gnu/packages/emacs.scm | 56 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 52 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b9d9e2b891..3e8de3c2e0 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 David Thompson <dthompson2@worcester.edu>
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2019, 2020, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
@@ -59,6 +59,7 @@ (define-module (gnu packages emacs)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages fribidi)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
@@ -157,13 +158,60 @@ (define-public emacs-minimal
                 (delete-file "configure"))))
           (add-after 'unpack 'patch-program-file-names
             (lambda* (#:key inputs #:allow-other-keys)
+              ;; Substitute "sh" command.
               (substitute* '("src/callproc.c"
                              "lisp/term.el"
                              "lisp/htmlfontify.el"
+                             "lisp/mail/feedmail.el"
+                             "lisp/obsolete/pgg-pgp.el"
+                             "lisp/obsolete/pgg-pgp5.el"
+                             "lisp/obsolete/terminal.el"
+                             "lisp/org/ob-eval.el"
                              "lisp/textmodes/artist.el"
-                             "lisp/progmodes/sh-script.el")
+                             "lisp/progmodes/sh-script.el"
+                             "lisp/textmodes/artist.el"
+                             "lisp/htmlfontify.el"
+                             "lisp/term.el")
                 (("\"/bin/sh\"")
-                 (format #f "~s" (search-input-file inputs "/bin/sh"))))
+                 (format #f "~s" (search-input-file inputs "bin/sh"))))
+              (substitute* '("lisp/gnus/mm-uu.el"
+                             "lisp/gnus/nnrss.el"
+                             "lisp/mail/blessmail.el")
+                (("\"#!/bin/sh\\\n\"")
+                 (format #f "\"#!~a~%\"" (search-input-file inputs "bin/sh"))))
+              (substitute* '("lisp/jka-compr.el"
+                             "lisp/man.el")
+                (("\"sh\"")
+                 (format #f "~s" (search-input-file inputs "bin/sh"))))
+
+              ;; Substitute "awk" command.
+              (substitute* '("lisp/gnus/nnspool.el"
+                             "lisp/org/ob-awk.el"
+                             "lisp/man.el")
+                (("\"awk\"")
+                 (format #f "~s" (search-input-file inputs "bin/awk"))))
+
+              ;; Substitute "find" command.
+              (substitute* '("lisp/gnus/gnus-search.el"
+                             "lisp/obsolete/nnir.el"
+                             "lisp/progmodes/executable.el"
+                             "lisp/progmodes/grep.el"
+                             "lisp/filecache.el"
+                             "lisp/ldefs-boot.el"
+                             "lisp/mpc.el")
+                (("\"find\"")
+                 (format #f "~s" (search-input-file inputs "bin/find"))))
+
+              ;; Substitute "sed" command.
+              (substitute* "lisp/org/ob-sed.el"
+                (("org-babel-sed-command \"sed\"")
+                 (format #f "org-babel-sed-command ~s"
+                         (search-input-file inputs "bin/sed"))))
+              (substitute* "lisp/man.el"
+                (("Man-sed-command \"sed\"")
+                 (format #f "Man-sed-command ~s"
+                         (search-input-file inputs "bin/sed"))))
+
               (substitute* "lisp/doc-view.el"
                 (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what)
                  (let ((replacement (false-if-exception
@@ -254,7 +302,7 @@ (define-public emacs-minimal
                 (copy-file
                  (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
                  "bin/emacs")))))))
-    (inputs (list bash-minimal coreutils gzip ncurses))
+    (inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed))
     (native-inputs (list autoconf pkg-config texinfo))
     (home-page "https://www.gnu.org/software/emacs/")
     (synopsis "The extensible text editor (minimal build for byte-compilation)")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 2/4] build: perl: Accept Gexps for #:module-build-flags.
  2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
@ 2024-01-02  1:58   ` Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde Maxim Cournoyer
  3 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02  1:58 UTC (permalink / raw)
  To: 68180; +Cc: Maxim Cournoyer

* guix/build-system/perl.scm (perl-build) [module-build-flags]: Accept gexps.

Change-Id: If1daa4d9a8cf97824b75f2113f4d7d83256463ce
---

(no changes since v1)

 guix/build-system/perl.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 7c6deb34bf..0d5493ab90 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -133,7 +133,9 @@ (define* (perl-build name inputs
                                                     search-paths))
                             #:make-maker? #$make-maker?
                             #:make-maker-flags #$make-maker-flags
-                            #:module-build-flags #$(sexp->gexp module-build-flags)
+                            #:module-build-flags #$(if (pair? module-build-flags)
+                                                       (sexp->gexp module-build-flags)
+                                                       module-build-flags)
                             #:phases #$(if (pair? phases)
                                            (sexp->gexp phases)
                                            phases)
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 3/4] gnu: perl-b-keywords: Update to 1.26.
  2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
@ 2024-01-02  1:58   ` Maxim Cournoyer
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde Maxim Cournoyer
  3 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02  1:58 UTC (permalink / raw)
  To: 68180; +Cc: Maxim Cournoyer

* gnu/packages/perl.scm (perl-b-keywords): Update to 1.26.

Change-Id: I3fdb9acf9f257ff9583179e29b2e6a26104b7e0d
---

(no changes since v1)

 gnu/packages/perl.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 8b82c272fc..5b32d6ecec 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -927,14 +927,14 @@ (define-public perl-b-hooks-op-check
 (define-public perl-b-keywords
   (package
     (name "perl-b-keywords")
-    (version "1.22")
+    (version "1.26")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://cpan/authors/id/R/RU/RURBAN/B-Keywords-"
                            version ".tar.gz"))
        (sha256
-        (base32 "0i2ksp0w9wv1qc22hrdl3k48cww64syhmv8zf6x0kgyd4081hr56"))))
+        (base32 "0d7dgbw3wdaqw8g7nl86q6gqfqsnzg2a9y47vpgb0zr65xfibaid"))))
     (build-system perl-build-system)
     (home-page "https://metacpan.org/release/B-Keywords")
     (synopsis "Lists of reserved barewords and symbol names")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde.
  2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
                     ` (2 preceding siblings ...)
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
@ 2024-01-02  1:58   ` Maxim Cournoyer
  2024-01-02  5:22     ` Liliana Marie Prikler
  3 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02  1:58 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/emacs-xyz.scm (emacs-pde): New variable.

Change-Id: Icab5d8acf9d441bb4a832a82e75432d64cc77ba7
---

(no changes since v1)

 gnu/packages/emacs-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a8ac238f58..fe46342adf 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system emacs)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -271,6 +272,7 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (gnu packages erlang)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages texinfo)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages web-browsers)
   #:use-module (gnu packages wget)
@@ -12271,6 +12273,90 @@ (define-public emacs-hl-todo
 regexp that matches all known keywords.")
     (license license:gpl3+)))
 
+(define-public emacs-pde
+  (package
+    (name "emacs-pde")
+    (version "0.2.17")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/Y/YE/YEWENBIN/Emacs-PDE-v"
+                           version ".tar.gz"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Delete pre-generated Texinfo and HTML documentation.
+                   (for-each delete-file '("lisp/doc/pde.info"
+                                           "lisp/doc/pde.html"))
+                   (delete-file-recursively "lisp/doc/pde")))
+       (sha256
+        (base32 "1i82isha839c8lx73kgp43v7gxr2adsr1yfw1glyxvi62w5ab9qz"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+      #:imported-modules `(,@%emacs-build-system-modules
+                           ,@%perl-build-system-modules)
+      #:modules '((guix build perl-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+      #:module-build-flags
+      #~(list (string-append "--elispdir=" #$output
+                             "/share/emacs/site-lisp/pde")
+              "--verbose")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-commands
+            (lambda* (#:key inputs #:allow-other-keys)
+              (make-file-writable "lisp/pde-vars.el")
+              (emacs-substitute-variables "lisp/pde-vars.el"
+                ("pde-perl-program"
+                 (search-input-file inputs "bin/perl"))
+                ("pde-perl-version"
+                 #$(package-version (this-package-input "perl")))
+                ("pde-perldoc-program"
+                 (search-input-file inputs "bin/perldoc"))
+                ("pde-find-program"
+                 (search-input-file inputs "bin/find")))
+              (make-file-writable "lisp/perlcritic.el")
+              (emacs-substitute-variables "lisp/perlcritic.el"
+                ("perlcritic-program"
+                 (search-input-file inputs "bin/perlcritic")))
+              (make-file-writable "lisp/perldoc.el")
+              (emacs-substitute-variables "lisp/perldoc.el"
+                ("perldoc-cache-el"
+                 "(expand-file-name \"~/.cache/perldoc-cache.el\"")
+                ("perldoc-pod2man"
+                 (search-input-file inputs "bin/pod2man")))
+              (make-file-writable "lisp/perltidy.el")
+              (emacs-substitute-variables "lisp/perltidy.el"
+                ("perltidy-program"
+                 (search-input-file inputs "bin/perltidy")))
+              (substitute* "lisp/tools/perldoc-cache.pl"
+                (("`perldoc")
+                 (string-append
+                  "`" (search-input-file inputs "bin/perldoc"))))))
+          (add-after 'build 'generate-doc
+            (lambda _
+              (invoke "./Build" "info")))
+          (add-after 'install 'move-doc
+            (lambda _
+              (let ((info (string-append #$output "/share/info/pde.info")))
+                (mkdir-p (dirname info))
+                (rename-file (string-append
+                              #$output
+                              "/share/emacs/site-lisp/pde/doc/pde.info")
+                             info)))))))
+    (native-inputs (list emacs-minimal perl-module-build texinfo))
+    (inputs (list findutils perl perl-critic))
+    (home-page "https://metacpan.org/release/Emacs-PDE")
+    (synopsis "Perl Development Environment for Emacs")
+    (description "Emacs::PDE is a collection of Emacs Lisp extensions to
+facilitate Perl programming.  CPerl Mode has provided an excellent environment
+for coding; Emacs::PDE provides other common tools such as creating files
+using templates, smart compiling, @command{perldoc}, @command{perltidy},
+debugger, tags tree view and so on.  PDE also provides an easy configuration
+for Perl programing, and a tutorial for novices to start using Emacs.")
+    (license license:perl-license)))
+
 (define-public emacs-perspective
   (package
     (name "emacs-perspective")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde.
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde Maxim Cournoyer
@ 2024-01-02  5:22     ` Liliana Marie Prikler
  2024-01-02 19:41       ` Maxim Cournoyer
  0 siblings, 1 reply; 14+ messages in thread
From: Liliana Marie Prikler @ 2024-01-02  5:22 UTC (permalink / raw)
  To: Maxim Cournoyer, 68180; +Cc: Katherine Cox-Buday, Andrew Tropin

Am Montag, dem 01.01.2024 um 20:58 -0500 schrieb Maxim Cournoyer:
> * gnu/packages/emacs-xyz.scm (emacs-pde): New variable.
> 
> Change-Id: Icab5d8acf9d441bb4a832a82e75432d64cc77ba7
> ---
> 
> (no changes since v1)
> 
>  gnu/packages/emacs-xyz.scm | 86
> ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 86 insertions(+)
> 
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index a8ac238f58..fe46342adf 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -167,6 +167,7 @@ (define-module (gnu packages emacs-xyz)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system copy)
>    #:use-module (guix build-system emacs)
> +  #:use-module (guix build-system perl)
>    #:use-module (guix build-system trivial)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages admin)
> @@ -271,6 +272,7 @@ (define-module (gnu packages emacs-xyz)
>    #:use-module (gnu packages erlang)
>    #:use-module (gnu packages statistics)
>    #:use-module (gnu packages libcanberra)
> +  #:use-module (gnu packages texinfo)
>    #:use-module (gnu packages virtualization)
>    #:use-module (gnu packages web-browsers)
>    #:use-module (gnu packages wget)
> @@ -12271,6 +12273,90 @@ (define-public emacs-hl-todo
>  regexp that matches all known keywords.")
>      (license license:gpl3+)))
>  
> +(define-public emacs-pde
> +  (package
> +    (name "emacs-pde")
> +    (version "0.2.17")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> "mirror://cpan/authors/id/Y/YE/YEWENBIN/Emacs-PDE-v"
> +                           version ".tar.gz"))
> +       (modules '((guix build utils)))
> +       (snippet '(begin
> +                   ;; Delete pre-generated Texinfo and HTML
> documentation.
> +                   (for-each delete-file '("lisp/doc/pde.info"
> +                                           "lisp/doc/pde.html"))
> +                   (delete-file-recursively "lisp/doc/pde")))
> +       (sha256
> +        (base32
> "1i82isha839c8lx73kgp43v7gxr2adsr1yfw1glyxvi62w5ab9qz"))))
> +    (build-system perl-build-system)
> +    (arguments
> +     (list
> +      #:imported-modules `(,@%emacs-build-system-modules
> +                           ,@%perl-build-system-modules)
> +      #:modules '((guix build perl-build-system)
> +                  (guix build emacs-utils)
> +                  (guix build utils))
> +      #:module-build-flags
> +      #~(list (string-append "--elispdir=" #$output
> +                             "/share/emacs/site-lisp/pde")
> +              "--verbose")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-commands
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (make-file-writable "lisp/pde-vars.el")
> +              (emacs-substitute-variables "lisp/pde-vars.el"
> +                ("pde-perl-program"
> +                 (search-input-file inputs "bin/perl"))
> +                ("pde-perl-version"
> +                 #$(package-version (this-package-input "perl")))
> +                ("pde-perldoc-program"
> +                 (search-input-file inputs "bin/perldoc"))
> +                ("pde-find-program"
> +                 (search-input-file inputs "bin/find")))
> +              (make-file-writable "lisp/perlcritic.el")
> +              (emacs-substitute-variables "lisp/perlcritic.el"
> +                ("perlcritic-program"
> +                 (search-input-file inputs "bin/perlcritic")))
> +              (make-file-writable "lisp/perldoc.el")
> +              (emacs-substitute-variables "lisp/perldoc.el"
> +                ("perldoc-cache-el"
> +                 "(expand-file-name \"~/.cache/perldoc-cache.el\"")
> +                ("perldoc-pod2man"
> +                 (search-input-file inputs "bin/pod2man")))
> +              (make-file-writable "lisp/perltidy.el")
> +              (emacs-substitute-variables "lisp/perltidy.el"
> +                ("perltidy-program"
> +                 (search-input-file inputs "bin/perltidy")))
> +              (substitute* "lisp/tools/perldoc-cache.pl"
> +                (("`perldoc")
> +                 (string-append
> +                  "`" (search-input-file inputs "bin/perldoc"))))))
I'd use for-each to make the files writable, possibly also a directory
excursion.
> +          (add-after 'build 'generate-doc
> +            (lambda _
> +              (invoke "./Build" "info")))
> +          (add-after 'install 'move-doc
> +            (lambda _
> +              (let ((info (string-append #$output
> "/share/info/pde.info")))
> +                (mkdir-p (dirname info))
> +                (rename-file (string-append
> +                              #$output
> +                              "/share/emacs/site-
> lisp/pde/doc/pde.info")
> +                             info)))))))
> +    (native-inputs (list emacs-minimal perl-module-build texinfo))
> +    (inputs (list findutils perl perl-critic))
> +    (home-page "https://metacpan.org/release/Emacs-PDE")
> +    (synopsis "Perl Development Environment for Emacs")
> +    (description "Emacs::PDE is a collection of Emacs Lisp
> extensions to
> +facilitate Perl programming.  CPerl Mode has provided an excellent
> environment
> +for coding; Emacs::PDE provides other common tools such as creating
> files
> +using templates, smart compiling, @command{perldoc},
> @command{perltidy},
> +debugger, tags tree view and so on.  PDE also provides an easy
> configuration
> +for Perl programing, and a tutorial for novices to start using
> Emacs.")
> +    (license license:perl-license)))
> +

Otherwise LGTM.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands.
  2024-01-02  1:58   ` [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
@ 2024-01-02  7:07     ` Andrew Tropin via Guix-patches via
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Tropin via Guix-patches via @ 2024-01-02  7:07 UTC (permalink / raw)
  To: Maxim Cournoyer, 68180
  Cc: Katherine Cox-Buday, Liliana Marie Prikler, Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 5807 bytes --]

On 2024-01-01 20:58, Maxim Cournoyer wrote:

> Before this change, using Emacs in a pure environment, e.g. 'guix shell --pure
> emacs', would cause problems such as:
>
>   jka-compr-insert-file-contents: Uncompression program ‘sh’ not found
>
> And other problems were found requiring the other tools.
>
> * gnu/packages/emacs.scm (emacs-minimal) [arguments]: Extend the
> patch-program-file-names phase.
> [inputs]: Add findutils, gawk and sed.
>
> Change-Id: Ifb4fe2fc12ddc9eae387adb3da3f7821fab78e65
> ---
>
> Changes in v2:
>  - Patch references in place instead of wrapping via PATH

Yep, I think this is a right way.  Thank you very much for working on
it!

>
>  gnu/packages/emacs.scm | 56 +++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 52 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index b9d9e2b891..3e8de3c2e0 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -9,7 +9,7 @@
>  ;;; Copyright © 2016 David Thompson <dthompson2@worcester.edu>
>  ;;; Copyright © 2016 Nikita <nikita@n0.is>
>  ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
> -;;; Copyright © 2017, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> +;;; Copyright © 2017, 2019, 2020, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
>  ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
>  ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
>  ;;; Copyright © 2017, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
> @@ -59,6 +59,7 @@ (define-module (gnu packages emacs)
>    #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages freedesktop)
>    #:use-module (gnu packages fribidi)
> +  #:use-module (gnu packages gawk)
>    #:use-module (gnu packages gcc)
>    #:use-module (gnu packages gd)
>    #:use-module (gnu packages gettext)
> @@ -157,13 +158,60 @@ (define-public emacs-minimal
>                  (delete-file "configure"))))
>            (add-after 'unpack 'patch-program-file-names
>              (lambda* (#:key inputs #:allow-other-keys)
> +              ;; Substitute "sh" command.
>                (substitute* '("src/callproc.c"
>                               "lisp/term.el"
>                               "lisp/htmlfontify.el"
> +                             "lisp/mail/feedmail.el"
> +                             "lisp/obsolete/pgg-pgp.el"
> +                             "lisp/obsolete/pgg-pgp5.el"
> +                             "lisp/obsolete/terminal.el"
> +                             "lisp/org/ob-eval.el"
>                               "lisp/textmodes/artist.el"
> -                             "lisp/progmodes/sh-script.el")
> +                             "lisp/progmodes/sh-script.el"
> +                             "lisp/textmodes/artist.el"
> +                             "lisp/htmlfontify.el"
> +                             "lisp/term.el")
>                  (("\"/bin/sh\"")
> -                 (format #f "~s" (search-input-file inputs "/bin/sh"))))
> +                 (format #f "~s" (search-input-file inputs "bin/sh"))))
> +              (substitute* '("lisp/gnus/mm-uu.el"
> +                             "lisp/gnus/nnrss.el"
> +                             "lisp/mail/blessmail.el")
> +                (("\"#!/bin/sh\\\n\"")
> +                 (format #f "\"#!~a~%\"" (search-input-file inputs "bin/sh"))))
> +              (substitute* '("lisp/jka-compr.el"
> +                             "lisp/man.el")
> +                (("\"sh\"")
> +                 (format #f "~s" (search-input-file inputs "bin/sh"))))
> +
> +              ;; Substitute "awk" command.
> +              (substitute* '("lisp/gnus/nnspool.el"
> +                             "lisp/org/ob-awk.el"
> +                             "lisp/man.el")
> +                (("\"awk\"")
> +                 (format #f "~s" (search-input-file inputs "bin/awk"))))
> +
> +              ;; Substitute "find" command.
> +              (substitute* '("lisp/gnus/gnus-search.el"
> +                             "lisp/obsolete/nnir.el"
> +                             "lisp/progmodes/executable.el"
> +                             "lisp/progmodes/grep.el"
> +                             "lisp/filecache.el"
> +                             "lisp/ldefs-boot.el"
> +                             "lisp/mpc.el")
> +                (("\"find\"")
> +                 (format #f "~s" (search-input-file inputs "bin/find"))))
> +
> +              ;; Substitute "sed" command.
> +              (substitute* "lisp/org/ob-sed.el"
> +                (("org-babel-sed-command \"sed\"")
> +                 (format #f "org-babel-sed-command ~s"
> +                         (search-input-file inputs "bin/sed"))))
> +              (substitute* "lisp/man.el"
> +                (("Man-sed-command \"sed\"")
> +                 (format #f "Man-sed-command ~s"
> +                         (search-input-file inputs "bin/sed"))))
> +
>                (substitute* "lisp/doc-view.el"
>                  (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what)
>                   (let ((replacement (false-if-exception
> @@ -254,7 +302,7 @@ (define-public emacs-minimal
>                  (copy-file
>                   (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
>                   "bin/emacs")))))))
> -    (inputs (list bash-minimal coreutils gzip ncurses))
> +    (inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed))
>      (native-inputs (list autoconf pkg-config texinfo))
>      (home-page "https://www.gnu.org/software/emacs/")
>      (synopsis "The extensible text editor (minimal build for byte-compilation)")

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v3 0/4] Add emacs-pde
  2023-12-31 16:49 [bug#68180] [PATCH 0/4] Add emacs-pde Maxim Cournoyer
  2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
@ 2024-01-02 19:39 ` Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
                     ` (3 more replies)
  1 sibling, 4 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02 19:39 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

This adds PDE, a Perl development environment for Emacs that provides online
documentation.

Changes in v3:
 - Use with-directory-excursion and for-each to make files writable

Changes in v2:
 - Patch references in place instead of wrapping via PATH

Maxim Cournoyer (4):
  gnu: emacs: Patch awk, find, sed and sh commands.
  build: perl: Accept Gexps for #:module-build-flags.
  gnu: perl-b-keywords: Update to 1.26.
  gnu: Add emacs-pde.

 gnu/packages/emacs-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/emacs.scm     | 56 +++++++++++++++++++++++--
 gnu/packages/perl.scm      |  4 +-
 guix/build-system/perl.scm |  4 +-
 4 files changed, 143 insertions(+), 7 deletions(-)


base-commit: 8f03c69b428923dc4d51cda23b10aa7fa7d89f05
-- 
2.41.0





^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v3 1/4] gnu: emacs: Patch awk, find, sed and sh commands.
  2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
@ 2024-01-02 19:39   ` Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02 19:39 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

Before this change, using Emacs in a pure environment, e.g. 'guix shell --pure
emacs', would cause problems such as:

  jka-compr-insert-file-contents: Uncompression program ‘sh’ not found

And other problems were found requiring the other tools.

* gnu/packages/emacs.scm (emacs-minimal) [arguments]: Extend the
patch-program-file-names phase.
[inputs]: Add findutils, gawk and sed.

Change-Id: Ifb4fe2fc12ddc9eae387adb3da3f7821fab78e65
---

(no changes since v2)

Changes in v2:
 - Patch references in place instead of wrapping via PATH

 gnu/packages/emacs.scm | 56 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 52 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b9d9e2b891..3e8de3c2e0 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 David Thompson <dthompson2@worcester.edu>
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2019, 2020, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
@@ -59,6 +59,7 @@ (define-module (gnu packages emacs)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages fribidi)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
@@ -157,13 +158,60 @@ (define-public emacs-minimal
                 (delete-file "configure"))))
           (add-after 'unpack 'patch-program-file-names
             (lambda* (#:key inputs #:allow-other-keys)
+              ;; Substitute "sh" command.
               (substitute* '("src/callproc.c"
                              "lisp/term.el"
                              "lisp/htmlfontify.el"
+                             "lisp/mail/feedmail.el"
+                             "lisp/obsolete/pgg-pgp.el"
+                             "lisp/obsolete/pgg-pgp5.el"
+                             "lisp/obsolete/terminal.el"
+                             "lisp/org/ob-eval.el"
                              "lisp/textmodes/artist.el"
-                             "lisp/progmodes/sh-script.el")
+                             "lisp/progmodes/sh-script.el"
+                             "lisp/textmodes/artist.el"
+                             "lisp/htmlfontify.el"
+                             "lisp/term.el")
                 (("\"/bin/sh\"")
-                 (format #f "~s" (search-input-file inputs "/bin/sh"))))
+                 (format #f "~s" (search-input-file inputs "bin/sh"))))
+              (substitute* '("lisp/gnus/mm-uu.el"
+                             "lisp/gnus/nnrss.el"
+                             "lisp/mail/blessmail.el")
+                (("\"#!/bin/sh\\\n\"")
+                 (format #f "\"#!~a~%\"" (search-input-file inputs "bin/sh"))))
+              (substitute* '("lisp/jka-compr.el"
+                             "lisp/man.el")
+                (("\"sh\"")
+                 (format #f "~s" (search-input-file inputs "bin/sh"))))
+
+              ;; Substitute "awk" command.
+              (substitute* '("lisp/gnus/nnspool.el"
+                             "lisp/org/ob-awk.el"
+                             "lisp/man.el")
+                (("\"awk\"")
+                 (format #f "~s" (search-input-file inputs "bin/awk"))))
+
+              ;; Substitute "find" command.
+              (substitute* '("lisp/gnus/gnus-search.el"
+                             "lisp/obsolete/nnir.el"
+                             "lisp/progmodes/executable.el"
+                             "lisp/progmodes/grep.el"
+                             "lisp/filecache.el"
+                             "lisp/ldefs-boot.el"
+                             "lisp/mpc.el")
+                (("\"find\"")
+                 (format #f "~s" (search-input-file inputs "bin/find"))))
+
+              ;; Substitute "sed" command.
+              (substitute* "lisp/org/ob-sed.el"
+                (("org-babel-sed-command \"sed\"")
+                 (format #f "org-babel-sed-command ~s"
+                         (search-input-file inputs "bin/sed"))))
+              (substitute* "lisp/man.el"
+                (("Man-sed-command \"sed\"")
+                 (format #f "Man-sed-command ~s"
+                         (search-input-file inputs "bin/sed"))))
+
               (substitute* "lisp/doc-view.el"
                 (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what)
                  (let ((replacement (false-if-exception
@@ -254,7 +302,7 @@ (define-public emacs-minimal
                 (copy-file
                  (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
                  "bin/emacs")))))))
-    (inputs (list bash-minimal coreutils gzip ncurses))
+    (inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed))
     (native-inputs (list autoconf pkg-config texinfo))
     (home-page "https://www.gnu.org/software/emacs/")
     (synopsis "The extensible text editor (minimal build for byte-compilation)")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v3 2/4] build: perl: Accept Gexps for #:module-build-flags.
  2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
@ 2024-01-02 19:39   ` Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 4/4] gnu: Add emacs-pde Maxim Cournoyer
  3 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02 19:39 UTC (permalink / raw)
  To: 68180; +Cc: Maxim Cournoyer

* guix/build-system/perl.scm (perl-build) [module-build-flags]: Accept gexps.

Change-Id: If1daa4d9a8cf97824b75f2113f4d7d83256463ce
---

(no changes since v1)

 guix/build-system/perl.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 7c6deb34bf..0d5493ab90 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -133,7 +133,9 @@ (define* (perl-build name inputs
                                                     search-paths))
                             #:make-maker? #$make-maker?
                             #:make-maker-flags #$make-maker-flags
-                            #:module-build-flags #$(sexp->gexp module-build-flags)
+                            #:module-build-flags #$(if (pair? module-build-flags)
+                                                       (sexp->gexp module-build-flags)
+                                                       module-build-flags)
                             #:phases #$(if (pair? phases)
                                            (sexp->gexp phases)
                                            phases)
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v3 3/4] gnu: perl-b-keywords: Update to 1.26.
  2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
@ 2024-01-02 19:39   ` Maxim Cournoyer
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 4/4] gnu: Add emacs-pde Maxim Cournoyer
  3 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02 19:39 UTC (permalink / raw)
  To: 68180; +Cc: Maxim Cournoyer

* gnu/packages/perl.scm (perl-b-keywords): Update to 1.26.

Change-Id: I3fdb9acf9f257ff9583179e29b2e6a26104b7e0d
---

(no changes since v1)

 gnu/packages/perl.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 8b82c272fc..5b32d6ecec 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -927,14 +927,14 @@ (define-public perl-b-hooks-op-check
 (define-public perl-b-keywords
   (package
     (name "perl-b-keywords")
-    (version "1.22")
+    (version "1.26")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://cpan/authors/id/R/RU/RURBAN/B-Keywords-"
                            version ".tar.gz"))
        (sha256
-        (base32 "0i2ksp0w9wv1qc22hrdl3k48cww64syhmv8zf6x0kgyd4081hr56"))))
+        (base32 "0d7dgbw3wdaqw8g7nl86q6gqfqsnzg2a9y47vpgb0zr65xfibaid"))))
     (build-system perl-build-system)
     (home-page "https://metacpan.org/release/B-Keywords")
     (synopsis "Lists of reserved barewords and symbol names")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v3 4/4] gnu: Add emacs-pde.
  2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
                     ` (2 preceding siblings ...)
  2024-01-02 19:39   ` [bug#68180] [PATCH v3 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
@ 2024-01-02 19:39   ` Maxim Cournoyer
  3 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02 19:39 UTC (permalink / raw)
  To: 68180
  Cc: Maxim Cournoyer, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/emacs-xyz.scm (emacs-pde): New variable.

Change-Id: Icab5d8acf9d441bb4a832a82e75432d64cc77ba7
---

Changes in v3:
 - Use with-directory-excursion and for-each to make files writable

 gnu/packages/emacs-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ad02b91c56..67a690b072 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system emacs)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -271,6 +272,7 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (gnu packages erlang)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages texinfo)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages web-browsers)
   #:use-module (gnu packages wget)
@@ -12269,6 +12271,90 @@ (define-public emacs-hl-todo
 regexp that matches all known keywords.")
     (license license:gpl3+)))
 
+(define-public emacs-pde
+  (package
+    (name "emacs-pde")
+    (version "0.2.17")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/Y/YE/YEWENBIN/Emacs-PDE-v"
+                           version ".tar.gz"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Delete pre-generated Texinfo and HTML documentation.
+                   (for-each delete-file '("lisp/doc/pde.info"
+                                           "lisp/doc/pde.html"))
+                   (delete-file-recursively "lisp/doc/pde")))
+       (sha256
+        (base32 "1i82isha839c8lx73kgp43v7gxr2adsr1yfw1glyxvi62w5ab9qz"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+      #:imported-modules `(,@%emacs-build-system-modules
+                           ,@%perl-build-system-modules)
+      #:modules '((guix build perl-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+      #:module-build-flags
+      #~(list (string-append "--elispdir=" #$output
+                             "/share/emacs/site-lisp/pde")
+              "--verbose")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-commands
+            (lambda* (#:key inputs #:allow-other-keys)
+              (with-directory-excursion "lisp"
+                (for-each make-file-writable
+                          '("pde-vars.el" "perlcritic.el" "perldoc.el"
+                            "perltidy.el"))
+                (emacs-substitute-variables "pde-vars.el"
+                  ("pde-perl-program"
+                   (search-input-file inputs "bin/perl"))
+                  ("pde-perl-version"
+                   #$(package-version (this-package-input "perl")))
+                  ("pde-perldoc-program"
+                   (search-input-file inputs "bin/perldoc"))
+                  ("pde-find-program"
+                   (search-input-file inputs "bin/find")))
+                (emacs-substitute-variables "perlcritic.el"
+                  ("perlcritic-program"
+                   (search-input-file inputs "bin/perlcritic")))
+                (emacs-substitute-variables "perldoc.el"
+                  ("perldoc-cache-el"
+                   "(expand-file-name \"~/.cache/perldoc-cache.el\"")
+                  ("perldoc-pod2man"
+                   (search-input-file inputs "bin/pod2man")))
+                (emacs-substitute-variables "perltidy.el"
+                  ("perltidy-program"
+                   (search-input-file inputs "bin/perltidy")))
+                (substitute* "tools/perldoc-cache.pl"
+                  (("`perldoc")
+                   (string-append
+                    "`" (search-input-file inputs "bin/perldoc")))))))
+          (add-after 'build 'generate-doc
+            (lambda _
+              (invoke "./Build" "info")))
+          (add-after 'install 'move-doc
+            (lambda _
+              (let ((info (string-append #$output "/share/info/pde.info")))
+                (mkdir-p (dirname info))
+                (rename-file (string-append
+                              #$output
+                              "/share/emacs/site-lisp/pde/doc/pde.info")
+                             info)))))))
+    (native-inputs (list emacs-minimal perl-module-build texinfo))
+    (inputs (list findutils perl perl-critic))
+    (home-page "https://metacpan.org/release/Emacs-PDE")
+    (synopsis "Perl Development Environment for Emacs")
+    (description "Emacs::PDE is a collection of Emacs Lisp extensions to
+facilitate Perl programming.  CPerl Mode has provided an excellent environment
+for coding; Emacs::PDE provides other common tools such as creating files
+using templates, smart compiling, @command{perldoc}, @command{perltidy},
+debugger, tags tree view and so on.  PDE also provides an easy configuration
+for Perl programing, and a tutorial for novices to start using Emacs.")
+    (license license:perl-license)))
+
 (define-public emacs-perspective
   (package
     (name "emacs-perspective")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde.
  2024-01-02  5:22     ` Liliana Marie Prikler
@ 2024-01-02 19:41       ` Maxim Cournoyer
  0 siblings, 0 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2024-01-02 19:41 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 68180, Katherine Cox-Buday, Andrew Tropin

Hello,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:


[...]

>> +              (make-file-writable "lisp/perltidy.el")
>> +              (emacs-substitute-variables "lisp/perltidy.el"
>> +                ("perltidy-program"
>> +                 (search-input-file inputs "bin/perltidy")))
>> +              (substitute* "lisp/tools/perldoc-cache.pl"
>> +                (("`perldoc")
>> +                 (string-append
>> +                  "`" (search-input-file inputs "bin/perldoc"))))))
> I'd use for-each to make the files writable, possibly also a directory
> excursion.

Done, see v3.

Thanks for the review!

-- 
Maxim

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-01-02 19:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-31 16:49 [bug#68180] [PATCH 0/4] Add emacs-pde Maxim Cournoyer
2024-01-02  1:58 ` [bug#68180] [PATCH v2 " Maxim Cournoyer
2024-01-02  1:58   ` [bug#68180] [PATCH v2 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
2024-01-02  7:07     ` Andrew Tropin via Guix-patches via
2024-01-02  1:58   ` [bug#68180] [PATCH v2 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
2024-01-02  1:58   ` [bug#68180] [PATCH v2 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
2024-01-02  1:58   ` [bug#68180] [PATCH v2 4/4] gnu: Add emacs-pde Maxim Cournoyer
2024-01-02  5:22     ` Liliana Marie Prikler
2024-01-02 19:41       ` Maxim Cournoyer
2024-01-02 19:39 ` [bug#68180] [PATCH v3 0/4] " Maxim Cournoyer
2024-01-02 19:39   ` [bug#68180] [PATCH v3 1/4] gnu: emacs: Patch awk, find, sed and sh commands Maxim Cournoyer
2024-01-02 19:39   ` [bug#68180] [PATCH v3 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
2024-01-02 19:39   ` [bug#68180] [PATCH v3 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
2024-01-02 19:39   ` [bug#68180] [PATCH v3 4/4] gnu: Add emacs-pde Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).