all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 31018@debbugs.gnu.org
Subject: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.
Date: Fri, 20 Apr 2018 23:16:15 +0530	[thread overview]
Message-ID: <cu7k1t1zs7s.fsf@systemreboot.net> (raw)
In-Reply-To: <87d0yyo7vm.fsf_-_@gmail.com>

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


I've pushed all patches except those concerning strict byte compilation,
emacs-scel, emacs-org-contrib, emacs-howm and emacs-calfw.

Some comments follow.

> Done, although match-let appears to be undocumented :/.

Yes, match-let is currently undocumented. But, I have a pending patch to
guile regarding this. So, hopefully, this will be fixed soon.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30144

> In the past I played with attempting to define a
> search-path-specification for our Emacs package, which would
> generalize even more the way our Emacs packages are discovered in
> Guix. That ended up looking like the following:
>
> --8<---------------cut here---------------start------------->8---
> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "EMACSLOADPATH")
> +            (files '("share/emacs/site-lisp"))
> +            (file-pattern ".*")
> +            (append-separator? #t))))))
> --8<---------------cut here---------------end--------------->8---
>
> Where the new "append-separator?" argument was added by myself (this is
> a world rebuilding change and also changes the manifest file). I didn't
> pursue that for now given that it still suffers from 1. explained above.
>
> The nice properties of this however was that it was now possible to have
> the Emacs dependencies found in `guix environment' as well as in the
> build system (anywhere), by using the native mechanism that Guix comes
> with. If you have interest in going that way I could revive those two
> old patches.

For now, I've pushed with the set-emacs-load-path function you
provided. But, you could pursue this world rebuilding search-paths
approach as a separate bug report.

>>> Subject: [PATCH 15/27] gnu: Add emacs-scel.
>>>
>>> +(define-public emacs-scel
>>> +  (let ((version "20170629")
>>> +        (revision "1")
>>> +        (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
>>> +    (package
>>> +      (name "emacs-scel")
>>> +      (version (git-version version revision commit))
>>> +      (source (origin
>>> +                (method git-fetch)
>>> +                (uri (git-reference
>>> +                      (url "https://github.com/supercollider/scel.git")
>>> +                      (commit commit)))
>>> +                (file-name (string-append name "-" version "-checkout"))
>>> +                (sha256
>>> +                 (base32
>>> +                  "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
>>> +      (build-system emacs-build-system)
>>
>> This package seems to use a cmake-build-system. Did you try that?
>
> I didn't, on purpose. I wanted the Elisp files to be processed the same
> as most of our other Emacs packages (with the patch-el-files phase
> patching binaries, for example) that we would miss otherwise).

I get your point. But, I think we can use phases from both the
emacs-build-system and the cmake-build-system, like I have done in the
attached patch. This keeps us more in line with the upstream repo,
rather than us reinventing too much. WDYT?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-emacs-scel.patch --]
[-- Type: text/x-patch, Size: 3357 bytes --]

From dd4d51654c04a44ed77692b0207763255c733c00 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 18 Mar 2018 16:37:30 -0400
Subject: [PATCH 2/2] gnu: Add emacs-scel.

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

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
---
 gnu/packages/emacs.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9f6965848..38ffcc472 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -65,6 +65,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages code)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages guile)
@@ -2713,6 +2714,57 @@ implementation in Emacs.  To use it just load this file and bind that function
 to a key in your preferred mode.")
       (license license:public-domain))))
 
+(define-public emacs-scel
+  (let ((version "20170629")
+        (revision "1")
+        (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
+    (package
+      (name "emacs-scel")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/supercollider/scel.git")
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
+      (build-system emacs-build-system)
+      (arguments
+       `(#:modules ((guix build emacs-build-system)
+                    ((guix build cmake-build-system) #:prefix cmake:)
+                    (guix build utils))
+         #:imported-modules (,@%emacs-build-system-modules
+                             (guix build cmake-build-system))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'configure
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "el/CMakeLists.txt"
+                 (("share/emacs/site-lisp/SuperCollider")
+                  (string-append
+                   "share/emacs/site-lisp/guix.d/scel-" ,version)))
+               ((assoc-ref cmake:%standard-phases 'configure)
+                #:outputs outputs
+                #:configure-flags '("-DSC_EL_BYTECOMPILE=OFF"))))
+           (add-after 'set-emacs-load-path 'add-el-dir-to-emacs-load-path
+             (lambda _
+               (setenv "EMACSLOADPATH"
+                       (string-append (getcwd) "/el:" (getenv "EMACSLOADPATH")))
+               #t))
+           (replace 'install (assoc-ref cmake:%standard-phases 'install)))))
+      (inputs
+       `(("supercollider" ,supercollider)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (home-page "https://github.com/supercollider/scel")
+      (synopsis "SuperCollider Emacs interface")
+      (description "@code{emacs-scel} is an Emacs interface to SuperCollider.
+SuperCollider is a platform for audio synthesis and algorithmic composition.")
+      (license license:gpl2+))))
+
 (define-public emacs-mit-scheme-doc
   (package
     (name "emacs-mit-scheme-doc")
-- 
2.15.1


[-- Attachment #3: Type: text/plain, Size: 531 bytes --]


>>> Subject: [PATCH 26/27] gnu: Add emacs-howm.
>>>
>> This package seems to use the gnu-build-system. Did you try that?
>
> No, for the same reasons explained above for the emacs-scel package.

Likewise. In this case, if we don't use the gnu-build-system, we'd miss
installing some of the files. Please look at my attached patch and see
if that is acceptable.

Also, all of howm's source files declare gpl1+ to be the license. But,
their COPYING file is of gpl2. Could you bring this contradiction to the
attention of upstream?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0001-gnu-Add-emacs-howm.patch --]
[-- Type: text/x-patch, Size: 2255 bytes --]

From afc86b1916a27e3c82863bf69f89aad3a89ab3d7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 00:22:24 -0400
Subject: [PATCH 1/2] gnu: Add emacs-howm.

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

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
---
 gnu/packages/emacs.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b2fd069d3..9f6965848 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1185,6 +1185,42 @@ or XEmacs.")
 a set of simplified face specifications and a user-supplied color palette")
     (license license:gpl3+)))
 
+(define-public emacs-howm
+  (package
+    (name "emacs-howm")
+    (version "1.4.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://howm.sourceforge.jp/a/howm-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("emacs" ,emacs-minimal)))
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-howmdir=" %output
+                            "/share/emacs/site-lisp/guix.d/howm-" ,version))
+       #:modules ((guix build gnu-build-system)
+                  ((guix build emacs-build-system) #:prefix emacs:)
+                  (guix build utils))
+       #:imported-modules (,@%gnu-build-system-modules
+                           (guix build emacs-build-system)
+                           (guix build emacs-utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'rename-lispdir 'make-autoloads
+           (assoc-ref emacs:%standard-phases 'make-autoloads)))))
+    (home-page "http://howm.osdn.jp/")
+    (synopsis "Note-taking tool for Emacs")
+    (description "Howm is a note-taking tool for Emacs.  Like
+code@{emacs-wiki.el}, it facilitates using hyperlinks and doing full-text
+searches.  Unlike code@{emacs-wiki.el}, it can be combined with any format.")
+    (license license:gpl1+)))
+
 (define-public emacs-calfw
   (package
     (name "emacs-calfw")
-- 
2.15.1


[-- Attachment #5: Type: text/plain, Size: 863 bytes --]


> Subject: [PATCH 22/30] gnu: emacs-org-contrib: Fix byte compilation.
>
> * gnu/packages/emacs.scm (emacs-org-contrib)[native-inputs]: Add emacs-scel.
> ---
>  gnu/packages/emacs.scm | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 7936e6bec..fc0ae5ffb 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -4640,6 +4640,8 @@ reproducible research.")
>                      out "/share/emacs/site-lisp/guix.d/org-contrib-" ,version)
>                   (for-each delete-file duplicates))
>                 #t))))))
> +    (native-inputs
> +     `(("emacs-scel" ,emacs-scel))) ;for byte compilation

Should emacs-scel only be a native input, or should it be a propagated input?

> A big thank you for reviewing this lengthy set of patches :)

Thank you for your patience! :-)

  reply	other threads:[~2018-04-20 17:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-01 15:57 [bug#31018] [PATCH] Improvements for our Emacs build system and fixes Maxim Cournoyer
2018-04-13 20:41 ` Arun Isaac
     [not found] ` <faec7bc3.AM8AAAStCIYAAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa0RYW@mailjet.com>
2018-04-14  1:28   ` Maxim Cournoyer
2018-04-14 16:51 ` Arun Isaac
     [not found] ` <9925e912.AM4AAAS8QCUAAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa0jGH@mailjet.com>
2018-04-17  2:59   ` [bug#31018] [PATCHv2] " Maxim Cournoyer
2018-04-20 17:46     ` Arun Isaac [this message]
2018-05-03 16:32       ` bug#31018: " Arun Isaac
2018-05-03 16:54         ` [bug#31018] " Arun Isaac
     [not found]     ` <5b6467d3.AMMAAAVkQu8AAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa2idv@mailjet.com>
2018-05-07 12:13       ` Maxim Cournoyer
2018-05-07 14:14         ` Arun Isaac
     [not found] ` <handler.31018.D31018.152536517825664.notifdone@debbugs.gnu.org>
2018-05-07 12:21   ` [bug#31018] closed (Re: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.) Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cu7k1t1zs7s.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=31018@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.