system reconfigure, Git error: the SSL certificate is invalid

2020-07-25 Thread Andreas Reuleaux
Hi,

In a slight variation of section 3.7 of the Guix Manual ("After System
Installation"), I regularly do 

  guix pull

as a regular user (rx in my case), and then (using rx's guix command),
as root:

# /home/rx/.config/guix/current/bin/guix system reconfigure /etc/config.scm

(i.e. instead of using sudo, as suggested in the manual)

This combo used to work fine for me for quite a while. Now, since a few days,
having done my 

  guix pull

step (as user rx), which still works fine for me (updates my guix system), I 
get an error when
trying the above reconfigure step:

root@pc ~# /home/rx/.config/guix/current/bin/guix system reconfigure 
/etc/config.scm
Backtrace:
In ice-9/boot-9.scm:
  1731:15 19 (with-exception-handler # …)
In guix/scripts/system.scm:
   1286:8 18 (_)
In guix/status.scm:
776:4 17 (call-with-status-report _ _)
In guix/scripts/system.scm:
   1125:4 16 (_)
In ice-9/boot-9.scm:
  1736:10 15 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   631:22 14 (thunk)
   1299:8 13 (call-with-build-handler # …)
  2025:24 12 (run-with-store # …)
In guix/scripts/system.scm:
  1145:15 11 (_ _)
783:4 10 (perform-action reconfigure #< kerne…> …)
In guix/scripts/system/reconfigure.scm:
323:2  9 (check-forward-update _)
In srfi/srfi-1.scm:
   691:23  8 (filter-map # . #)
In guix/scripts/system/reconfigure.scm:
   330:37  7 (_ #< name: guix url: "https://git.savannah.gn…>)
In guix/git.scm:
   329:29  6 (update-cached-checkout "https://git.savannah.gnu.org/…"; …)
In ice-9/boot-9.scm:
  1736:10  5 (with-exception-handler _ _ #:unwind? _ # _)
In git/clone.scm:
 46:8  4 (_ _ _ _)
In git/bindings.scm:
 77:2  3 (raise-git-error _)
In ice-9/boot-9.scm:
  1669:16  2 (raise-exception _ #:continuable? _)
  1669:16  1 (raise-exception _ #:continuable? _)
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Git error: the SSL certificate is invalid

root@pc ~#


I have no clue - and I am fairly new to guix, and yet have many thing to learn 
- so bear with me, please -
I would prefer to make my next guix steps, however, having a working / 
up-to-date system. 

Thanks in advance.
  -A



  




Re: system reconfigure, Git error: the SSL certificate is invalid

2020-07-27 Thread Andreas Reuleaux
To answer my own question (and for the record, or for anyone interested):

Doing "guix pull" as root, i.e. several cycles of

  # guix pull
  # guix system reconfigure /etc/config.scm
  # reboot

really, all of them as root, did update my system enough, to make my
usual cycle work again, i.e.

(as a regular user rx)
  $ guix pull 

and then (as root):
  # /home/rx/.config/guix/current/bin/guix system reconfigure /etc/config.scm

works again for me, now. 

Thus, section 3.7 of the Manual, which suggests to  
"guix pull" only ever as a regular user, seems a bit too over-optimistic to me.

I still don't know exactly, what was causing this issue, but fine
with me, if I update my system as root once in a while.

Thanks,
  -A



Andreas Reuleaux  writes:

> Hi,
>
> In a slight variation of section 3.7 of the Guix Manual ("After System
> Installation"), I regularly do 
>
>   guix pull
>
> as a regular user (rx in my case), and then (using rx's guix command),
> as root:
>
> # /home/rx/.config/guix/current/bin/guix system reconfigure /etc/config.scm
>
> (i.e. instead of using sudo, as suggested in the manual)
>
> This combo used to work fine for me for quite a while. Now, since a few days,
> having done my 
>
>   guix pull
>
> step (as user rx), which still works fine for me (updates my guix system), I 
> get an error when
> trying the above reconfigure step:
>
> root@pc ~# /home/rx/.config/guix/current/bin/guix system reconfigure 
> /etc/config.scm
> Backtrace:
> In ice-9/boot-9.scm:
>   1731:15 19 (with-exception-handler # …)
> In guix/scripts/system.scm:
>1286:8 18 (_)
> In guix/status.scm:
> 776:4 17 (call-with-status-report _ _)
> In guix/scripts/system.scm:
>1125:4 16 (_)
> In ice-9/boot-9.scm:
>   1736:10 15 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/store.scm:
>631:22 14 (thunk)
>1299:8 13 (call-with-build-handler # …)
>   2025:24 12 (run-with-store # …)
> In guix/scripts/system.scm:
>   1145:15 11 (_ _)
> 783:4 10 (perform-action reconfigure #< kerne…> …)
> In guix/scripts/system/reconfigure.scm:
> 323:2  9 (check-forward-update _)
> In srfi/srfi-1.scm:
>691:23  8 (filter-map # . #)
> In guix/scripts/system/reconfigure.scm:
>330:37  7 (_ #< name: guix url: "https://git.savannah.gn…>)
> In guix/git.scm:
>329:29  6 (update-cached-checkout "https://git.savannah.gnu.org/…"; …)
> In ice-9/boot-9.scm:
>   1736:10  5 (with-exception-handler _ _ #:unwind? _ # _)
> In git/clone.scm:
>  46:8  4 (_ _ _ _)
> In git/bindings.scm:
>  77:2  3 (raise-git-error _)
> In ice-9/boot-9.scm:
>   1669:16  2 (raise-exception _ #:continuable? _)
>   1669:16  1 (raise-exception _ #:continuable? _)
>   1669:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> Git error: the SSL certificate is invalid
>
> root@pc ~#
>
>
> I have no clue - and I am fairly new to guix, and yet have many thing to 
> learn - so bear with me, please -
> I would prefer to make my next guix steps, however, having a working / 
> up-to-date system. 
>
> Thanks in advance.
>   -A
>
>
>
>   




simple config with just startx not working for me

2021-08-21 Thread Andreas Reuleaux
I am fairly new to guix, thus bear with me please.

I want to start X on my system with startx - i.e. log into my system
just from a tty, and then start X by hand (and i3 will be my window
manager, I just have an .xsession file in my $HOME, where I start i3)
- I do not want any desktop-services / desktop-manager / graphical login manager
(this may seem old school - but has worked fine for me for years
under debian). 

I cannot really get this working though: I have xinit installed (with
startx therein, cf. my config below), but when I

  startx

on the command line, I get this:

xauth:  file /home/rx/.serverauth.1957 does not exist

xinit: unable to run server 
"/gnu/store/8v0sja48lmlx5j28hs2mci2rr7v8ilm5-xinit-1.4.1/bin/X": No such file 
or directory
Use the -- option, or make sure that 
/gnu/store/8v0sja48lmlx5j28hs2mci2rr7v8ilm5-xinit-1.4.1/bin is in your path and
that "/gnu/store/8v0sja48lmlx5j28hs2mci2rr7v8ilm5-xinit-1.4.1/bin/X" is a 
program or a link to the right type of server
for your display.  Possible server names include:

XorgCommon X server for most displays
XvfbVirtual frame buffer
Xfake   kdrive-based virtual frame buffer
Xnest   X server nested in a window on another X server
Xephyr  kdrive-based nested X server
XvncX server accessed over VNC's RFB protocol
XdmxDistributed Multi-head X server

xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2

Also, in the guix manual I find an "xorg-start-command" mentioned, but I don't
know how that is supposed to be used (or if I need it at all)? - thus
xorg-start-command is commented out below.

Thanks in advance.
  -A



(packages
(append

 (map specification->package
  '(
"xinit"

"i3-wm"

"python"
"rsync"
;; "python-hy"

;; ""

)
  )

 
 %base-packages))

  (services
(append
 (list

  (service openssh-service-type
   
   (openssh-configuration
;; (x11-forwarding? #t)

;; (permit-root-without-password)
(permit-root-login #t)

))

  (service dhcp-client-service-type)

  (set-xorg-configuration (xorg-configuration
   (keyboard-layout keyboard-layout)
   
   ))
  

  ;; (xorg-start-command )

  )


 %base-services)

) ;; services





Re: simple config with just startx not working for me

2021-08-21 Thread Andreas Reuleaux
OK, many thanks.

fine with sway - I wanted to switch to wayland some time anyway.

And I will give eglogind a try.

I did see another thread - after asking
my question on this list - by the way:


  https://www.mail-archive.com/help-guix@gnu.org/msg11407.html

  and the consensus seems to be that this has never been easy:

  https://www.mail-archive.com/help-guix@gnu.org/msg11418.html

  "It has never been simple on Guix System to use xinit / startx,..."


And I would really appreciate if some more care would be given to this:
as much as I like the core ideas of guix, things like these I find
discouraging / off putting - sorry to say this.


-A


Vagrant Cascadian  writes:

> On 2021-08-21, Andreas Reuleaux wrote:
>> I am fairly new to guix, thus bear with me please.
>
> Welcome!
>
>> I want to start X on my system with startx - i.e. log into my system
>> just from a tty, and then start X by hand (and i3 will be my window
>> manager, I just have an .xsession file in my $HOME, where I start i3)
>> - I do not want any desktop-services / desktop-manager / graphical login 
>> manager
>> (this may seem old school - but has worked fine for me for years
>> under debian). 
>>
>> I cannot really get this working though: I have xinit installed (with
>> startx therein, cf. my config below), but when I
>>
>>   startx
>>
>> on the command line, I get this:
>>
>> xauth:  file /home/rx/.serverauth.1957 does not exist
> ...
>
> I struggled with this for a bit and eventually gave up.  In theory, if
> you make enough executables setuid, you might be able to get startx to
> work properly (other distros such as Debian make startx work by
> installing various executables setuid).
>
> In the end, I switched using sway, which is very similar to i3 but uses
> wayland natively instead of X11 (though there are still X11
> compatibility layers). The main thing is you need to have elogind
> configured in your system, and then you can login and run "exec sway"
> and it "just works".
>
> So, not exactly a direct answer to your question, but maybe it is a
> workable alternative for you.
>
>
> live well,
>   vagrant



Re: simple config with just startx not working for me

2021-08-22 Thread Andreas Reuleaux
OK, thanks for that as well: I will have a look.

-A

宋文武  writes:

> Andreas Reuleaux  writes:
>
>> [...]
>> I want to start X on my system with startx - i.e. log into my system
>> just from a tty, and then start X by hand (and i3 will be my window
>> manager, I just have an .xsession file in my $HOME, where I start i3)
>
> Hello, you can use 'xorg-server-service-type' (not documented, patch
> welcome!)  with 'sx' (recommended) or 'xinit':
>
> 1. Add 'xorg-server-service-type' to the system config, and reconfigure.
>After this you'll have 'X' and 'Xorg' in '/run/current-system/profile/bin'.
>
> 2. Install 'sx' or 'xinit', config them:
>- For 'sx', create the ~/.config/sx/sxrc script, which likely ends
>with 'exec dbus-run-session -- i3' .
>- For 'xinit', create the ~/.xinitrc script and a ~/.xserverrc with:
>
>tty=$(tty)
>tty=${tty#/dev/tty}
>X vt${tty}
>
>  This xserverrc is needed for rootless X to start with the current tty.
>
> 3. Run 'sx' or 'xinit' from tty.  I think you also need to to be in the
>'video' and 'input' group for this to work.
>
> Hope it helps!



Re: simple config with just startx not working for me

2021-08-22 Thread Andreas Reuleaux
hi again,

sx is working fine for me now, thanks a lot again.

so far w/ i3 i.e. - I will want to replace that w/ sway (wayland) next.

-A


宋文武  writes:

> Andreas Reuleaux  writes:
>
>> [...]
>> I want to start X on my system with startx - i.e. log into my system
>> just from a tty, and then start X by hand (and i3 will be my window
>> manager, I just have an .xsession file in my $HOME, where I start i3)
>
> Hello, you can use 'xorg-server-service-type' (not documented, patch
> welcome!)  with 'sx' (recommended) or 'xinit':
>
> 1. Add 'xorg-server-service-type' to the system config, and reconfigure.
>After this you'll have 'X' and 'Xorg' in '/run/current-system/profile/bin'.
>
> 2. Install 'sx' or 'xinit', config them:
>- For 'sx', create the ~/.config/sx/sxrc script, which likely ends
>with 'exec dbus-run-session -- i3' .
>- For 'xinit', create the ~/.xinitrc script and a ~/.xserverrc with:
>
>tty=$(tty)
>tty=${tty#/dev/tty}
>X vt${tty}
>
>  This xserverrc is needed for rootless X to start with the current tty.
>
> 3. Run 'sx' or 'xinit' from tty.  I think you also need to to be in the
>'video' and 'input' group for this to work.
>
> Hope it helps!



emacs + straight.el

2021-08-22 Thread Andreas Reuleaux
OK, next question - I am progressing at least :-)

My emacs configuration is in terms of straight.el:

  https://github.com/raxod502/straight.el

this works by placing the following stanza in my ~/.emacs.d/init.el
(as explained on the straight.el website):


(defvar bootstrap-version)
(let ((bootstrap-file
   (expand-file-name "straight/repos/straight.el/bootstrap.el" 
user-emacs-directory))
  (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
 
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el";
 'silent 'inhibit-cookies)
  (goto-char (point-max))
  (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))





or similar: running my script myrun.el from the command line, which install 
some packages:
leaf, flycheck... as well.


:;exec /usr/bin/env emacs -batch -Q -l "$0" -f main "$@"


(require 'cl-lib)



(defun main ()
  (interactive)

  (cl-destructuring-bind
   (&optional fst snd) command-line-args-left
   

   (progn
 
 (message (concat "cmd line default dir: " command-line-default-directory))
 (message (concat "usr emacs dir: " user-emacs-directory))
 (message (concat "run w/ [user emacs dir] straight: "   
user-emacs-directory "straight"))

  
 (defvar bootstrap-version)
 (let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" 
user-emacs-directory))
   (bootstrap-version 5))
   (unless (file-exists-p bootstrap-file)
 (with-current-buffer
 (url-retrieve-synchronously
  
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el";
  'silent 'inhibit-cookies)
   (goto-char (point-max))
   (eval-print-last-sexp)))
   (load bootstrap-file nil 'nomessage))
 

 (straight-use-package 'leaf)
 (straight-use-package 'flycheck)
 (straight-use-package 'flycheck-haskell)
 

 

 )
   )
  )
--

In either case: these work fine for me under debian, but under guix I
get some nasty error message: Failed to run git...

I *do* have git installed with
  guix package -i git

and it lives in

  rx@dell ~$ type git
  git is /run/current-system/profile/bin/git

Has anyone been successful with this? Is there a way to specify the git
executable in straight.el - should I ask on the straight.el issue
tracker instead? Thanks in advance.

-A






rx@dell ~/st$ ./myrun.el
cmd line default dir: ~/st/
usr emacs dir: ~/.emacs.d/
require pkgs from [cmd line default dir]: ~/st/pkgs.el
run w/ [user emacs dir] straight: ~/.emacs.d/straight
Bootstrapping straight.el...
Debugger entered--Lisp error: (error "straight.el bootstrap failed: Failed to 
run \"git\";...")
  signal(error ("straight.el bootstrap failed: Failed to run \"git\";..."))
  error("straight.el bootstrap failed: %s" "Failed to run \"git\"; see buffer 
*straight-process*...")
  (if (= 0 (call-process (let ((emacs-binary-path (expand-file-name 
invocation-name invocation-directory)) (runemacs-binary-path (if 
(straight--windows-os-p) (progn ... (if (and runemacs-binary-path 
(file-exists-p runemacs-binary-path)) runemacs-binary-path emacs-binary-path)) 
nil '(t t) nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) 
nil (error "straight.el bootstrap failed: %s" (buffer-string)))
  (progn (if (= 0 (call-process (let ((emacs-binary-path (expand-file-name 
invocation-name invocation-directory)) (runemacs-binary-path (if ... ...))) (if 
(and runemacs-binary-path (file-exists-p runemacs-binary-path)) 
runemacs-binary-path emacs-binary-path)) nil '(t t) nil "--batch" 
"--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el 
bootstrap failed: %s" (buffer-string
  (unwind-protect (progn (if (= 0 (call-process (let ((emacs-binary-path ...) 
(runemacs-binary-path ...)) (if (and runemacs-binary-path ...) 
runemacs-binary-path emacs-binary-path)) nil '(t t) nil "--batch" 
"--no-window-system" "--quick" "--load" temp-file)) nil (error "straight.el 
bootstrap failed: %s" (buffer-string (and (buffer-name temp-buffer) 
(kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (= 0 
(call-process (let (... ...) (if ... runemacs-binary-path emacs-binary-path)) 
nil '(t t) nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) 
nil (error "straight.el bootstrap failed: %s" (buffer-string (and 
(buffer-name temp-buffer) (kill-buffer temp-buffer
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer 
(set-buffer temp-buffer) (unwind-protect (progn (if (= 0 (call-process (let ... 
...) nil '... nil "--batch" "--no-window-system" "--quick" "--load" temp-file)) 
nil (error "straight.el bootstrap failed: %s" (buffer-string (and 
(buffer-name temp-buffer

Re: simple config with just startx not working for me

2021-08-24 Thread Andreas Reuleaux
OK, thanks as well (for both of your messages).

I have X already running now from the commandline with sx
as suggested by 宋文武 

Thanks in any case.
-A


"Boris A. Dekshteyn"  writes:

> "Boris A. Dekshteyn"  writes:
>
>> Andreas Reuleaux  writes:
>>
>> Somewhere in you $PATH… startx witch:
>
> witch -> which, sorry for misspell.



70-yes-bitmaps.conf

2021-08-26 Thread Andreas Reuleaux
Hi,

I want bitmap fonts in X!

On my debian system this means:

--8<---cut here---start->8---
rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
--8<---cut here---end--->8---


Then I get to chose for example LucidaTypewriter as a font
in various applications (Firefox, Emacs) etc, and of course there
are other nice bitmap fonts too, and - old-school again: I often find them
clearer/easier to read than modern anti-aliased ones.

Now on my new guix system I try to do the same:

--8<---cut here---start->8---
cd .guix-profile/etc/fonts/conf.d/
ls -lh 69-unifont.conf
lrwxrwxrwx 2 root root 105 Jan  1  1970 69-unifont.conf -> 
/gnu/store/k6zs6zabhfybh6aphc4988wc2fsyk5hh-fontconfig-2.13.1/share/fontconfig/conf.avail/69-unifont.conf
--8<---cut here---end--->8---


and I don't want to type that
/gnu/store/k6zs6zabhfybh6aphc4988wc2fsyk5hh-fontconfig-2.13.1... thing,
thus dirname, and readlink to the rescue:


--8<---cut here---start->8---
echo $(dirname $(readlink -f 69-unifont.conf))
/gnu/store/k6zs6zabhfybh6aphc4988wc2fsyk5hh-fontconfig-2.13.1/share/fontconfig/conf.avail
echo $(dirname $(readlink -f 69-unifont.conf))/70-yes-bitmaps.conf
/gnu/store/k6zs6zabhfybh6aphc4988wc2fsyk5hh-fontconfig-2.13.1/share/fontconfig/conf.avail/70-yes-bitmaps.conf
--8<---cut here---end--->8---


but...

--8<---cut here---start->8---
ln -s $(dirname $(readlink -f 69-unifont.conf))/70-yes-bitmaps.conf .
ln: failed to create symbolic link './70-yes-bitmaps.conf': Read-only file 
system
--8<---cut here---end--->8---

on guix this is a read-only file system.  :-(

And the guix manual is not all too verbose about this in section 10.8.6
(X Window, p 254) - or at least: I haven't found the relevant section,
how set such a link / configuration.

Thanks in advance.
  -A



setting up my own channel (for some personal packages)

2021-08-28 Thread Andreas Reuleaux
Hi,

I am trying to set up my own channel for some personal packages,
and I do have some success to that end, but I am still experiencing
issues:


TL;dr - short summary:

  my package: emacs-hide-comnt.scm (below) breaks my setup for "guix pull"
  (which otherwise works just fine without that package)
  my package emacs-hide-comnt.scm cannot be too bad either:
  I can build+install it just fine by hand.
  


I am following the guix guide, and have stolen two packages from

--8<---cut here---start->8---
https://github.com/jsoo1/guix-channel
--8<---cut here---end--->8---

namely emacs-dump.scm (which provides my-emacs-dump), and
urweb.scm.

I have set up my own git repo (with just these two packages for now) at:


--8<---cut here---start->8---
http://git.a-rx.info/channel
--8<---cut here---end--->8---

and (with a git-url) in my ~/.config/guix/channels.scm:

--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff)


   (url "git://git.a-rx.info/channel")

   (introduction
(make-channel-introduction
 "56384c65b5d57606cd7ff3e2a4db1c99c24d7adf"
 (openpgp-fingerprint
  "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
 ))

   )
  %default-channels)
--8<---cut here---end--->8---


I can "guix pull" (I am using "--allow-downgrades" the first time here, as I 
have used
channel my-stuff with a different inital commit before), anyway this
works fine so far - guix pull does not complain about the my-stuff channel.

--8<---cut here---start->8---
rx@dell ~$ guix pull --allow-downgrades
Updating channel 'my-stuff' from Git repository at 
'git://git.a-rx.info/channel'...
guix pull: warning: moving channel 'my-stuff' from 
12ac4ab75c0b9dc247af3a65179c566e198d908d to unrelated commit 
56384c65b5d57606cd7ff3e2a4db1c99c24d7adf
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Building from these channels:
  guix  https://git.savannah.gnu.org/git/guix.git   63fec9f
  my-stuff  git://git.a-rx.info/channel 56384c6
Computing Guix derivation for 'x86_64-linux'... /
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/dsb3bcmddgsvn34wxh0g2mbm4lyq1haz-profile.drv
   /gnu/store/d227lqkghmg48b34b81si8hdmz3vba64-my-stuff.drv
   /gnu/store/mcp30c79gi9cdnckg4ghahkaygn85ykk-inferior-script.scm.drv
   /gnu/store/d84yrjgr6bkg7c6h9i0bxjz7cfxhisp2-profile.drv
   /gnu/store/vrr8flhvf06xprqm6n9q45pj10h7r10g-inferior-script.scm.drv

building /gnu/store/mcp30c79gi9cdnckg4ghahkaygn85ykk-inferior-script.scm.drv...
building /gnu/store/d227lqkghmg48b34b81si8hdmz3vba64-my-stuff.drv...
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building database for manual pages...
building profile with 2 packages...
building /gnu/store/vrr8flhvf06xprqm6n9q45pj10h7r10g-inferior-script.scm.drv...
building package cache...
building profile with 2 packages...
New in this revision:
  2 new packages: lsofgraph, urweb

rx@dell ~$ guix pull 
Updating channel 'my-stuff' from Git repository at 
'git://git.a-rx.info/channel'...
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Building from these channels:
  guix  https://git.savannah.gnu.org/git/guix.git   63fec9f
  my-stuff  git://git.a-rx.info/channel 56384c6
Computing Guix derivation for 'x86_64-linux'... /
nothing to be done

rx@dell ~$
--8<---cut here---end--->8---

and "urweb" is available, for example


--8<---cut here---start->8---
rx@dell ~$ guix package -A urwe
urweb   20190217out urweb.scm:15:2
rx@dell ~
--8<---cut here---end--->8---



Thus apparently my setup is not too bad (including my rx.key in the
keyring branch etc.).


Now I am setting up a second channel2 instead: again with the two packages
emacs-dump.scm and urweb.scm as above, but additionally an emacs package
that I have created myself: emacs-hide-comnt.scm

(Really this is just a prerequisite for another package that I am
interested in, and I have a package definition for as well:
emacs-thing-cmds.scm - but I keep that question for another mail):

Now with my ~/.config/guix/channels.scm for channel2:

--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff2)


   (url "git://git.a-rx.info/channel2")

   (introduction
(make-channel-introduction
 "3a64194919ceeb16ee03df17de2c3c612d410145"
 (openpgp-fing

Re: setting up my own channel (for some personal packages)

2021-08-28 Thread Andreas Reuleaux
Hi,

thanks a lot, and yes: that was it.

I had not really understood that w/

  (define-module (gnu packages emacs-hide-comnt)

my emacs-hide-comnt package was searched in gnu/packages,
but oh well: this makes sense after all, and I am learning.

I have received your reply only privatly so far (to my r...@a-rx.info
address), not from the mailing list - but I am Cc'ing there
nevertheless already.

Fixed in my http://git.a-rx.info/channel now (i.e. emacs-hide-comnt.scm
updated there).

I will add more packages there, as I progress.

In case anyone wants to try my configuration: I am kind of lazy:
creating new initial commits all to often (instead of pushing them).

thus the ~/.config/guix/channels.scm needs to be changed accordingly,
currently:



--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff)
   
   
   (url "git://git.a-rx.info/channel")

   (introduction
(make-channel-introduction
 "109737fce5bd8f8f709646d3e1b2f519a07e2f9d"
 (openpgp-fingerprint
  "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
 ))

   )
  %default-channels)
--8<---cut here---end--->8---


Many thanks again,

  -A
  



Edouard Klein  writes:

> Hi,
>
> I am not sure, but here is my try:
>
> I cloned your channel2 repo, and saw in emacs-hide-comnt.scm:
>
> (define-module (gnu packages emacs-hide-comnt)
>
> Modules names in Guile (in all schemes ?) must match the path, so either
> put emacs-hide-comnt.scm in gnu/packages, or change the above line to:
>
> (define-module (emacs-hide-comnt)
>
> See that urweb.scm starts with:
> (define-module (urweb)
>
> My interpretation is that the error message means that the
> emacs-hide-comnt module was not found where it was looked for, i.e. in
> gnu/packages.
>
> This may not be the only problem, but it is worth a try.
>
> Good luck :)
>
> Cheers,
>
> Edouard.
>
>
> Andreas Reuleaux  writes:
>
>> Hi,
>>
>> I am trying to set up my own channel for some personal packages,
>> and I do have some success to that end, but I am still experiencing
>> issues:
>>
>>
>> TL;dr - short summary:
>>
>>   my package: emacs-hide-comnt.scm (below) breaks my setup for "guix pull"
>>   (which otherwise works just fine without that package)
>>   my package emacs-hide-comnt.scm cannot be too bad either:
>>   I can build+install it just fine by hand.
>>   
>>
>>
>> I am following the guix guide, and have stolen two packages from
>>
>> --8<---cut here---start->8---
>> https://github.com/jsoo1/guix-channel
>> --8<---cut here---end--->8---
>>
>>
>> namely emacs-dump.scm (which provides my-emacs-dump), and
>> urweb.scm.
>>
>> I have set up my own git repo (with just these two packages for now) at:
>>
>> --8<---cut here---start->8---
>> http://git.a-rx.info/channel
>> --8<---cut here---end--->8---
>>
>>
>> and (with a git-url) in my ~/.config/guix/channels.scm:
>>
>> --8<---cut here---start->8---
>> (cons (channel
>>(name 'my-stuff)
>>
>>
>>(url "git://git.a-rx.info/channel")
>>
>>(introduction
>> (make-channel-introduction
>>   "56384c65b5d57606cd7ff3e2a4db1c99c24d7adf"
>>  (openpgp-fingerprint
>>   "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
>>  ))
>>
>>)
>>   %default-channels)
>> --8<---cut here---end--->8---
>>
>>
>>
>> I can "guix pull" (I am using "--allow-downgrades" the first time here, as I 
>> have used
>> channel my-stuff with a different inital commit before), anyway this
>> works fine so far - guix pull does not complain about the my-stuff channel.
>>
>> --8<---cut here---start->8---
>> rx@dell ~$ guix pull --allow-downgrades
>> Updating channel 'my-stuff' from Git repository at 
>> 'git://git.a-rx.info/channel'...
>> guix pull: warning: moving channel 'my-stuff' from 
>> 12ac4ab75c0b9dc247af3a65179c566e198d908d to unrelated commit 
>> 56384c65b5d57606cd7ff3e2a4db1c99c24d7adf
>> Updating channel 'guix' from 

guix on a debian system (with packages from experimental) - recommended day to day routine?

2021-08-29 Thread Andreas Reuleaux
Having started with guix only recently (with a standalone GuixSD
on a spare machine i.e.), I cannot immediatly switch to working
with guix only (as much as I would like to), as I have come to depend on
many things debian over the years.

Thus I am trying to tackle this from both ends:

(1) learn some more guix, create packages as I need them, and so on
(prepare for my move to guix some day i.e.).

(2) and I have now installed guix my main debian machine as well.

And I have used the packages from experimental to that end,
(on an otherwise bullseye=debian-testing machine), roughly like so:


/etc/apt/sources
--8<---cut here---start->8---
...
deb http://ftp.uk.debian.org/debian/ bullseye main
deb http://security.debian.org/debian-security bullseye-security main

deb http://ftp.uk.debian.org/debian/ unstable main
deb http://ftp.debian.org/debian experimental main
--8<---cut here---end--->8---


/etc/apt/preferences
--8<---cut here---start->8---
Package: *
Pin: release o=Debian a=testing
Pin-Priority: 500

Package: *
Pin: release a=unstable
Pin-Priority: 490

Package: *
Pin: release a=experimental
Pin-Priority: 480
--8<---cut here---end--->8---


and then:
--8<---cut here---start->8---
root@softland /etc/apt # apt-get -t experimental install guix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libc-devtools
  Use 'apt autoremove' to remove it.
  The following additional packages will be installed:
guile-2.2 guile-3.0-libs guile-bytestructures guile-gcrypt guile-git 
guile-gnutls guile-json
guile-lzlib guile-sqlite3 guile-ssh guile-zlib libc-bin libc-dev-bin 
libc-l10n libc6 libc6-dbg
libc6-dev libgcrypt20 libgcrypt20-dev libgit2-dev libgpg-error-dev 
libguile-ssh13 libhttp-parser-dev
liblz-dev liblz1 libmbedtls-dev libsqlite3-dev libssh-4 libssh-dev 
libssh2-1-dev libssl-dev libssl3
locales nscd rpcsvc-proto
  Suggested packages:
guile-2.2-doc glibc-doc rng-tools libgcrypt20-doc libmbedtls-doc 
sqlite3-doc libssh-doc libssl-doc
  Recommended packages:
libc-devtools
  The following NEW packages will be installed:
guile-2.2 guile-3.0-libs guile-bytestructures guile-gcrypt guile-git 
guile-gnutls guile-json
guile-lzlib guile-sqlite3 guile-ssh guile-zlib guix libgcrypt20-dev 
libgit2-dev libgpg-error-dev
libguile-ssh13 libhttp-parser-dev liblz-dev liblz1 libmbedtls-dev 
libsqlite3-dev libssh-4 libssh-dev
libssh2-1-dev libssl-dev libssl3 nscd rpcsvc-proto
The following packages will be upgraded:
libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev libgcrypt20 
locales
  8 upgraded, 28 newly installed, 0 to remove and 236 not upgraded.
  Need to get 74.0 MB/84.7 MB of archives.
  After this operation, 409 MB of additional disk space will be used.
  Do you want to continue? [Y/n]
--8<---cut here---end--->8---

And yes: I have continued here, and accepted all these new packages,
and the installation went smoothly for me.

If it was wise to do so, I don't know, and only time will tell:
I hope this will not break my system at some point later.

My idea was, to have an up to date guix system (1.3.0) on top of my
debian system as a starting point - without having to follow the manual steps
of a binary installation.

And according to /usr/share/doc/guix/README.Debian
  "installing the Debian package of guix is similar to installing guix on a 
foreign distro"

(Some minor differences are explained there as well: 
guix build group is _guixbuild and the users are named _guixbuilder[0-9] ...
-- OK, fine with me).


And now I am using guix on my debian system (I haven't taken exact
notes, what I did step by step), but after some

--8<---cut here---start->8---
git pull 
--8<---cut here---end--->8---

step I guess (as a normal/unpriviliged user: rx), I have now two guix
(and guix-daemon) binaries:

from my debian guix installation:
--8<---cut here---start->8---
/usr/bin/guix
/usr/bin/guix-daemon
--8<---cut here---end--->8---

and as installed/updated from guix itself:
--8<---cut here---start->8---
/home/rx/.config/guix/current/bin/guix
/home/rx/.config/guix/current/bin/guix-daemon
--8<---cut here---end--->8---

and likewise, if I install packages with guix, say fontconfig, then I have:

--8<---cut here---start->8---
/home/rx/.guix-profile/bin/fc-list
--8<---cut here---end--->8---
(among other fontconfig binaries)

in addtion to my debian-system fontc

pulling from my personal channel only - is this possible ?

2021-09-01 Thread Andreas Reuleaux
Hi,

for developing some personal packages, I have set up a personal channel
( http://git.a-rx.info/channel, resp: git://git.a-rx.info/channel ).

And I have asked about doing so here before: this is working fine for me
now.

While working on those packages, I often do a

--8<---cut here---start->8---
guix pull
--8<---cut here---end--->8---

and with my the accompanying:

~/.config/guix/channels.scm (as currently):
--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff)
   (url "git://git.a-rx.info/channel")
   (introduction
(make-channel-introduction
 "c1c4385a9f4e5a10ce294194ba687c58e5a785ec"
 (openpgp-fingerprint
  "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
 ))
   )
  %default-channels
  )
--8<---cut here---end--->8---

I get the latest packages, both:

* from the guix core (via %default-channels),
* and from my own packges (url as above)

This takes roughly 53s for me:

--8<---cut here---start->8---
rx@dell ~$ time guix pull
Updating channel 'my-stuff' from Git repository at 
'git://git.a-rx.info/channel'...
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Building from these channels:
  guix  https://git.savannah.gnu.org/git/guix.git   c75b30d
  my-stuff  git://git.a-rx.info/channel c1c4385
Computing Guix derivation for 'x86_64-linux'... -
nothing to be done


real0m52.708s
user1m7.016s
sys 0m0.584s
rx@dell ~$
--8<---cut here---end--->8---

It is nice to have up to date guix packages, but annoying nevertheless,
when developing my own package (making changes on my channel) - and it
would be enough for me to get new guix core packages only once per day,
say.

Thus I try to pull from my own channel only, with no success however:



--8<---cut here---start->8---
rx@dell ~$ guix pull --url="git://git.a-rx.info/channel"
Updating channel 'guix' from Git repository at 'git://git.a-rx.info/channel'...
guix pull: error: aborting update of channel 'guix' to commit 
c1c4385a9f4e5a10ce294194ba687c58e5a785ec, which is not a descendant of 
c75b30d58f0becb0a5cd6a8bfe69d1063b0d1ada
hint: This could indicate that the channel has been tampered with and is trying 
to force a roll-back, preventing you from getting the
latest updates.  If you think this is not the case, explicitly allow 
non-forward updates.
--8<---cut here---end--->8---


--8<---cut here---start->8---
rx@dell ~$ guix pull --url="git://git.a-rx.info/channel" --allow-downgrades
Updating channel 'guix' from Git repository at 'git://git.a-rx.info/channel'...
guix pull: warning: moving channel 'guix' from 
c75b30d58f0becb0a5cd6a8bfe69d1063b0d1ada to unrelated commit 
c1c4385a9f4e5a10ce294194ba687c58e5a785ec
guix pull: error: Git error: object not found - no match for id 
(9edb3f66fd807b096b48283debdcddccfea34bad)
--8<---cut here---end--->8---


When I try to comment out the %default-channels, i.e.
change my channels.scm to:

--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff)


   (url "git://git.a-rx.info/channel")

   (introduction
(make-channel-introduction
 "..."
 (openpgp-fingerprint
  "...")
 ))

   )
  ;; %default-channels
  '()
  )
--8<---cut here---end--->8---

then I get:

--8<---cut here---start->8---
rx@dell ~$ guix pull
Updating channel 'my-stuff' from Git repository at 
'git://git.a-rx.info/channel'...
Building from this channel:
  my-stuff  git://git.a-rx.info/channel c1c4385
/home/rx/.config/guix/channels.scm:3:6: error: 'guix' channel is lacking
hint: Make sure your list of channels contains one channel named `guix' 
providing the core of Guix.
--8<---cut here---end--->8---





Is there a way to pull from my own channel only (and otherwise use the
packages from guix core as pulled last time (as pulled in the morning
say, when pulling once per day)?


Is there an issue with my http/git urls maybe ? - I can git clone my channel 
with a http url as well:

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


but I cannot use that http git url for pulling in my channels file:

--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff)

   ;; (url "git://git.a-rx.info/channel")
   (url "http://git.a

Re: pulling from my personal channel only - is this possible ?

2021-09-01 Thread Andreas Reuleaux



raingloom  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-filepattern0.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-text0.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/g69aj4572bl

Re: pulling from my personal channel only - is this possible ?

2021-09-01 Thread Andreas Reuleaux
Simon,

well thanks as well, but sorry:

Neither do I understand this: it still has a guix core channel [?]: 


>  (channel
>   (name 'guix)
>   (url "https://git.savannah.gnu.org/git/guix.git";)
>   ;; (branch "master")
>  ...

(which I wanted to avoid - as it takes ~ 53s), nor does it work
for me (there may be issues with the finterprint/commit ids
I don't want to dig any deeper here):

--8<---cut here---start->8---
rx@dell ~/.config/guix$ guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: aborting update of channel 'guix' to commit 
a8dd285d5a0670abf124a721e6ba94da045b24ba, which is not a descendant of 
95c29d2746943733cbe8df7013854d45bb0df413
hint: Use `--allow-downgrades' to force this downgrade.

rx@dell ~/.config/guix$ guix pull --allow-downgrades
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
guix pull: warning: rolling back channel 'guix' from 
95c29d2746943733cbe8df7013854d45bb0df413 to 
a8dd285d5a0670abf124a721e6ba94da045b24ba
Updating channel 'hacks' from Git repository at 
'http://example.com/hacks.git'...
guix pull: error: Git error: unexpected http status code: 404
rx@dell ~/.config/guix$
--8<---cut here---end--->8---


I replying to the list, even thought I have received your mail only
privately.

Thanks in any case.
  -A


Simon Streit  writes:

> Hi Andreas,
>
> Andreas Reuleaux  writes:
>> While working on those packages, I often do a
>>
>> guix pull
>
> Hey, do you just want to pull, say, from your own channel, but not Guix'
> default?  This is something I just figured out a couple of days ago!
>
> One way, and this is only one possibility, is to modify your
> channels.scm in such a way that you directly pin your channels to the
> commit, or if necessary, a branch, and basically pull whatever you want
> to get your newest fix.
>
> This is how my channels.scm more or less looks like at the moment:
>
> (use-modules (guix ci))
> (list (channel-with-substitutes-available
>%default-guix-channel
>"https://ci.guix.gnu.org";))
> (list
>  (channel
>   (name 'guix)
>   (url "https://git.savannah.gnu.org/git/guix.git";)
>   ;; (branch "master")
>   (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
>   (introduction
>(make-channel-introduction
> "9edb3f66fd807b096b48283debdcddccfea34bad"
> (openpgp-fingerprint
>  "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"
>  (channel
>   (name 'hacks)
>   (url "http://example.com/hacks.git";)
>   (branch "master")
>   (commit "e3fd7d9e4aa541f63133c4678f316b5239364c34")))
>
> Be aware, that the downside is that anytime you want to go further, you
> have to comment things out again, or go back to the default definition. 
>
>
> Kind regards
> Simon



Re: pulling from my personal channel only - is this possible ?

2021-09-01 Thread Andreas Reuleaux
Hm - maybe I did not make myself clear [?]. Ideally I would have
something like this (I am exaggerating):

./channels.scm 
--8<---cut here---start->8---
(cons (channel
   (name 'my-stuff)
   (url "git://git.a-rx.info/channel")
   (introduction
(make-channel-introduction
 "..."
 (openpgp-fingerprint
  "...")
 ))

   )

  ;; tata !!
  
%default-channels-dont-bother-pulling-but-use-as-from-last-pull-and-already-on-my-computer
  )
--8<---cut here---end--->8---


I.e. while developing (and pulling from my own channel frequently):
don't spend 53s each time, and then - once in a while - pull from both channels.



Thanks,
  -A


Simon Streit  writes:

> Hi Andreas,
>
> Andreas Reuleaux  writes:
>> While working on those packages, I often do a
>>
>> guix pull
>
> Hey, do you just want to pull, say, from your own channel, but not Guix'
> default?  This is something I just figured out a couple of days ago!
>
> One way, and this is only one possibility, is to modify your
> channels.scm in such a way that you directly pin your channels to the
> commit, or if necessary, a branch, and basically pull whatever you want
> to get your newest fix.
>
> This is how my channels.scm more or less looks like at the moment:
>
> (use-modules (guix ci))
> (list (channel-with-substitutes-available
>%default-guix-channel
>"https://ci.guix.gnu.org";))
> (list
>  (channel
>   (name 'guix)
>   (url "https://git.savannah.gnu.org/git/guix.git";)
>   ;; (branch "master")
>   (commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
>   (introduction
>(make-channel-introduction
> "9edb3f66fd807b096b48283debdcddccfea34bad"
> (openpgp-fingerprint
>  "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"
>  (channel
>   (name 'hacks)
>   (url "http://example.com/hacks.git";)
>   (branch "master")
>   (commit "e3fd7d9e4aa541f63133c4678f316b5239364c34")))
>
> Be aware, that the downside is that anytime you want to go further, you
> have to comment things out again, or go back to the default definition. 
>
>
> Kind regards
> Simon



Re: pulling from my personal channel only - is this possible ?

2021-09-01 Thread Andreas Reuleaux
Thanks again, I will have a look (but not tonight any more).

-A


raingloom  writes:

> On Wed, 01 Sep 2021 20:44:47 +0100
> Andreas Reuleaux  wrote:
>
>> raingloom  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
>
> I don't think --load-path makes much sense for guix pull. Pretty sure
> that would only make sense if you were modifying the guix or gnu
> namespaces, or in other words, Guix itself.
>
>> * maybe I should use --load-path w/ guix build instead ?
>>   not sure, if this make sense in my case.
>
> It does, that is how you should be building packages. Either with
> --load-path or loading an expression from a file.
>
>> 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-heaps0.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.0out
>> /gnu/store/g69aj4572bllw73phbpxqbpgqb7s3zyl-git-2.33.0 rx@dell ~$
>> --8<---cut here---end--->8---
>> 
>> 
>> 
>> Now I remove my .config/guix/channels.sc

Re: pulling from my personal channel only - is this possible ?

2021-09-01 Thread Andreas Reuleaux
OK, once more: I am beginning to understand your idea:

you are fixing the guix core channel to a specific commit:
"9edb3f66fd807b096b48283debdcddccfea34bad" here, i.e. from
Saturday, Aug 28 2021

However when I use this (with my own channel):
with or without the channel-with-substitutes-available part
(here shorter: without):


--8<---cut here---start->8---
(list
  (channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git";)
;; (branch "master")
;; commit as of Sat Aug 28 2021
(commit "a8dd285d5a0670abf124a721e6ba94da045b24ba")
(introduction
 (make-channel-introduction
 "9edb3f66fd807b096b48283debdcddccfea34bad"
 (openpgp-fingerprint
 "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"
  (channel
(name 'my-stuff)
(url "git://git.a-rx.info/channel")
(introduction
 (make-channel-introduction
  "2526d032addf793521b9f717d411662db5166288"
  (openpgp-fingerprint
   "99BB E77D 73AE 07B9 D4B0  CA2E 3384 11E5 6E09 31B5")
  ))
)
  )
--8<---cut here---end--->8---

Then if I pull repeatedly: it always takes around 51s / 52s / 53s:


--8<---cut here---start->8---
rx@dell ~/.config/guix$ time guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Updating channel 'my-stuff' from Git repository at 
'git://git.a-rx.info/channel'...
Building from these channels:
  my-stuff  git://git.a-rx.info/channel 2526d03
  guix  https://git.savannah.gnu.org/git/guix.git   a8dd285
Computing Guix derivation for 'x86_64-linux'... /
nothing to be done


real0m51.820s
user1m7.150s
sys 0m0.528s
rx@dell ~/.config/guix$
--8<---cut here---end--->8---


--8<---cut here---start->8---
rx@dell ~/.config/guix$ time guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Updating channel 'my-stuff' from Git repository at 
'git://git.a-rx.info/channel'...
Building from these channels:
  my-stuff  git://git.a-rx.info/channel 2526d03
  guix  https://git.savannah.gnu.org/git/guix.git   a8dd285
Computing Guix derivation for 'x86_64-linux'... /
nothing to be done


real0m50.882s
user1m6.199s
sys 0m0.486s
rx@dell ~/.config/guix$
--8<---cut here---end--->8---

and so on.


Maybe it is not the pulling itself that is so expensive, but
"Computing the Guix derivation..." (that is part of the pull command as
well apparently) ?

Is it necessary to always have a complete Guix derivation built,
when I just want to update my system with some changes of my own?

Summary line: I guess I am beginning to understand your idea, but it practice it
does not make a difference, as each pull still takes more then 50sec.


Is there anyone else (pulling frequently) annoyed by these 53 sec
roughly each time ?


-Andreas




Andreas Reuleaux  writes:

> Simon,
>
> well thanks as well, but sorry:
>
> Neither do I understand this: it still has a guix core channel [?]: 
>
>
>>  (channel
>>   (name 'guix)
>>   (url "https://git.savannah.gnu.org/git/guix.git";)
>>   ;; (branch "master")
>>  ...
>
> (which I wanted to avoid - as it takes ~ 53s), nor does it work
> for me (there may be issues with the finterprint/commit ids
> I don't want to dig any deeper here):
>
> rx@dell ~/.config/guix$ guix pull
> Updating channel 'guix' from Git repository at 
> 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: error: aborting update of channel 'guix' to commit 
> a8dd285d5a0670abf124a721e6ba94da045b24ba, which is not a descendant of 
> 95c29d2746943733cbe8df7013854d45bb0df413
> hint: Use `--allow-downgrades' to force this downgrade.
>
> rx@dell ~/.config/guix$ guix pull --allow-downgrades
> Updating channel 'guix' from Git repository at 
> 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: warning: rolling back channel 'guix' from 
> 95c29d2746943733cbe8df7013854d45bb0df413 to 
> a8dd285d5a0670abf124a721e6ba94da045b24ba
> Updating channel 'hacks' from Git repository at 
> 'http://example.com/hacks.git'...
> guix pull: error: Git error: unexpected http status code: 404
> rx@dell ~/.config/guix$
>
>
> I replying to the list, even thought I have received your mail only
> privately.
>
> Thanks in any case.
>   -A
>
>
> Simon Streit  write

Re: pulling from my personal channel only - is this possible ?

2021-09-02 Thread Andreas Reuleaux
Hi,

yes, this does make sense, and many thanks for writing this down in
detail. - I will follow your steps (and develop my own routine).

And computers are getting faster after all (to some extent still): My
53sec for pulling were on an 4 core i5 (with 16G RAM) - this e-mail I am
writing on a 8 core i7 w/ 16G RAM as well - and I might want use it for
guix at some point (and that should accelerate things then).

All the best,
  -Andreas
  

zimoun  writes:

> Hi,
>
> For developing, my workflow looks like:
>
> 0  git clone http://git.a-rx.info/channel/ /tmp/channel
> 1  edit /tmp/channel/some-file.scm
> 2  guix build -L /tmp/channel ghc-filepatter
> 3  loop to 1 until I am satisfied
> 4  git -C /tmp/channel commit ...
>
> then it depends on my mood to have http://git.a-rx.info/channel/
> listed in my default channels file ~/.config/guix/channels.scm.  Well,
> when I am tired to type '-L path/to/channel' then I add it and I run:
>
>   guix pull
>
> which allows then to simply do
>
>   guix package -i ghc-filepattern -p path/to/profile
>
> Does it make sense?
>
> About "guix pull", yes it should appear slow.  But you cannot do more
> than wait... although the situation is mitigated by [1].  (Optimizing
> it is not as straightforward as it looks like at first because the
> bottleneck are at various stages. :-)  For instance,
> .)
>
> Have you seen 'channel-with-substitutes-available' [1]?
>
> 1: 
> 
>
> All the best,
> simon



Re: guix on a debian system (with packages from experimental) - recommended day to day routine?

2021-09-02 Thread Andreas Reuleaux
Well, thanks for answering this older question of mine as well. - I yet
have to study your answer in more detail (but not tonight any more).

-Andreas

zimoun  writes:

> Hi
>
> On Mon, 30 Aug 2021 at 01:58, Andreas Reuleaux  wrote:
>
>> Now, long story short: I wonder -- two things:
>>
>> (1) what good is the debian /usr/bin/guix at all for me? - and
>
> I am not sure to understand the question.
>
> In short, /usr/bin/guix is not useful for the user because the user uses
> ~/.config/guix/current/bin/guix instead.  However, the user uses the
> daemon which is /usr/bin/guix-daemon.  Except if you changed the SystemD
> configuration.
>
> When you run “guix pull” as a user, ~/.config/guix/current/bin/guix is
> updated but not the daemon which is running with root privileges.
>
> To update this daemon, you can run “guix pull” as root.  Note the daemon
> changes really barely.  You can also update the daemon with “apt upgrade
> guix” but I am not sure Guix is often updated.
>
>
>> (2) what daily routine is recommended for upgrading/reconfiguring my
>> whole guix system, with /usr/bin/guix perhaps - if any routine at all?
>>
>> Obviously, the
>> --8<---cut here---start->8---
>> sudo guix system reconfigure /etc/config.scm
>> --8<---cut here---end--->8---
>> step does not apply, as there is no /etc/config.scm now on my system
>> (it is running debian after all).
>
> I do not think it makes because it is Guix on foreign distro and not
> Guix System.
>
>> Should I try to do something similar nevertheless once in a while?
>> (and as what user: my unprivileged rx, or as root)?
>
> Well, running Guix on Debian (installed via the script), I do:
>
>   $ guix pull
>
> once a week or more often, then
>
>   $ guix package -u
>
> when I am in good mood. :-)  Every good Moon phase, I do as root:
>
>   # guix pull
>   # systemctl restart guix-daemon.service 
>
> Aside, I recommend you to read:
>
> <https://guix.gnu.org/cookbook/en/guix-cookbook.html#Advanced-package-management>
>
> Other said, my default profile ~/.guix-profile contains almost nothing.
> And I have several profiles living at ~/.config/guix/profiles/ which I
> update time to time.  Then I also have profiles living in the folder of
> my project’s directories.
>
> Also, I declare the packages a profile requires using a file
> manifest.scm then I store “guix describe -f channels” as channels.scm
> when I create the profiles. It allows to recreate elsewhere with:
>
>   guix time-machine -C channels -- package -m manifest.scm
>
>> Clear some cache maybe, etc.?
>
> Time to time, I run “guix gc” with various options.
>
>
> Hope that helps,
> simon



Re: Packaging Idris2

2022-08-20 Thread Andreas Reuleaux
Csepp  writes:

> Pierre-Henry Fröhring  writes:
>
>> Well, I went from a `guix shell --container' up to `make test' passing ;
>> assuming a `chez-scheme' backend (no `node' nor `racket'). It boils down
>> to a shell session looking like:
>>
>> ┌
>> │ $ cd ~/src/
>> │ $ git clone g...@github.com:idris-lang/Idris2.git
>> │ $ cd Idris2
>> │ $ ./build_idris
>> └
>> Listing 1: session
>>
>> I guess that an idea would be to « translate » this session into a Guix
>> Package. What's the best option here? To torture the `gnu-build-system'
>> until it accepts to build Idris2 or should I take the
>> `trivial-build-system' route?
>> Thank you.
>> ― PHF
>>
>> ┌
>> │ #! /usr/bin/env bash
>> │ set -euo pipefail
>> │ IFS=$'\n\t'
>> │ 
>> │ cat <<'EOF' >manifest.scm
>> │ (specifications->manifest
>> │  '("gcc@12.1.0"
>> │"chez-scheme"
>> │"gmp"
>> │"coreutils"
>> │"bash"
>> │"make"
>> │"findutils"
>> │"git"
>> │"diffutils"
>> │"glibc"
>> │"sed"
>> │"gawk"
>> │"binutils"))
>> │ EOF
>> │ 
>> │ cat <<'EOF' >build_idris_in_container
>> │ set -euo pipefail
>> │ IFS=$'\n\t'
>> │ 
>> │ echo 'Idris build configuration'
>> │ set -x
>> │ export PREFIX=/tmp/idris2
>> │ export SCHEME=chez-scheme
>> │ export CC=gcc
>> │ export INTERACTIVE=''
>> │ set +x
>> │ echo
>> │ 
>> │ echo 'PATHS configuration'
>> │ set -x
>> │ export LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib:$PREFIX/lib
>> │ export PATH=$PATH:$PREFIX/bin
>> │ set +x
>> │ echo
>> │ 
>> │ echo 'Bootstrap'
>> │ make bootstrap
>> │ echo
>> │ 
>> │ echo 'Install'
>> │ make install
>> │ echo
>> │ 
>> │ echo 'Self-host'
>> │ make clean
>> │ make all
>> │ make install
>> │ echo
>> │ 
>> │ echo 'Test'
>> │ make test
>> │ echo
>> │ 
>> │ echo 'Clean'
>> │ rm -v manifest.scm
>> │ rm -v build_idris_in_container
>> │ echo
>> │ EOF
>> │ 
>> │ guix shell -C -m manifest.scm -- bash ./build_idris_in_container
>> └
>> Listing 2: build_idris
>




> I'm pretty sure Lendvai Attila has a WIP package that was supposed to be
> submitted as a patch "soon", which was like a year ago.
>
> Anyways, there are definitely already Idris 2 patches floating around
> the mailing list so I'd prefer if discussion was moved there.
> I'm also interested in getting it packaged, but building it takes a lot
> of time.


Sorry for intercepting: It does *NOT* take that much time:

Just following the INSTALL instruction as in the package
idris2-0.5.1.tgz (unpacked as  Idris2-0.5.1 )
takes me 8 min + 25 sec roughly

(bootstrapping with racket in my case / chez scheme would do as well)


time make bootstrap-racket


real8m20.490s
user8m13.197s
sys 0m6.841s



time make install

real0m4.796s
user0m4.267s
sys 0m0.532s




> The Scheme bootstrap seed can be generated with Idris 1, true.  But
> compiling Idris 2 with Idris 1 takes such an ungodly amount of time and
> RAM that expecting people to do so is maybe not a great idea.  I
> certainly will not be working on that.  Last time I built it I needed at
> least 16 gigs of swap.  I have better use cases for my SSD.



Sorry this is wrong: Idris2 is *NOT* built from Idris1 any more:

You either build from an existing Idris2 (that means you had it successfully 
built/installed
at least once - and are by now experienced enough, to know what's going on in 
your
build chain), or - probably more relevant for the packaging here:

  You bootstrap it from scheme (chez or racket), as comes within the Idris2 
tarball
  (and built with Idris 2 itself: Idris2 -> Chez Scheme / Racket).


I am not that super familiar with Guix packaging (well have done some little 
bits before),
but at least I got Idris 2 installed and running (well I guess you have, too 
[?]).

But I may be able to step in with more detailed installation steps, if needed.

Thanks,
 -A




Re: Packaging Idris2

2022-08-21 Thread Andreas Reuleaux
"("  writes:

> Hi Andreas,
>
> On Sat Aug 20, 2022 at 11:01 PM BST, Andreas Reuleaux wrote:
>>   You bootstrap it from scheme (chez or racket), as comes within the Idris2 
>> tarball
>>   (and built with Idris 2 itself: Idris2 -> Chez Scheme / Racket).
>
> Since this Scheme is pregenerated, it cannot really count as source code. So
> we need to find a version of Idris2 that can still be built with Idris1, then
> try to build a later version with that Idris2, and keep going until we get to
> the latest version, like our rustc bootstrap process.
>
> -- (


OK, thanks for getting back to me, and I am learning...

Nevertheless: this sounds terribly complicated to me.

Why would I use a package manager then (the guix package manager i.e.) in the
first place, if I can install idris2 in just simple three steps:


step 1
download https://www.idris-lang.org/idris2-src/idris2-0.5.1.tgz
and unpack it.

step 2
adjust PREFIX in config.mk therein ($(HOME)/opt/idris2 in my case)
and set PATH, and LD_LIBRARY_PATH accordingly:

  export PATH=$PATH:$HOME/opt/idris2/bin
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/idris2/lib

step 3
(assuming racket is installed - as in my case):

  make bootstrap-racket
  make install


And In particular: there is no Idris1 involved.

(And by the way: the pregenerated scheme in there is not a binary,
it is readable scheme code after all - well not terribly readable,
but nevertheless).

What is won with the extra step of having an older Idris2 installed
first, that still compiles with Idris 1 - And then do what with that:
compile a newer Idris2 from that (that may still not be sufficiant
to compile the latest Idris2), ... Reproducibility ? - Certainly
not simplicity!

But apparently: you are more experienced in these packaging matters
then me.

So thanks - in any case.

And by the way: my bench marks were on a 8 core
Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
running Debian testing)


-A