diff mbox series

[bug#37094,1-3/3] Add nomad

Message ID 855zmqsyqg.fsf@disroot.org
State Accepted
Headers show
Series None | expand

Commit Message

Amar M. Singh Aug. 21, 2019, 8:34 a.m. UTC
After a few suggestions from Mike and Janneke:
1. Rename guile-emacsy --> emacsy-minimal
2. Removed glib-or-gtk-build-system in patch 004

cheers,
amar

Comments

Ludovic Courtès Aug. 25, 2019, 8:48 p.m. UTC | #1
Hello!

Amar Singh <nly@disroot.org> skribis:

> After a few suggestions from Mike and Janneke:
> 1. Rename guile-emacsy --> emacsy-minimal
> 2. Removed glib-or-gtk-build-system in patch 004

Nice!  Janneke, could you take a look and apply the Emacsy patches?

I’ve applied the Shroud patch.

Thanks,
Ludo’.
Janneke Nieuwenhuizen Aug. 27, 2019, 3:06 p.m. UTC | #2
Amar Singh writes:

Hello,

> After a few suggestions from Mike and Janneke:
> 1. Rename guile-emacsy --> emacsy-minimal
> 2. Removed glib-or-gtk-build-system in patch 004
>
> cheers,
> amar
>
>>From 7040563cb1386c672c75ddb141b235d5895adfdf Mon Sep 17 00:00:00 2001
> From: Amar Singh <nly@disroot.org>

Your attachments start with an escaped `>From' line, it's long ago that
I saw those in emails, any idea where they come from?

> Date: Mon, 8 Jul 2019 12:04:56 +0530
> Subject: [PATCH 1/4] gnu: Add emacsy-minimal.
>
> *  (guile-emacsy): New variable.
    ^extra space

I have removed the extra space, we want just one here.

> +++ b/gnu/packages/guile-xyz.scm
> @@ -2377,6 +2377,36 @@ comes with a simple counter example using FreeGLUT and browser examples
>  in C using Gtk+-3 and WebKitGtk.")
>      (license license:gpl3+)))

I have added:

@@ -21,6 +21,7 @@
 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
+;;; Copyright © 2019 Amar Singh <nly@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;

Note the use of © instead of (C), no `by' and a space after your name.

For the rest, LGTM.

>>From ede5e0fd3234d82bd7158f0a58f58efc27d26850 Mon Sep 17 00:00:00 2001
> From: Amar Singh <nly@disroot.org>
> Date: Wed, 10 Jul 2019 16:46:35 +0530
> Subject: [PATCH 3/4] gnu: Add nomad.
>
> * gnu/packages/guile-xyz.scm (nomad): New variable.
> ---
>  gnu/packages/guile-xyz.scm | 91 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 91 insertions(+)
>
> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
> index 77a765b52c..573dd461ad 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -58,6 +58,7 @@
>    #:use-module (gnu packages gperf)
>    #:use-module (gnu packages gtk)
>    #:use-module (gnu packages guile)
> +  #:use-module (gnu packages gnupg)

I have put this in its alphabetical place

@@ -56,6 +56,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)

> +    (version "v0.1.0-alpha")

and from here on, merged Mike's update.

>>From b082d2b141f87f91330e8416c40622b6213c9c9c Mon Sep 17 00:00:00 2001
> From: Amar Singh <nly@disroot.org>
> Date: Wed, 10 Jul 2019 16:45:50 +0530
> Subject: [PATCH 4/4] gnu: emacsy: cleanup build

I have changed this to

gnu: emacsy: Cleanup build.


> fix conflicts; emacsy requires guile-2.2.4 but found guile-2.2.6 in profile etc.
>
> build: add phase 'wrap-binaries
> bulid: glib-or-gtk-build-system wraps binaries to work with glib or gtk
> propagated-inputs: remove all but glib-network and gsettings
> ---
>  gnu/packages/guile-xyz.scm | 37 ++++++++++++++++++++++++++++++++-----
>  1 file changed, 32 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
> index 573dd461ad..88fc2eef2a 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -21,6 +21,7 @@
>  ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
>  ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
>  ;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
> +;;; Copyright (C) 2019 by Amar Singh<nly@disroot.org>

Removed this bit, see remarks above.

> +    (propagated-inputs
> +     `(("glib-networking" ,glib-networking)
> +       ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))

I have added ("glib" ,glib), which fixes

    Settings schema 'org.gnome.system.proxy' is not installed

> +         (add-after 'install 'wrap-binaries
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (effective (read-line
> +                                (open-pipe* OPEN_READ
> +                                            "guile" "-c"
> +                                            "(display (effective-version))")))
> +                    (deps (map (cut assoc-ref inputs <>) '("guile-lib" "guile-readline")))
> +                    (scm-path (map (cut string-append <> "/share/guile/site/" effective) `(,out ,@deps)))
> +                    (go-path (map (cut string-append <> "/lib/guile/" effective "/site-ccache/") `(,out ,@deps)))

I have reformatted this to not exceed 80 columns.

Thanks, I'm very excited to have nomad in Guix!

Pushed to master as 114f02bac47d86c04bf211e33864beffcde74aab

Greetings,
janneke
Janneke Nieuwenhuizen Aug. 27, 2019, 3:09 p.m. UTC | #3
Ludovic Courtès writes:

>> After a few suggestions from Mike and Janneke:
>> 1. Rename guile-emacsy --> emacsy-minimal
>> 2. Removed glib-or-gtk-build-system in patch 004
>
> Nice!  Janneke, could you take a look and apply the Emacsy patches?

Thanks for the ping/encouragement.

> I’ve applied the Shroud patch.

Thanks, done.

janneke
Amar M. Singh Aug. 27, 2019, 3:25 p.m. UTC | #4
Your attachments start with an escaped `>From' line, it's long ago that
I saw those in emails, any idea where they come from?

Sorry, I don't have any idea. I use Emacs and K-9(Android) for mails.

Nomad in Guix, awesome!

Thanks,
Amar Singh<nly@disroot.org>
----------------
Sent fromK-9 Mail. Please excuse my brevity.
diff mbox series

Patch

From b082d2b141f87f91330e8416c40622b6213c9c9c Mon Sep 17 00:00:00 2001
From: Amar Singh <nly@disroot.org>
Date: Wed, 10 Jul 2019 16:45:50 +0530
Subject: [PATCH 4/4] gnu: emacsy: cleanup build

fix conflicts; emacsy requires guile-2.2.4 but found guile-2.2.6 in profile etc.

build: add phase 'wrap-binaries
bulid: glib-or-gtk-build-system wraps binaries to work with glib or gtk
propagated-inputs: remove all but glib-network and gsettings
---
 gnu/packages/guile-xyz.scm | 37 ++++++++++++++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 573dd461ad..88fc2eef2a 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -21,6 +21,7 @@ 
 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
+;;; Copyright (C) 2019 by Amar Singh<nly@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2352,22 +2353,48 @@  more expressive and flexible than the traditional @code{format} procedure.")
        ("pkg-config" ,pkg-config)
        ("texinfo" ,texinfo)
        ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
-    (propagated-inputs
+    (inputs
      `(("dbus-glib" ,dbus-glib)
        ("guile" ,guile-2.2)
        ("guile-lib" ,guile-lib)
        ("guile-readline" ,guile-readline)
-       ("glib-networking" ,glib-networking)
        ("freeglut" ,freeglut)
-       ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("webkitgtk" ,webkitgtk)))
+    (propagated-inputs
+     `(("glib-networking" ,glib-networking)
+       ("gssettings-desktop-schemas" ,gsettings-desktop-schemas)))
     (arguments
-     `(#:phases
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (ice-9 popen)
+                  (ice-9 rdelim)
+                  (ice-9 regex)
+                  (ice-9 ftw)
+                  (srfi srfi-26))
+       #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'setenv
            (lambda _
              (setenv "GUILE_AUTO_COMPILE" "0")
-             #t)))))
+             #t))
+         (add-after 'install 'wrap-binaries
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (effective (read-line
+                                (open-pipe* OPEN_READ
+                                            "guile" "-c"
+                                            "(display (effective-version))")))
+                    (deps (map (cut assoc-ref inputs <>) '("guile-lib" "guile-readline")))
+                    (scm-path (map (cut string-append <> "/share/guile/site/" effective) `(,out ,@deps)))
+                    (go-path (map (cut string-append <> "/lib/guile/" effective "/site-ccache/") `(,out ,@deps)))
+                    (examples (filter (cut string-match "emacsy" <>)
+                                      (scandir (string-append out "/bin/"))))
+                    (progs (map (cut string-append out "/bin/" <>)
+                                examples)))
+               (map (cut wrap-program <>
+                         `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+                         `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path)) progs)
+               #t))))))
     (home-page "https://savannah.nongnu.org/projects/emacsy")
     (synopsis "Embeddable GNU Emacs-like library using Guile")
     (description
-- 
2.22.1