unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Reuleaux <rx@a-rx.info>
To: help-guix <help-guix@gnu.org>
Subject: Re: pulling from my personal channel only - is this possible ?
Date: Wed, 01 Sep 2021 20:44:47 +0100	[thread overview]
Message-ID: <87fsuot70w.fsf@softland> (raw)
In-Reply-To: 20210901185358.3445d42c@amethyst



raingloom <raingloom@riseup.net> writes:

> None that I'm aware of, but you don't need to push/pull to test
> anything. Just use the --load-path argument or the GUILE_LOAD_PATH
> environment variable. That way you can use a local checkout.



Well, OK, thanks:

I am experimenting, and apparently all three: guix pull, guix package, guix build
accept a --load-path parameter:

* If I call guix pull with --load-path... it still takes ~ 53s,
  and I wanted to do that only once per day, say -- ruling out this
  possibility

* Thus I am trying to use a --load-path w/ guix package -i,
  or guix package -u (instead of using my personal channel)
  but with not too much success yet, cf. below

* maybe I should use --load-path w/ guix build instead ?
  not sure, if this make sense in my case.

Setting the stage now: with my personal channel set up, I can
install a few haskell packages (not found in guix core yet):
as specified in my manifest file:
--8<---------------cut here---------------start------------->8---
guix package -m ~/cfg/stuff/manifest-hs.scm
--8<---------------cut here---------------end--------------->8---

with manifest-hs.scm:
--8<---------------cut here---------------start------------->8---
(specifications->manifest
  (list
   
   ;; "cabal-install"

   "ghc"
   
   ;; [channel]
   "ghc-filepattern"

   ;; [channel]
   "ghc-formatting"

   ;; [channel]
   "ghc-heaps"

   ;; [channel]
   "ghc-js-dgtable"

   ;; [channel]
   "ghc-map-syntax"

   ;; [channel]
   "ghc-quickcheck-text"

   ;; [channel]
   ;; "ghc-shake"

   ;; [channel]
   "ghc-string-interpolate"
      
   ))
--8<---------------cut here---------------end--------------->8---

[channel] comments therein indicate, that these packages are from my
channel (just as a reminder for me), for example "ghc-formatting" is
from my channel, whereas "ghc" is from guix core. -- "ghc-shake" used to
work for me before, but now has issues - unrelated to my question
though, thus commented out for now (and a good candidate maybe for
building with guix build -f ghc-shake.scm).


Those packages I get installed just fine
(and note in particular, that ghc-formatting is at v7.1.3 -
we will change that below):

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
git	                2.33.0	        out	/gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0
rx@dell ~$
--8<---------------cut here---------------end--------------->8---



Now I remove my .config/guix/channels.scm:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ rm ~/.config/guix/channels.scm 
--8<---------------cut here---------------end--------------->8---

pull again (just guix core this time):

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git	c75b30d
Computing Guix derivation for 'x86_64-linux'... -
--8<---------------cut here---------------end--------------->8---

and remove my packages:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -r ghc-string-interpolate ghc-quickcheck-text ghc-map-syntax ghc-js-dgtable ghc-heaps ghc-formatting ghc-filepattern 
The following packages will be removed:
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

hint: Consider setting the necessary environment variables by running:

     GUIX_PROFILE="/home/rx/.guix-profile"
     . "$GUIX_PROFILE/etc/profile"

Alternately, see `guix package --search-paths -p "/home/rx/.guix-profile"'.

rx@dell ~$ guix package -I
ghc	8.8.4	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
git	2.33.0	out	/gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0
rx@dell ~$
--8<---------------cut here---------------end--------------->8---



Now having my packages locally (as from a git clone for example - I am
developing them on another (debian) machine really - thus git comes in
handy to get them on my guix machine dell as well):

--8<---------------cut here---------------start------------->8---
rx@dell ~/tmp$ git clone http://git.a-rx.info/channel/
Cloning into 'channel'...
--8<---------------cut here---------------end--------------->8---


Now I try to install them w/ --load-path:

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package --load-path="/tmp/rx/channel" -m ~/cfg/stuff/manifest-hs.scm 
guix package: error: ghc-filepattern: unknown package
guix package: error: failed to load '/home/rx/cfg/stuff/manifest-hs.scm':
gnu/packages.scm:543:4: In procedure specification->package+output:
Throw to key `quit' with args `(1)'.
rx@dell ~$
--8<---------------cut here---------------end--------------->8---


Not too convincing :-( -

In reality (while developing), I would maybe keep my packages installed from my channel,

* and maybe just add another package (in my load-path)

* or update one of the packages in my load-path
  (so that it is newer there than on my channel)


Let's try that (with my ~/.config/guix/channels.scm as before):
guix pull (53s)


--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -m ~/cfg/stuff/manifest-hs.scm
The following packages will be installed:
   ghc                    8.8.4
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

rx@dell ~$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
rx@dell ~$ 
--8<---------------cut here---------------end--------------->8---

Fine: back to where we were before (starting point: ghc-formatting at v 7.1.3).

Now I make changes to my ghc-formatting package in ~/tmp/channel/
(keeping the original, and changing the version number to
7.1.4.2021-09-01 among other important changes to my package possibly):


--8<---------------cut here---------------start------------->8---
rx@dell ~/tmp/channel$ cp ghc-formatting.scm ghc-formatting.scm.orig
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
...
;; (version (string-append "v7.1.3" "." (string-take commit 7)))                                                                                    (version (string-append "v7.1.4" "." "2021-0901")))
...
--8<---------------cut here---------------end--------------->8---




For me 7.1.4 is a higher version number than 7.1.3.
And in any case: this is the most recent version, that I want
installed now:

And I commit my changes:

--8<---------------cut here---------------start------------->8---
rx@softland {master} ~/channel $ git add ghc-formatting.scm
rx@softland {master} ~/channel $ git commit -S -m "formatting updated"
[master 0e03c6a] formatting updated
 1 file changed, 4 insertions(+), 1 deletion(-)
rx@softland {master} ~/channel $
--8<---------------cut here---------------end--------------->8---

And move them to my guixsd machine dell...
( I could clone them, or just rsync them here).



Apparently 7.1.4 builds fine on dell (showing only the last bits of the output):

--8<---------------cut here---------------start------------->8---
guix build -f ghc-formatting.scm
...
starting phase `reset-gzip-timestamps'
phase `reset-gzip-timestamps' succeeded after 0.0 seconds
starting phase `compress-documentation'
phase `compress-documentation' succeeded after 0.0 seconds
successfully built /gnu/store/sq8x9xdhdf4mf2j2jjzyx1i0h9lpwd45-ghc-formatting-v7.1.4.2021-09-01.drv
/gnu/store/mrw7r0rpsk9l7yx6rdkgn9a88vl0lm8l-ghc-formatting-v7.1.4.2021-09-01
/gnu/store/95dmds84xvca9lbvc8f92hf2vqyfkpj0-ghc-formatting-v7.1.4.2021-09-01-static
--8<---------------cut here---------------end--------------->8---

Lets see if I can install / upgrade that with --load-path:



--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package --load-path="/tmp/rx/channel" -m ~/cfg/stuff/manifest-hs.scm
The following packages will be installed:
   ghc                    8.8.4
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

nothing to be done
rx@dell ~$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
rx@dell ~$
--8<---------------cut here---------------end--------------->8---

Nope, i.e. well thanks, but with ghc-formatting I am still at 7.1.3 !!   :-(

Upgrading maybe? (with and without my manifest file):

--8<---------------cut here---------------start------------->8---
rx@dell ~$ guix package -u --load-path="/tmp/rx/channel" 
guix package: warning: upgrade regexp '--load-path=/tmp/rx/channel' looks like a command-line option
guix package: warning: is this intended?
guix package: warning: nothing to do

rx@dell ~$ guix package -u --load-path="/tmp/rx/channel" -m ~/cfg/stuff/manifest-hs.scm
guix package: warning: upgrade regexp '--load-path=/tmp/rx/channel' looks like a command-line option
guix package: warning: is this intended?
The following packages will be installed:
   ghc                    8.8.4
   ghc-filepattern        0.1.2-849b579
   ghc-formatting         v7.1.3.849b579
   ghc-heaps              0.4-849b579
   ghc-js-dgtable         0.4-849b579
   ghc-map-syntax         0.3.02d857z
   ghc-quickcheck-text    0.3.1.1.849b579
   ghc-string-interpolate 0.3.1.1.849b579

nothing to be done
rx@dell ~$
--8<---------------cut here---------------end--------------->8---


Nope: still at 7.1.3    :-(


I COULD install it by hand, like so:


$ guix install $(guix build -f ghc-formatting.scm)
...


--8<---------------cut here---------------start------------->8---
rx@dell ~/channel$ guix package -I
ghc-string-interpolate	0.3.1.1.849b579	out	/gnu/store/g8rw5ppn3sdfayzfgrdq79xy3b0jkz58-ghc-string-interpolate-0.3.1.1.849b579
ghc-quickcheck-text 	0.3.1.1.849b579	out	/gnu/store/60wnvhmf4vjm23d85nxga4mxh2v5xhly-ghc-quickcheck-text-0.3.1.1.849b579
ghc-map-syntax      	0.3.02d857z    	out	/gnu/store/m3bawbfw6pqd9rrn6pwydi689dwbpjzc-ghc-map-syntax-0.3.02d857z
ghc-js-dgtable      	0.4-849b579    	out	/gnu/store/3g3nr1b0jl8syw52vq3dzqd0zfrq85m8-ghc-js-dgtable-0.4-849b579
ghc-heaps           	0.4-849b579    	out	/gnu/store/hp5d0dakjh17j92q7n1z656jhc3wbjhb-ghc-heaps-0.4-849b579
ghc-formatting      	v7.1.3.849b579 	out	/gnu/store/znblyzx2ki9fjx3a61m247ksgx6lc4vf-ghc-formatting-v7.1.3.849b579
ghc-filepattern     	0.1.2-849b579  	out	/gnu/store/jg1qyss1mms7iamplxkrbyicvc08n462-ghc-filepattern-0.1.2-849b579
ghc                 	8.8.4          	out	/gnu/store/0284m9ddms3w10zh1shgkimnjbidzy5j-ghc-8.8.4
ghc-formatting-v7.1.4.2021-09	01             	out	/gnu/store/mrw7r0rpsk9l7yx6rdkgn9a88vl0lm8l-ghc-formatting-v7.1.4.2021-09-01
ghc-formatting-v7.1.4.2021-09-01	static         	out	/gnu/store/95dmds84xvca9lbvc8f92hf2vqyfkpj0-ghc-formatting-v7.1.4.2021-09-01-static
--8<---------------cut here---------------end--------------->8---

(I don't know what this static is - sorry), but apparently: I got
v7.1.4 installed !! - fine.

Now I don't want to install EVERY SINGLE PACKAGE by hand! - I want some means to say:

Take all the packages as in this directory (--load-path ...) as the most
recent input (similar my use of a channel).

I.e. I was hoping that --load-path could come in as a replacement for my
channel (while developping) -- but apparently not for me yet. (Or is
there another possibility maybe, that I am not aware of)?

Thanks again.

  -A


  reply	other threads:[~2021-09-01 19:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 15:59 pulling from my personal channel only - is this possible ? Andreas Reuleaux
2021-09-01 16:53 ` raingloom
2021-09-01 19:44   ` Andreas Reuleaux [this message]
2021-09-01 21:57     ` raingloom
2021-09-01 22:16       ` Andreas Reuleaux
2021-09-01 21:16 ` Simon Streit
2021-09-01 21:43   ` Andreas Reuleaux
2021-09-01 23:26     ` Andreas Reuleaux
2021-09-02  8:33       ` Simon Streit
2021-09-01 22:15   ` Andreas Reuleaux
2021-09-02 11:29 ` zimoun
2021-09-02 11:43   ` Andreas Reuleaux
2021-09-02 20:06     ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsuot70w.fsf@softland \
    --to=rx@a-rx.info \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).