Re: How to specify package to be installed from a specific channel

2020-12-17 Thread zimoun
Hi,

On Thu, 17 Dec 2020 at 19:21, Rohit Yadav  wrote:

> I added a new channel (https://github.com/guix-science/guix-science) to
> ~/.config/guix/channels.scm and did a guix pull. However, when I am trying
> to install a package from the new channel I am not able to install it.

What do you mean by “not able to install it”?


> guix pull lists the package defined in the additional channel. I am

You mean that “guix pull --news” had listed them, right?


> wondering if there is a way to specify the package from a specific
> channel

Do you mean that 2 packages belonging to the 2 channels have the same name?

All the best,
simon



Re: New “ungrafting” branch

2020-12-17 Thread zimoun
Hi Mark and Leo,

Thanks for the explanations.  All is clear.

All the best,
simon



How to specify package to be installed from a specific channel

2020-12-17 Thread Rohit Yadav
Hi,

I added a new channel (https://github.com/guix-science/guix-science) to
~/.config/guix/channels.scm and did a guix pull. However, when I am trying
to install a package from the new channel I am not able to install it.

guix pull lists the package defined in the additional channel. I am
wondering if there is a way to specify the package from a specific channel
defined in channels.scm. Here is my channels.scm

#+begin_src guile :tangle channels.scm
(cons
  ;; channel: guix-science
  (channel
(name 'guix-science)
(url "https://github.com/guix-science/guix-science.git;)
(introduction
  (make-channel-introduction
"b1fe5aaff3ab48e798a4cce02f0212bc91f423dc"
(openpgp-fingerprint "CA4F 8CF4 37D7 478F DA05  5FD4 4213 7701 1A37
8446"
  %default-channels)
#+end_src

Regards,
Rohit


Re: Help, and get help reviewing patches this Friday (18th)

2020-12-17 Thread Christopher Baines

Jack Hill  writes:

> On Thu, 17 Dec 2020, Christopher Baines wrote:
>
>> Hey,
>>
>> I mentioned in [1] that some "Scheduled and regular collaboration on IRC
>> to review patches" might help both get some patches reviewed, but help
>> get more people involved in reviewing patches, even if they haven't done
>> so before.
>>
>> 1: https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00583.html
>>
>> The suggestion came to do this on a Friday, and I have some time
>> tomorrow (Friday the 18th) that I can set aside to be on IRC and try and
>> help.
>
> Thanks, this sounds like a great initiative, and I'll try to drop
> by. I'm in North America though, so I might be a little tardy (despite
> how much fun the 4am Guix Day was!).

Great, and there's no such thing as being late in this case, well, apart
from me sending the email, it was already tomorrow in some places!

> On the topic of patch review, I was recently asked how I reviewed a
> proposed Go upgrade. I responded on the bug tracker [0]. I'd be
> interested in hearing critiques on the method I used. It might be nice
> to collect some recipes for reviewing different kinds of changes in
> the cookbook :)
>
> [0] https://issues.guix.gnu.org/45161#11

Yeah, this is stuff it would be neat to share. On my side, I've been
working on tooling (Guix Data Service, Guix Build Coordinator) to do a
similar thing (build packages that are affected by patches, and compare
the builds to identify breakages).

Thanks,

Chris


signature.asc
Description: PGP signature


Re: Help, and get help reviewing patches this Friday (18th)

2020-12-17 Thread Jack Hill

On Thu, 17 Dec 2020, Christopher Baines wrote:


Hey,

I mentioned in [1] that some "Scheduled and regular collaboration on IRC
to review patches" might help both get some patches reviewed, but help
get more people involved in reviewing patches, even if they haven't done
so before.

1: https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00583.html

The suggestion came to do this on a Friday, and I have some time
tomorrow (Friday the 18th) that I can set aside to be on IRC and try and
help.


Thanks, this sounds like a great initiative, and I'll try to drop by. I'm 
in North America though, so I might be a little tardy (despite how much 
fun the 4am Guix Day was!).


On the topic of patch review, I was recently asked how I reviewed a 
proposed Go upgrade. I responded on the bug tracker [0]. I'd be interested 
in hearing critiques on the method I used. It might be nice to collect 
some recipes for reviewing different kinds of changes in the cookbook :)


[0] https://issues.guix.gnu.org/45161#11

Best,
Jack



Help, and get help reviewing patches this Friday (18th)

2020-12-17 Thread Christopher Baines
Hey,

I mentioned in [1] that some "Scheduled and regular collaboration on IRC
to review patches" might help both get some patches reviewed, but help
get more people involved in reviewing patches, even if they haven't done
so before.

1: https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00583.html

The suggestion came to do this on a Friday, and I have some time
tomorrow (Friday the 18th) that I can set aside to be on IRC and try and
help.

To join in, connect to #guix on Freenode [2], and say "I'd like to
review some patches".

2: https://guix.gnu.org/en/contact/irc/

While normally you'd review patches other people have submitted, this is
also an opportunity to find someone to review patches that you've
submitted, or even to get guidance on reviewing your own patches.

Chris (cbaines on IRC)



signature.asc
Description: PGP signature


Re: Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread pinoaffe


Jan Nieuwenhuizen writes:
> My emacs-guix already has a file called guix-profiles.el; how do you
> handle that
oops, I think I'll rename this script then :)

> or how do I best look at / try your profiles?
I think the easiest way to try this is to source the guix-profiles file,
set the three "defcustom" variables, and to then run guix-enable-profile
or guix-disable-profile interactively.

> This looks interesting; I'm using M-x guix-set-emacs-environment a
> lot but my biggest problem/gripe with that is that it's global.
Yeah this is also global, as far as I can tell the only difference with
guix-set-emacs-environment seems to be that this allows enabling several
profiles at the same time and that this script maintains a list of which
profiles should be active. I think I'll take a look at how this could be
integrated into emacs-guix.

As to non-global things: I think a way to open a shell in emacs with a
specific set of packages available would be nice, but I'm not sure
whether it'd be better to wrap `guix environment` or to implement
something that starts a subprocess with the environment variables
corresponding to a (set of) profile(s). When implemented correctly, this
could also be applied through per-project profiles when combined with a
project manager such as projectile.

Blessings,
pinoaffe



Re: Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread Jan Nieuwenhuizen
pinoaffe writes:

Hello,

> I've attached the reusable stuff in guix-profiles.el, and my personal
> config in init-profiles.el.

> Any thoughts?

My emacs-guix already has a file called guix-profiles.el; how do you
handle that or how do I best look at / try your profiles?

This looks interesting; I'm using M-x guix-set-emacs-environment a
lot but my biggest problem/gripe with that is that it's global.

Janneke

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



Re: Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread zimoun
Hi,

On Thu, 17 Dec 2020 at 09:36, pinoaffe  wrote:

>> Aside, it is a bit redundant with Emacs-Guix, from my
>> understanding. :-)
> It might very well be, but I couldn't find a way to do what I wanted to
> do with emacs-guix

I guess the entrypoint is ’guix-set-emacs-environment’.  But I have not
looked into the details of your code, neither checked if the Emacs-Guix
is currently working as expected.



I understand though that the learning process is often easier by doing
by their own instead of adding or fixing the wanted feature with an
existing code base. :-)

All the best,
simon



Re: Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread pinoaffe


zimoun writes:
>
> Instead of call shell command and then…
>
> …parse the output, you should give a look at how Emacs-Guix does using
> the Scheme API.  Or maybe use “guix repl” as Nyxt does.
Thanks for the suggestion, I'll look into that

> Aside, it is a bit redundant with Emacs-Guix, from my
> understanding. :-)
It might very well be, but I couldn't find a way to do what I wanted to
do with emacs-guix

Blessing,
pinoaffe



Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread pinoaffe
Hi guix!

I wrote some elisp that
* maintains a list of available guix profiles
* maintains a list of active guix profiles
* allows the user to modify both of those lists
* provides interactive commands that allow the user to (de)activate profiles
* sets env variables and the emacs search path based on active profiles
I may add the ability to "update" a profile from a manifest.

This allows me to have a profile with, say, reverse engineering tools,
and to (de)activate it whenever I do(nt) need those tools.

Please not that I'm fairly new to all of this emacs stuff, so it may not
be idiomatic or good code.

I've attached the reusable stuff in guix-profiles.el, and my personal
config in init-profiles.el.

Any thoughts?

Blessings,
pinoaffe



guix-profiles.el
Description: application/emacs-lisp


init-profiles.el
Description: application/emacs-lisp


Re: Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread pinoaffe
Hi everybody, sorry for the repeated messages, something went wrong with
mu4e

On Thu, Dec 17, 2020 at 4:59 AM pinoaffe  wrote:

> Hi guix!
>
> I wrote some elisp that
> * maintains a list of available guix profiles
> * maintains a list of active guix profiles
> * allows the user to modify both of those lists
> * provides interactive commands that allow the user to (de)activate
> profiles
> * sets env variables and the emacs search path based on active profiles
> I may add the ability to "update" a profile from a manifest.
>
> This allows me to have a profile with, say, reverse engineering tools,
> and to (de)activate it whenever I do(nt) need those tools.
>
> Please not that I'm fairly new to all of this emacs stuff, so it may not
> be idiomatic or good code.
>
> I've attached the reusable stuff in guix-profiles.el, and my personal
> config in init-profiles.el.
>
> Any thoughts?
>
> Blessings,
> pinoaffe
>
>


Re: Some emacs stuff to activate/deactivate guix profiles

2020-12-17 Thread zimoun
Hi,

On Thu, 17 Dec 2020 at 05:59, pinoaffe  wrote:

> I've attached the reusable stuff in guix-profiles.el, and my personal
> config in init-profiles.el.

Thanks for sharing.

> (defun guix-profiles->environment-vars (profiles)
>   (shell-command-to-string
>(string-join (apply #'list
>"guix"
>"package"
>"--search-paths"

Instead of call shell command and then…

> (defun guix-path-file->key-value (str)
>   (mapcar (lambda (line)
>   (let* ((lst (split-string line "="))
>  (var (string-remove-prefix "export " (car lst)))
>  (val (string-trim (string-join (cdr lst) "=") "\"" 
> "\"")))
> (cons var val)))
>   (split-string (string-trim-right str "\n")
> "\n")))

…parse the output, you should give a look at how Emacs-Guix does using
the Scheme API.  Or maybe use “guix repl” as Nyxt does.


Aside, it is a bit redundant with Emacs-Guix, from my understanding. :-)

All the best,
simon