all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
@ 2017-08-12  7:02 Oleg Pykhalov
  2017-08-12 15:06 ` Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Oleg Pykhalov @ 2017-08-12  7:02 UTC (permalink / raw)
  To: 28060

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH] gnu: Add emacs-nixos-mode. --]
[-- Type: text/x-patch, Size: 1638 bytes --]

From 90ef6b8f1bf57820db95d7daf17f7e0fae303356 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 12 Aug 2017 09:48:53 +0300
Subject: [PATCH] gnu: Add emacs-nixos-mode.

* gnu/packages/emacs.scm (emacs-nixos-mode): New variable.
---
 gnu/packages/emacs.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bb5d2349f..adf1ef167 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5331,3 +5331,29 @@ enables you to easily define search engines, bind them to keybindings, and
 query them from the comfort of your editor.")
     (home-page "https://github.com/hrs/engine-mode")
     (license license:gpl3+)))
+
+(define-public emacs-nixos-mode
+  (package
+    (name "emacs-nixos-mode")
+    (version "1.11.13")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/NixOS/nix/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "12110drl51r9bi45ql865jwvax1gladb5hfpwk0vi5bjybns6c9b"))))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir-elisp
+           (lambda _
+             (chdir "misc/emacs"))))))
+    (synopsis "Emacs major mode for editing Nix expressions")
+    (description "@code{nixos-mode} provides an Emacs major mode for editing
+Nix expressions.")
+    (home-page "https://github.com/NixOS/nix")
+    (license license:gpl3+)))
-- 
2.14.1

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12  7:02 [bug#28060] [PATCH] gnu: Add emacs-nixos-mode Oleg Pykhalov
@ 2017-08-12 15:06 ` Arun Isaac
  2017-08-12 16:46   ` ng0
  2017-08-12 16:56   ` [bug#28060] " Oleg Pykhalov
  0 siblings, 2 replies; 10+ messages in thread
From: Arun Isaac @ 2017-08-12 15:06 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28060


Thanks for the patch!

Oleg Pykhalov writes:

> +(define-public emacs-nixos-mode
> +  (package
> +    (name "emacs-nixos-mode")
> +    (version "1.11.13")

misc/emacs/nix-mode.el says the version number is 1.0. This contradicts
the release version number 1.11.13. But, I guess we can go with the
release version number.

> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'chdir-elisp
> +           (lambda _
> +             (chdir "misc/emacs"))))))

It is kinda obvious, but do add a short comment explaining why we are
changing directory.

> +    (synopsis "Emacs major mode for editing Nix expressions")
> +    (description "@code{nixos-mode} provides an Emacs major mode for editing
> +Nix expressions.")

Could you add the following line to the description?

"It supports syntax highlighting, indenting and refilling of comments."

I have taken the above sentence from
https://github.com/NixOS/nix/blob/master/misc/emacs/README

> +    (license license:gpl3+)))

Nix is under the LGPL 2.1 license. So, nix-mode should also be under the
same license, right?

Could you send an updated patch? Thanks!

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 15:06 ` Arun Isaac
@ 2017-08-12 16:46   ` ng0
  2017-08-12 17:14     ` Oleg Pykhalov
  2017-08-12 16:56   ` [bug#28060] " Oleg Pykhalov
  1 sibling, 1 reply; 10+ messages in thread
From: ng0 @ 2017-08-12 16:46 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28060

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

Arun Isaac transcribed 1.1K bytes:
> 
> Thanks for the patch!
> 
> Oleg Pykhalov writes:
> 
> > +(define-public emacs-nixos-mode
> > +  (package
> > +    (name "emacs-nixos-mode")
> > +    (version "1.11.13")
> 
> misc/emacs/nix-mode.el says the version number is 1.0. This contradicts
> the release version number 1.11.13. But, I guess we can go with the
> release version number.
> 
> > +    (arguments
> > +     `(#:phases
> > +       (modify-phases %standard-phases
> > +         (add-after 'unpack 'chdir-elisp
> > +           (lambda _
> > +             (chdir "misc/emacs"))))))
> 
> It is kinda obvious, but do add a short comment explaining why we are
> changing directory.
> 
> > +    (synopsis "Emacs major mode for editing Nix expressions")
> > +    (description "@code{nixos-mode} provides an Emacs major mode for editing
> > +Nix expressions.")
> 
> Could you add the following line to the description?
> 
> "It supports syntax highlighting, indenting and refilling of comments."
> 
> I have taken the above sentence from
> https://github.com/NixOS/nix/blob/master/misc/emacs/README
> 
> > +    (license license:gpl3+)))
> 
> Nix is under the LGPL 2.1 license. So, nix-mode should also be under the
> same license, right?
> 
> Could you send an updated patch? Thanks!

We have Nix in (gnu packages package-management).
Why do you fetch it again when we could just add
another output to the nix package?
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
https://www.infotropique.org https://krosos.org

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

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 15:06 ` Arun Isaac
  2017-08-12 16:46   ` ng0
@ 2017-08-12 16:56   ` Oleg Pykhalov
  1 sibling, 0 replies; 10+ messages in thread
From: Oleg Pykhalov @ 2017-08-12 16:56 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28060

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

Hello Arun,

thank you for supporting this patch.

Arun Isaac <arunisaac@systemreboot.net> writes:

> Thanks for the patch!
>
> Oleg Pykhalov writes:
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'chdir-elisp
>> +           (lambda _
>> +             (chdir "misc/emacs"))))))
>
> It is kinda obvious, but do add a short comment explaining why we are
> changing directory.

DONE.

>> +    (synopsis "Emacs major mode for editing Nix expressions")
>> +    (description "@code{nixos-mode} provides an Emacs major mode for editing
>> +Nix expressions.")
>
> Could you add the following line to the description?
>
> "It supports syntax highlighting, indenting and refilling of comments."
>
> I have taken the above sentence from
> https://github.com/NixOS/nix/blob/master/misc/emacs/README

DONE.

>> +    (license license:gpl3+)))
>
> Nix is under the LGPL 2.1 license. So, nix-mode should also be under the
> same license, right?

DONE.

> Could you send an updated patch? Thanks!


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

From 796f6a09c9464812f85c77641473ac9c85ac9654 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 12 Aug 2017 09:48:53 +0300
Subject: [PATCH] gnu: Add emacs-nixos-mode.

* gnu/packages/emacs.scm (emacs-nixos-mode): New variable.
---
 gnu/packages/emacs.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bb5d2349f..cdee59858 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5331,3 +5331,31 @@ enables you to easily define search engines, bind them to keybindings, and
 query them from the comfort of your editor.")
     (home-page "https://github.com/hrs/engine-mode")
     (license license:gpl3+)))
+
+(define-public emacs-nixos-mode
+  (package
+    (name "emacs-nixos-mode")
+    (version "1.11.13")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/NixOS/nix/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "12110drl51r9bi45ql865jwvax1gladb5hfpwk0vi5bjybns6c9b"))))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir-elisp
+           ;; Elisp directory is not in root of the source.
+           (lambda _
+             (chdir "misc/emacs"))))))
+    (synopsis "Emacs major mode for editing Nix expressions")
+    (description "@code{nixos-mode} provides an Emacs major mode for editing
+Nix expressions.  It supports syntax highlighting, indenting and refilling of
+comments.")
+    (home-page "https://github.com/NixOS/nix")
+    (license license:lgpl2.1+)))
-- 
2.14.1


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


-- 
Best regards,

Oleg.

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 16:46   ` ng0
@ 2017-08-12 17:14     ` Oleg Pykhalov
  2017-08-12 17:52       ` ng0
  2017-08-12 17:53       ` ng0
  0 siblings, 2 replies; 10+ messages in thread
From: Oleg Pykhalov @ 2017-08-12 17:14 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28060

Hello ng0,

ng0 <ng0@infotropique.org> writes:

…

> We have Nix in (gnu packages package-management).
> Why do you fetch it again when we could just add
> another output to the nix package?

Didn't think about this.  It will not fetch again if sources are same, I
guess.  But it will be more proper way for sure.  The problem is that
I'm not very familiar with mixing build systems for now.  This bug
report probably needs to wait me or somebody else will do it.

-- 
Best regards,

Oleg.

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 17:14     ` Oleg Pykhalov
@ 2017-08-12 17:52       ` ng0
  2017-08-12 17:53       ` ng0
  1 sibling, 0 replies; 10+ messages in thread
From: ng0 @ 2017-08-12 17:52 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28060

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

Oleg Pykhalov transcribed 0.5K bytes:
> Hello ng0,
> 
> ng0 <ng0@infotropique.org> writes:
> 
> …
> 
> > We have Nix in (gnu packages package-management).
> > Why do you fetch it again when we could just add
> > another output to the nix package?
> 
> Didn't think about this.  It will not fetch again if sources are same, I
> guess.  But it will be more proper way for sure.  The problem is that
> I'm not very familiar with mixing build systems for now.  This bug
> report probably needs to wait me or somebody else will do it.
> 
> -- 
> Best regards,
> 
> Oleg.

Two other options:
 - Could you ask upstream to unbundle it?
 - Could we just get the file(s) needed as inputs on their own
   and use that?
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
https://www.infotropique.org https://krosos.org

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

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 17:14     ` Oleg Pykhalov
  2017-08-12 17:52       ` ng0
@ 2017-08-12 17:53       ` ng0
  2017-08-12 18:32         ` Oleg Pykhalov
  1 sibling, 1 reply; 10+ messages in thread
From: ng0 @ 2017-08-12 17:53 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28060

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

Oleg Pykhalov transcribed 0.5K bytes:
> Hello ng0,
> 
> ng0 <ng0@infotropique.org> writes:
> 
> …
> 
> > We have Nix in (gnu packages package-management).
> > Why do you fetch it again when we could just add
> > another output to the nix package?
> 
> Didn't think about this.  It will not fetch again if sources are same, I
> guess.  But it will be more proper way for sure.  The problem is that
> I'm not very familiar with mixing build systems for now.  This bug
> report probably needs to wait me or somebody else will do it.
> 
> -- 
> Best regards,
> 
> Oleg.

Yet another option: inherit the package "nix" and adjust accordingly.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
https://www.infotropique.org https://krosos.org

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

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 17:53       ` ng0
@ 2017-08-12 18:32         ` Oleg Pykhalov
  2017-08-12 18:39           ` Oleg Pykhalov
  0 siblings, 1 reply; 10+ messages in thread
From: Oleg Pykhalov @ 2017-08-12 18:32 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28060

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

ng0 <ng0@infotropique.org> writes:

…

>> > We have Nix in (gnu packages package-management).
>> > Why do you fetch it again when we could just add
>> > another output to the nix package?
>> 
>> Didn't think about this.  It will not fetch again if sources are same, I
>> guess.  But it will be more proper way for sure.  The problem is that
>> I'm not very familiar with mixing build systems for now.  This bug
>> report probably needs to wait me or somebody else will do it.
> Yet another option: inherit the package "nix" and adjust accordingly.

I think this is the best option.


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

From b69c7020ba88f541666eda41753540e571666607 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 12 Aug 2017 09:48:53 +0300
Subject: [PATCH] gnu: Add emacs-nix-mode.

* gnu/packages/emacs.scm (emacs-nix-mode): New variable.
---
 gnu/packages/emacs.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bb5d2349f..e728419a2 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5226,6 +5226,24 @@ multiplexer.")
 editing RPM spec files.")
     (license license:gpl2+)))
 
+(define-public emacs-nix-mode
+  (package
+    (inherit nix)
+    (name "emacs-nix-mode")
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir-elisp
+           ;; Elisp directory is not in root of the source.
+           (lambda _
+             (chdir "misc/emacs"))))))
+    (synopsis "Emacs major mode for editing Nix expressions")
+    (description "@code{nixos-mode} provides an Emacs major mode for editing
+Nix expressions.  It supports syntax highlighting, indenting and refilling of
+comments.")
+    (license license:lgpl2.1+)))
+
 (define-public emacs-git-messenger
   (package
     (name "emacs-git-messenger")
-- 
2.14.1


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


-- 
Best regards,

Oleg.

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

* [bug#28060] [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 18:32         ` Oleg Pykhalov
@ 2017-08-12 18:39           ` Oleg Pykhalov
  2017-08-13  7:54             ` bug#28060: " Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Oleg Pykhalov @ 2017-08-12 18:39 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28060

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

Oleg Pykhalov <go.wigust@gmail.com> writes:

> ng0 <ng0@infotropique.org> writes:
>
> …
>
>>> > We have Nix in (gnu packages package-management).
>>> > Why do you fetch it again when we could just add
>>> > another output to the nix package?
>>> 
>>> Didn't think about this.  It will not fetch again if sources are same, I
>>> guess.  But it will be more proper way for sure.  The problem is that
>>> I'm not very familiar with mixing build systems for now.  This bug
>>> report probably needs to wait me or somebody else will do it.
>
> …
>
>> Yet another option: inherit the package "nix" and adjust accordingly.
>
> I think this is the best option.

Don't need the license field.


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

From 0ab1fceaf6eead2c72b4764ce91ecfe005097de4 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Sat, 12 Aug 2017 09:48:53 +0300
Subject: [PATCH] gnu: Add emacs-nix-mode.

* gnu/packages/emacs.scm (emacs-nix-mode): New variable.
---
 gnu/packages/emacs.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index bb5d2349f..5a69990c6 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5226,6 +5226,23 @@ multiplexer.")
 editing RPM spec files.")
     (license license:gpl2+)))
 
+(define-public emacs-nix-mode
+  (package
+    (inherit nix)
+    (name "emacs-nix-mode")
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir-elisp
+           ;; Elisp directory is not in root of the source.
+           (lambda _
+             (chdir "misc/emacs"))))))
+    (synopsis "Emacs major mode for editing Nix expressions")
+    (description "@code{nixos-mode} provides an Emacs major mode for editing
+Nix expressions.  It supports syntax highlighting, indenting and refilling of
+comments.")))
+
 (define-public emacs-git-messenger
   (package
     (name "emacs-git-messenger")
-- 
2.14.1


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


-- 
Best regards,

Oleg.

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

* bug#28060: [PATCH] gnu: Add emacs-nixos-mode.
  2017-08-12 18:39           ` Oleg Pykhalov
@ 2017-08-13  7:54             ` Arun Isaac
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Isaac @ 2017-08-13  7:54 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28060-done


>>> Yet another option: inherit the package "nix" and adjust accordingly.

Good idea!

Pushed, thanks!

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

end of thread, other threads:[~2017-08-13  7:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12  7:02 [bug#28060] [PATCH] gnu: Add emacs-nixos-mode Oleg Pykhalov
2017-08-12 15:06 ` Arun Isaac
2017-08-12 16:46   ` ng0
2017-08-12 17:14     ` Oleg Pykhalov
2017-08-12 17:52       ` ng0
2017-08-12 17:53       ` ng0
2017-08-12 18:32         ` Oleg Pykhalov
2017-08-12 18:39           ` Oleg Pykhalov
2017-08-13  7:54             ` bug#28060: " Arun Isaac
2017-08-12 16:56   ` [bug#28060] " Oleg Pykhalov

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.