Re: Failed to connect to guix daemon socket in pure env

2020-02-21 Thread zimoun
Hi Jeremy,

Let send you first contribution. ;-)

Well, now you should be to build your package, something like:

   guix build -f your-definition.scm

where the file your-defintion.scm contains the recipe of your package.

Then, the instructions about how to submit.

1. clone from savanah and go to the directory
2. guix environment --container guix --ad-hoc git git:sendemail emacs
3. ./bootstrap && ./configure --localstatedir=/var/ && make
4. add the definition in the file gnu/packages/emacs-xyz.scm
Do not forget: a) to add your name on the top (copyright) and b) check
the indentation (M-C-q using Emacs on the opening parenthesis of your
addition)
5. check it works, first by searching or showing it:
   ./pre-inst-env guix search emacs ac geiser
   ./pre-inst-env guix show emacs-ac-geiser
6. Build it and address the warnings
   ./pre-inst-env guix build emacs-ac-geiser
7. Verify the reproducibility
   ./pre-inst-env guix build emacs-ac-geiser --no-grafts --check -K
8. Lint and address the issue
   ./pre-env-inst guix lint emacs-ac-geiser

If everything is fine, let commit and submit. Look at other commit
messages to find inspiration :-) Roughly speaking:

  gnu: Add emacs-ac-geiser.

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

There is yasnippet for Emacs which eases the addition.

Last, use format-patch: git format-patch -n1.
And send it: git send-email --to=guix-patc...@gnu.org 0001-Add-blablabla.patch

Maybe you need to configure your smtp in ~/.gitconfig:

[sendemail]
smtpServer =
smtpServerPort =
smtpEncryption = tls
smtpUser =
smtpPass =


And if you are still motivated, you could add all the "first
contribution" process to the Cookbook. ;-)


Cheers,
simon



Re: Failed to connect to guix daemon socket in pure env

2020-02-20 Thread zimoun
Hi Jeremy,

Could you please trim your emails when you answer?

On Thu, 20 Feb 2020 at 09:13, Jeremy Korwin-Zmijowski
 wrote:

> > > $ ./pre-inst-env guix import elpa --archive=melpa-stable ac-geiser
> > >
> > > I copied the resulted definition in "emacs-ac-geiser-imported.scm"
> > >
> > > $ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-
> > > auto-
> > > complete
> > >
> > > $ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser-
> > > imported.scm

I miss why you need ./pre-inst-env if you build from a local file. The command:

   guix build -f /tmp/emacs-ac-geiser.scm

should be enough, without the "./bootstrap && ./configure
--localstatedir=/var/ && make" dance.


Considering the definition of 'ac-geiser' it does not build because
the dependencies to 'geiser' and 'auto-complete' are missing. It is
easy to add them:

#:use-module (gnu packages emacs-xyz)

and the field 'inputs'

(inputs
   `(("geiser" ,geiser)
 ("auto-complete" ,emacs-auto-complete)))

and you are done.


> Sorry for flooding, but I realized that the issue I created this thread
> for is solved so I should create another one to go on my next problems.

As you want. :-)



Cheers,
simon



Re: Failed to connect to guix daemon socket in pure env

2020-02-20 Thread Jeremy Korwin-Zmijowski
Le jeudi 20 février 2020 à 08:54 +0100, Jeremy Korwin-Zmijowski a
écrit :
> Le jeudi 20 février 2020 à 08:53 +0100, Jeremy Korwin-Zmijowski a
> écrit :
> > Le jeudi 20 février 2020 à 01:17 +0100, zimoun a écrit :
> > > Hi Jeremy,
> > > 
> > > On Thu, 20 Feb 2020 at 00:33, Jeremy Korwin-Zmijowski
> > >  wrote:
> > > 
> > > > $ ./pre-inst-env guix package --install-from-file=emacs-ac-
> > > > geiser.scm
> > > > guix package: error: failed to connect to
> > > > `/usr/local/var/guix/daemon-
> > > > socket/socket': No such file or directory
> > > > 
> > > > Any idea ?
> > > 
> > > Is the daemon up?
> > > As root "systemctl start guix-daemon".
> > > 
> > > Does the simple "guix install foo" work for you?
> > > 
> > > And how have you installed Guix?
> > > 
> > > 
> > > Cheers,
> > > simon
> > 
> > Hey Simon!
> > 
> > Thank you it does help.
> > 
> > Now the process stucks here ("emacs-ac-geiser.scm" is my almost
> > hand-
> > made definition):
> > 
> > $ ./pre-inst-env guix package --install-from-file=emacs-ac-
> > geiser.scm
> > [...]
> > View build log at
> > '/var/log/guix/drvs/9s/6pm5yamchw1b9ywl74lw8rbpgkyk7d-emacs-ac-
> > geiser-
> > v0.1.drv.bz2'.
> > $ bzless /var/log/guix/drvs/9s/6pm5yamchw1b9ywl74lw8rbpgkyk7d-
> > emacs-
> > ac-
> > geiser-v0.1.drv.bz2
> > 
> >[...]
> >starting phase `build'
> >Checking /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
> >geiser-v0.1/share/emacs/site-lisp/...
> >Compiling /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
> >geiser-v0.1/share/emacs/site-lisp/ac-geiser-v0.1-autoloads.el...
> >Compiling /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
> >geiser-v0.1/share/emacs/site-lisp/ac-geiser.el...
> >Cannot open load file: No such file or directory, geiser
> >command "/gnu/store/wmn02s4a2l5l5zaiv9lwahh808pdlpn4-emacs-
> > minimal-
> >26.3/bin/emacs" "--quick" "--batch" "--eval=(progn (setq byte-
> >compile-debug t) (byte-recompile-directory (file-name-as-
> > directory
> >\"/gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-geiser-
> >v0.1/share/emacs/site-lisp\") 0 1))" failed with status 255
> > 
> > See whole log in attached "emacs-ac-geiser-v0.1.drv.bz2" file
> > 
> > The same error occurs with :
> > $ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-
> > auto-
> > complete
> > 
> > or even
> > 
> > $ guix environment --pure guix
> > 
> > 
> > 
> > To try from a different angle, I did it all over again with
> > 
> > $ ./pre-inst-env guix import elpa --archive=melpa-stable ac-geiser
> > 
> > I copied the resulted definition in "emacs-ac-geiser-imported.scm"
> > 
> > $ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-
> > auto-
> > complete
> > 
> > $ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser-
> > imported.scm
> > 
> > Backtrace:
> >   14 (apply-smob/1 #)
> > In ice-9/boot-9.scm:
> > 705:2 13 (call-with-prompt _ _ # > handle?>)
> > In ice-9/eval.scm:
> > 619:8 12 (_ #(#(#)))
> > In guix/ui.scm:
> >   1824:12 11 (run-guix-command _ . _)
> > In ice-9/boot-9.scm:
> > 829:9 10 (catch _ _ # > guix/ui.scm:657?>
> > ?)
> > 829:9  9 (catch _ _ # > guix/ui.scm:791?>
> > ?)
> > In guix/scripts/package.scm:
> >951:10  8 (_)
> > In guix/status.scm:
> > 768:4  7 (call-with-status-report _ _)
> > In guix/scripts/package.scm:
> >959:14  6 (_)
> > In guix/build/syscalls.scm:
> >1145:4  5 (call-with-file-lock/no-wait _ _ _)
> > In guix/scripts/package.scm:
> >897:21  4 (_)
> > 608:4  3 (options->installable ((install . #)
> > ?)
> > ?)
> > In srfi/srfi-1.scm:
> >697:23  2 (filter-map #
> > .
> > #)
> > In guix/profiles.scm:
> >316:24  1 (package->manifest-entry # > ?>
> > ?)
> > In emacs-ac-geiser-imported.scm:
> >  24:6  0 (propagated-inputs # > emacs-
> > ?>)
> > 
> > emacs-ac-geiser-imported.scm:24:6: In procedure propagated-inputs:
> > error: emacs-geiser: unbound variable
> > 
> > 
> > Don't know what I can do more than the virtual env including emacs-
> > geiser already...
> > 
> > Jérémy
> > 
> 
> And the definitions... haha could help !

Sorry for flooding, but I realized that the issue I created this thread
for is solved so I should create another one to go on my next problems.

Thank you again Simon !

Cheers,

Jérémy




Re: Failed to connect to guix daemon socket in pure env

2020-02-19 Thread Jeremy Korwin-Zmijowski
Le jeudi 20 février 2020 à 08:53 +0100, Jeremy Korwin-Zmijowski a
écrit :
> Le jeudi 20 février 2020 à 01:17 +0100, zimoun a écrit :
> > Hi Jeremy,
> > 
> > On Thu, 20 Feb 2020 at 00:33, Jeremy Korwin-Zmijowski
> >  wrote:
> > 
> > > $ ./pre-inst-env guix package --install-from-file=emacs-ac-
> > > geiser.scm
> > > guix package: error: failed to connect to
> > > `/usr/local/var/guix/daemon-
> > > socket/socket': No such file or directory
> > > 
> > > Any idea ?
> > 
> > Is the daemon up?
> > As root "systemctl start guix-daemon".
> > 
> > Does the simple "guix install foo" work for you?
> > 
> > And how have you installed Guix?
> > 
> > 
> > Cheers,
> > simon
> 
> Hey Simon!
> 
> Thank you it does help.
> 
> Now the process stucks here ("emacs-ac-geiser.scm" is my almost hand-
> made definition):
> 
> $ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser.scm
> [...]
> View build log at
> '/var/log/guix/drvs/9s/6pm5yamchw1b9ywl74lw8rbpgkyk7d-emacs-ac-
> geiser-
> v0.1.drv.bz2'.
> $ bzless /var/log/guix/drvs/9s/6pm5yamchw1b9ywl74lw8rbpgkyk7d-emacs-
> ac-
> geiser-v0.1.drv.bz2
> 
>[...]
>starting phase `build'
>Checking /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
>geiser-v0.1/share/emacs/site-lisp/...
>Compiling /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
>geiser-v0.1/share/emacs/site-lisp/ac-geiser-v0.1-autoloads.el...
>Compiling /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
>geiser-v0.1/share/emacs/site-lisp/ac-geiser.el...
>Cannot open load file: No such file or directory, geiser
>command "/gnu/store/wmn02s4a2l5l5zaiv9lwahh808pdlpn4-emacs-
> minimal-
>26.3/bin/emacs" "--quick" "--batch" "--eval=(progn (setq byte-
>compile-debug t) (byte-recompile-directory (file-name-as-directory
>\"/gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-geiser-
>v0.1/share/emacs/site-lisp\") 0 1))" failed with status 255
> 
> See whole log in attached "emacs-ac-geiser-v0.1.drv.bz2" file
> 
> The same error occurs with :
> $ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-
> auto-
> complete
> 
> or even
> 
> $ guix environment --pure guix
> 
> 
> 
> To try from a different angle, I did it all over again with
> 
> $ ./pre-inst-env guix import elpa --archive=melpa-stable ac-geiser
> 
> I copied the resulted definition in "emacs-ac-geiser-imported.scm"
> 
> $ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-
> auto-
> complete
> 
> $ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser-
> imported.scm
> 
> Backtrace:
>   14 (apply-smob/1 #)
> In ice-9/boot-9.scm:
> 705:2 13 (call-with-prompt _ _ # handle?>)
> In ice-9/eval.scm:
> 619:8 12 (_ #(#(#)))
> In guix/ui.scm:
>   1824:12 11 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
> 829:9 10 (catch _ _ #
> ?)
> 829:9  9 (catch _ _ #
> ?)
> In guix/scripts/package.scm:
>951:10  8 (_)
> In guix/status.scm:
> 768:4  7 (call-with-status-report _ _)
> In guix/scripts/package.scm:
>959:14  6 (_)
> In guix/build/syscalls.scm:
>1145:4  5 (call-with-file-lock/no-wait _ _ _)
> In guix/scripts/package.scm:
>897:21  4 (_)
> 608:4  3 (options->installable ((install . #) ?)
> ?)
> In srfi/srfi-1.scm:
>697:23  2 (filter-map # .
> #)
> In guix/profiles.scm:
>316:24  1 (package->manifest-entry #
> ?)
> In emacs-ac-geiser-imported.scm:
>  24:6  0 (propagated-inputs # ?>)
> 
> emacs-ac-geiser-imported.scm:24:6: In procedure propagated-inputs:
> error: emacs-geiser: unbound variable
> 
> 
> Don't know what I can do more than the virtual env including emacs-
> geiser already...
> 
> Jérémy
> 

And the definitions... haha could help !
(define-module (emacs-ac-geiser)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix licenses)
  #:use-module (guix build-system emacs)
  #:use-module ((guix licenses) #:prefix license:))

(define-public emacs-ac-geiser
  (package
   (name "emacs-ac-geiser")
   (version "v0.1")
   (source (origin
	(method git-fetch)
	(uri (git-reference
		  (url "https://github.com/xiaohanyu/ac-geiser/;)
		  (commit version)))
	(file-name (git-file-name name version))
	(sha256
	 (base32
	  "02ifz25rq64z0ifxs52aqdz0iz4mi6xvj88hcn3aakkmsj749vvn"
   (build-system emacs-build-system)
   (home-page "https://github.com/xiaohanyu/ac-geiser/;)
   (synopsis "Emacs auto-complete backend for geiser.")
   (description
"This project is inspired by ac-slime and ac-nrepl, which makes Scheme programming in Emacs more enjoyable by providing a completion source for the popular Emacs interactive auto-completion framework auto-complete.

Where geiser provides it, pop-up documentation for completed symbols will be displayed.")
   (license license:bsd-3)))

emacs-ac-geiser
(define-module (emacs-ac-geiser)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix licenses)
  #:use-module (guix build-system emacs)
  

Re: Failed to connect to guix daemon socket in pure env

2020-02-19 Thread Jeremy Korwin-Zmijowski
Le jeudi 20 février 2020 à 01:17 +0100, zimoun a écrit :
> Hi Jeremy,
> 
> On Thu, 20 Feb 2020 at 00:33, Jeremy Korwin-Zmijowski
>  wrote:
> 
> > $ ./pre-inst-env guix package --install-from-file=emacs-ac-
> > geiser.scm
> > guix package: error: failed to connect to
> > `/usr/local/var/guix/daemon-
> > socket/socket': No such file or directory
> > 
> > Any idea ?
> 
> Is the daemon up?
> As root "systemctl start guix-daemon".
> 
> Does the simple "guix install foo" work for you?
> 
> And how have you installed Guix?
> 
> 
> Cheers,
> simon

Hey Simon!

Thank you it does help.

Now the process stucks here ("emacs-ac-geiser.scm" is my almost hand-
made definition):

$ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser.scm
[...]
View build log at
'/var/log/guix/drvs/9s/6pm5yamchw1b9ywl74lw8rbpgkyk7d-emacs-ac-geiser-
v0.1.drv.bz2'.
$ bzless /var/log/guix/drvs/9s/6pm5yamchw1b9ywl74lw8rbpgkyk7d-emacs-ac-
geiser-v0.1.drv.bz2

   [...]
   starting phase `build'
   Checking /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
   geiser-v0.1/share/emacs/site-lisp/...
   Compiling /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
   geiser-v0.1/share/emacs/site-lisp/ac-geiser-v0.1-autoloads.el...
   Compiling /gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-
   geiser-v0.1/share/emacs/site-lisp/ac-geiser.el...
   Cannot open load file: No such file or directory, geiser
   command "/gnu/store/wmn02s4a2l5l5zaiv9lwahh808pdlpn4-emacs-minimal-
   26.3/bin/emacs" "--quick" "--batch" "--eval=(progn (setq byte-
   compile-debug t) (byte-recompile-directory (file-name-as-directory
   \"/gnu/store/byvq8drq990mkl4v0yc1llg8r3jc8q3v-emacs-ac-geiser-
   v0.1/share/emacs/site-lisp\") 0 1))" failed with status 255

See whole log in attached "emacs-ac-geiser-v0.1.drv.bz2" file

The same error occurs with :
$ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-auto-
complete

or even

$ guix environment --pure guix



To try from a different angle, I did it all over again with

$ ./pre-inst-env guix import elpa --archive=melpa-stable ac-geiser

I copied the resulted definition in "emacs-ac-geiser-imported.scm"

$ guix environment --pure guix --ad-hoc emacs emacs-geiser emacs-auto-
complete

$ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser-
imported.scm

Backtrace:
  14 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 13 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 12 (_ #(#(#)))
In guix/ui.scm:
  1824:12 11 (run-guix-command _ . _)
In ice-9/boot-9.scm:
829:9 10 (catch _ _ #
?)
829:9  9 (catch _ _ #
?)
In guix/scripts/package.scm:
   951:10  8 (_)
In guix/status.scm:
768:4  7 (call-with-status-report _ _)
In guix/scripts/package.scm:
   959:14  6 (_)
In guix/build/syscalls.scm:
   1145:4  5 (call-with-file-lock/no-wait _ _ _)
In guix/scripts/package.scm:
   897:21  4 (_)
608:4  3 (options->installable ((install . #) ?)
?)
In srfi/srfi-1.scm:
   697:23  2 (filter-map # .
#)
In guix/profiles.scm:
   316:24  1 (package->manifest-entry #
?)
In emacs-ac-geiser-imported.scm:
 24:6  0 (propagated-inputs #)

emacs-ac-geiser-imported.scm:24:6: In procedure propagated-inputs:
error: emacs-geiser: unbound variable


Don't know what I can do more than the virtual env including emacs-
geiser already...

Jérémy



6pm5yamchw1b9ywl74lw8rbpgkyk7d-emacs-ac-geiser-v0.1.drv.bz2
Description: application/bzip


Re: Failed to connect to guix daemon socket in pure env

2020-02-19 Thread zimoun
Ah no, I missed the common mistake, I guess.

On Thu, 20 Feb 2020 at 00:33, Jeremy Korwin-Zmijowski
 wrote:

> $ ./configure

It is "./configure --localstatedir=/var"

Explained here [1] and there [2] or here [3].

[1] 
https://guix.gnu.org/manual/en/html_node/Building-from-Git.html#Building-from-Git
[2] https://guix.gnu.org/manual/en/html_node/The-Store.html#The-Store
[3] https://guix.gnu.org/manual/en/html_node/Requirements.html#Requirements

Does it help?


All the best,
simon



Re: Failed to connect to guix daemon socket in pure env

2020-02-19 Thread zimoun
Hi Jeremy,

On Thu, 20 Feb 2020 at 00:33, Jeremy Korwin-Zmijowski
 wrote:

> $ ./pre-inst-env guix package --install-from-file=emacs-ac-geiser.scm
> guix package: error: failed to connect to `/usr/local/var/guix/daemon-
> socket/socket': No such file or directory
>
> Any idea ?

Is the daemon up?
As root "systemctl start guix-daemon".

Does the simple "guix install foo" work for you?

And how have you installed Guix?


Cheers,
simon