unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Re: How to run a program from an old generation?
       [not found] <mailman.81.1641574883.4865.help-guix@gnu.org>
@ 2022-01-08 14:02 ` Zelphir Kaltstahl
  0 siblings, 0 replies; 4+ messages in thread
From: Zelphir Kaltstahl @ 2022-01-08 14:02 UTC (permalink / raw)
  To: gyps; +Cc: help-guix

Hi Alex!

I'll describe a way, how I usually manage this. This might be a bad way. I don't
know. If anyone thinks, that I am doing it in an unnecessarily complicated way,
please tell me : )

You can use a channels.scm file, to refer to the commit, which your GNU Guix is
currently on as follows:

~~~~
guix describe --format=channels > channels.scm
~~~~

which results in something like:

~~~~
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (commit
          "893a31ec20f47b979c1be9fb8b942809228ba4c9")
        (introduction
          (make-channel-introduction
            "9edb3f66fd807b096b48283debdcddccfea34bad"
            (openpgp-fingerprint
              "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))
~~~~

Then you can specify the packages you need in some manifest.scm file, for example:

~~~~
(specifications->manifest
 '("guile"
   "guile-json"))
~~~~

Note, that you do not need to specify the versions in the manifest file, as the
are already clear/specified indirectly from the channel you have defined in
channels.scm. Then you can run the following command to get an environment with
the packages installed:

~~~~
guix time-machine \
     --channels="channels.scm" -- \
     environment \
     --manifest="manifest.scm"
~~~~

Now the question is, how you find the correct channel specification, for the GNU
Guix commit, which has the version of the package you need. There might be a
better way to search via command line or so, but I don't know it, or forgot it,
or it is still in development. Here is one way I know:

(1) Go to https://hpc.guix.info/browse <https://hpc.guix.info/browse>
(2) search for the package you need there and
(3) click the result which has the name of the package you are looking for. The
version should not matter yet.
(4) At the page loaded then, at the bottom, there should be a link "View package
version history.". Click that link.
(5) You should be seeing an overview of which versions were available on which
commit ranges. You need to look for the commit, which still has the package in
the version you need.
(6) Take that commit id.

Then you can for example run the following command:

~~~~
guix time-machine \
     --commit='7fb7384134d21e2d491e0d92a8d550fe3acaa682' -- \
     environment \
     --manifest="manifest.scm"
~~~~

If you need packages in versions, which do not have a shared/common commit id, I
am not sure how to handle it, but I am guessing, that you could put multiple
channels in a channels.scm file and run the time-machine command with that
channels.scm file.

(Can anyone confirm, that this is how it is done?)

I am also not sure, whether that could lead to any kind of conflicts between the
dependencies of specified packages.

I am not sure how to run guix time-machine with multiple commits. Have not tried
to do it yet.

After getting an environment with that commit id / revision, I am not sure how
to translate that back into a channels.scm file. The channels.scm file contains
the commit id, but it also contains another id, in (what follows is an example):

~~~~
(make-channel-introduction
  "9edb3f66fd807b096b48283debdcddccfea34bad"
  ...)
~~~~

which I am not sure what it is.

Can anyone explain how to get a channels.scm file from an environment or from a
commit id / revision?

Hope this helps and thanks!
Best regards,
Zelphir

On 1/7/22 6:01 PM, help-guix-request@gnu.org wrote:
> Dear all,
>
> I currently have an issue with nextcloud-client segfaulting in the
> current guix environment. Until this is fixed an option were to switch
> to the old generation where it still worked, start it and switch back to
> the current generation.  Is there an option to run a program in a
> specific generation without completely switching to it? I didn't found
> any so far.  I know that's a real hack but at least that way I could
> have my files synchronized without too much effort until the bug is
> fixed.
>
> Another question I have is: can I install version 3.1.3 of
> nextcloud-client in the current environment (without switching back to
> some old commit)? When I try to do so, I get
>
>> guix install: error: nextcloud-client: package not found for version 3.1.3
> because version 3.1.3 was replaced by 3.2.0.
>
> Cheers (and a happy new year!)
>
> Alex

-- 
repositories: https://notabug.org/ZelphirKaltstahl


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

* Re: How to run a program from an old generation?
  2022-01-06 10:29 Γυψ
  2022-01-06 11:18 ` Γυψ
@ 2022-01-07 18:11 ` Wiktor Żelazny
  1 sibling, 0 replies; 4+ messages in thread
From: Wiktor Żelazny @ 2022-01-07 18:11 UTC (permalink / raw)
  To: Γυψ; +Cc: help-guix

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

On Thu, Jan 06, 2022 at 11:29:09AM +0100, Γυψ wrote:

> Is there an option to run a program in a specific generation without
> completely switching to it?

Hi Alex,

How about combining time machine with profiles?:

   guix time-machine --channels=(...) -- package --manifest=(...) --profile=(...)

Then, you can load the generated profile.

Have a nice weekend,

WŻ

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

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

* Re: How to run a program from an old generation?
  2022-01-06 10:29 Γυψ
@ 2022-01-06 11:18 ` Γυψ
  2022-01-07 18:11 ` Wiktor Żelazny
  1 sibling, 0 replies; 4+ messages in thread
From: Γυψ @ 2022-01-06 11:18 UTC (permalink / raw)
  To: help-guix

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

The issue of nextcloud is a known issue in version 3.2 and seems to be
resolved in 3.3. A workaround (removing cache, etc.) can be found here

https://github.com/NixOS/nixpkgs/issues/119029
https://github.com/NixOS/nixpkgs/issues/121594

The more general questions below might still be interesting.

Cheers,
Alex


On Thu, Jan 06 2022, 11:29:09, Γυψ <gyps@member.fsf.org> wrote:

> Dear all,
>
> I currently have an issue with nextcloud-client segfaulting in the
> current guix environment. Until this is fixed an option were to switch
> to the old generation where it still worked, start it and switch back to
> the current generation.  Is there an option to run a program in a
> specific generation without completely switching to it? I didn't found
> any so far.  I know that's a real hack but at least that way I could
> have my files synchronized without too much effort until the bug is
> fixed.
>
> Another question I have is: can I install version 3.1.3 of
> nextcloud-client in the current environment (without switching back to
> some old commit)? When I try to do so, I get
>
>> guix install: error: nextcloud-client: package not found for version 3.1.3
>
> because version 3.1.3 was replaced by 3.2.0.
>
> Cheers (and a happy new year!)
>
> Alex


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

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

* How to run a program from an old generation?
@ 2022-01-06 10:29 Γυψ
  2022-01-06 11:18 ` Γυψ
  2022-01-07 18:11 ` Wiktor Żelazny
  0 siblings, 2 replies; 4+ messages in thread
From: Γυψ @ 2022-01-06 10:29 UTC (permalink / raw)
  To: help-guix

Dear all,

I currently have an issue with nextcloud-client segfaulting in the
current guix environment. Until this is fixed an option were to switch
to the old generation where it still worked, start it and switch back to
the current generation.  Is there an option to run a program in a
specific generation without completely switching to it? I didn't found
any so far.  I know that's a real hack but at least that way I could
have my files synchronized without too much effort until the bug is
fixed.

Another question I have is: can I install version 3.1.3 of
nextcloud-client in the current environment (without switching back to
some old commit)? When I try to do so, I get

> guix install: error: nextcloud-client: package not found for version 3.1.3

because version 3.1.3 was replaced by 3.2.0.

Cheers (and a happy new year!)

Alex


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

end of thread, other threads:[~2022-01-08 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.81.1641574883.4865.help-guix@gnu.org>
2022-01-08 14:02 ` How to run a program from an old generation? Zelphir Kaltstahl
2022-01-06 10:29 Γυψ
2022-01-06 11:18 ` Γυψ
2022-01-07 18:11 ` Wiktor Żelazny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).