help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-Guix Digest, Vol 88, Issue 4


From: Gary Johnson
Subject: Re: Help-Guix Digest, Vol 88, Issue 4
Date: Sun, 05 Mar 2023 20:35:25 -0500

Gottfried <gottfried@posteo.de> writes:

> thank you very much for sharing your Emacs manifest.
>
> I tried to do what you said.
>
> I created a manifest for Emacs only.
>
> After doing it, Guix asked me to set the PATH.
>
> I did it and after that this Emacs Manifest changed my general profile.
> It became my general profile.
> I couldn’t use my other programmes any more.
> So I had to do a rollback.
>
> 1. I don’t know what I did wrong.

You didn't do anything wrong. The command I provided will create the
next generation of your profile from the manifest file. Any packages not
included in the manifest will be missing from that generation. It sounds
like that's what happened in this case. If you want other packages
installed into your profile as well, you could add them to your manifest
file.

> 2. AFAIK to create a manifest is not yet a profile.
> I have to create a manifest and then to create a profile with it.
> Am I right?

Correct. A manifest is a file of Scheme code that lists the packages
which you would like to install into a profile (or environment).

(Well, technically the manifest is the Scheme object produced by that
code, but in practice we can think of the file as the manifest with
little loss of information.)

You can create a temporary environment which contains the packages in a
manifest with this command:

```
guix shell -m manifest.scm
```

To make this environment persistent, you have to create a profile like
so:

```
guix package -m manifest.scm
```

> 2. If so, after creating a manifest, which commands do I have to use to
> make it a separate profile?
>
> Probably to generate a manifest and make it a separate profile goes
> together, but I don’t know how to do it.

Note that `guix package` will create a new profile generation in your
user profile by default. To override this, you can specify a different
profile that you want the generation added to instead:

```
guix package -m manifest.scm -p $YOUR_NEW_PROFILE_DIR
```

One of the perhaps slightly odd things to remember with this command is
that $YOUR_NEW_PROFILE_DIR should repeat its final directory name twice.

Here's an example for creating a new emacs profile. In this setup, we
assume that you have the following directory structure in your home
directory:

~/
├── guix-manifests/
│   ├── emacs.scm
├── guix-profiles/
│   ├── emacs/

You would issue the following command to install a new profile
generation under the ~/guix-profiles/emacs/ directory, containing all
the packages defined in ~/guix-manifests/emacs.scm:

```
guix package -m ~/guix-manifests/emacs.scm -p ~/guix-profiles/emacs/emacs
```

To activate this profile (thereby making its contents available in your
shell environment), you would issue these commands:

```
GUIX_PROFILE="~/guix-profiles/emacs/emacs"
. "$GUIX_PROFILE"/etc/profile
export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
```

For ease of use, you should place this code in your ~/.bash_profile. In
this way, the profile will be activated at login time (for example,
through GDM) and will then be available in all of your shells as well as
any other programs that respect the environment variables you set (e.g.,
emacs).

Have fun and happy hacking!
  ~Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]