the perfect setup with geiser

2022-10-05 Thread jgart


Hi,

this doesn't work for me from the manual:

;; Assuming the Guix checkout is in ~/src/guix.
(with-eval-after-load 'geiser-guile
  (add-to-list 'geiser-guile-load-path "~/src/guix"))

After changing the patch to where my local guix checkout is at, I'm not
able to load guix code in an emacs buffer.


I have all the necessary packages installed via Guix

WDYT



help-guix@gnu.org

2022-10-05 Thread jgart
Hi,

what this the convention for when a function is called

 or  or  or  or 
 for example.

What does the & prefix mean?



How can I step through this code?

2022-10-05 Thread jgart
Hi

How can I step through this code?

(define-syntax do
  (syntax-rules ()
((do ((var init step ...) ...)
 (test expr ...)
 command ...)
 (letrec
   ((loop
 (lambda (var ...)
   (if test
   (begin
 (if #f #f)
 expr ...)
   (begin
 command
 ...
 (loop (do "step" var step ...)
   ...))
   (loop init ...)))
((do "step" x)
 x)
((do "step" x y)
 y)))




debugging %build-inputs

2022-10-05 Thread jgart
Hi,

How can I debug what %build-inputs is in the context of the package being built?

(arguments
 `(#:configure-flags
   (list (string-append "--with-tcl="
(assoc-ref %build-inputs "tcl")
"/lib")
 (string-append "--with-tk="
(assoc-ref %build-inputs "tk")
"/lib"


The above snippet is from gtkwave (e.g. guix edit gtkwave).

What I would like to do is drop into a debugger in the environment where I can 
print %build-inputs.

If I can't do it that way what is the Guiler way to achieve what I'm trying to 
do?

Any advice and enlightment would be much appreciated.

all best,

jgart



Re: bash scripts in Guix question

2022-10-05 Thread Olivier Dion via
On Wed, 05 Oct 2022, Maxim Cournoyer  wrote:
> Hi,
>
> Olivier Dion  writes:
>
> [...]
>
>>> I prefer the "#!/usr/bin/env bash" shebang; /usr/bin/env is available on
>>> FHS distribution, and on Guix System, for convenience.  You can use if
>>> for any interpreted script, such as Guile, Python, Perl, etc.
>>
>> Only if coreutils is in the profile that would work yes.
>
> coreutils doesn't need to be in the profile since /usr/bin/env is linked
> to (file-append coreutils "bin/env"); see in the value of %base-services
> in (gnu services base), which contains:
>
> --8<---cut here---start->8---
> (service special-files-service-type
>  `(("/bin/sh" ,(file-append bash "/bin/sh"))
>("/usr/bin/env" ,(file-append coreutils "/bin/env"
> --8<---cut here---end--->8---

Oh interesting I did not know that.  Thank you!

-- 
Olivier Dion
oldiob.dev



Re: bash scripts in Guix question

2022-10-05 Thread Maxim Cournoyer
Hi,

Olivier Dion  writes:

[...]

>> I prefer the "#!/usr/bin/env bash" shebang; /usr/bin/env is available on
>> FHS distribution, and on Guix System, for convenience.  You can use if
>> for any interpreted script, such as Guile, Python, Perl, etc.
>
> Only if coreutils is in the profile that would work yes.

coreutils doesn't need to be in the profile since /usr/bin/env is linked
to (file-append coreutils "bin/env"); see in the value of %base-services
in (gnu services base), which contains:

--8<---cut here---start->8---
(service special-files-service-type
 `(("/bin/sh" ,(file-append bash "/bin/sh"))
   ("/usr/bin/env" ,(file-append coreutils "/bin/env"
--8<---cut here---end--->8---
   

'env' looks up the command passed to it from PATH, but that's usually
satisfied if you were going to use a FHS location anyway such as
"/bin/bash".

-- 
Thanks,
Maxim



Wayland Functionality for Jami

2022-10-05 Thread Wamm K . D .
The Jami available in the repo.s, currently, causes an error about the
Wayland plugin for QT not being available.

While some app.s don't require this to be bundled with the app. –
apparently (I run into similar errors for Qutebrowser but installing
QTWayland fixes the issue) –, Jami does.

Building the package definition in the repo. exactly as is but with
QTWayland added as an additional ~input~ causes Jami to be able to be
used under Wayland perfectly.

So my question is, what would be the best means of updating this
package? Should QTWayland just get added to the ~inputs~, even for
users who aren't running Wayland? Or would it make sense to just
create a second Jami package definition (called =jami-wayland= or
something) that ~inherit~s the original Jami package and just adds
QTWayland to the ~inputs~? Or a third option?

attempted ca-certificates package

2022-10-05 Thread tyler parks
Hello,

I'm new to Guix (and Scheme) and trying to get ca-certificates working in
Guix System. I intend to use Guix System on an old PC for a router, with
Pi-Hole as the DNS server atop it, and ca-certificates is a dependency for
Pi-Hole. The makefile of ca-certificates appears to just copy a bunch of
bash scripts into a given installation directory. I've convinced the
makefile to install those scripts into  /gnu/store on a Guix System laptop,
but it seems none of them are appearing in the path; I get a "command not
found" error trying to test the update-ca-certificates script after
installing the package. Sourcing the Guix profile after installing the
package didn't help. I'd appreciate any insight into how to resolve the
"command not found" error.


This is the ca-certificates package I wrote:
(define ca-certificates
(package
(name "ca-certificates")
;no recent tagged releases, used latest master commit at time of writing
(version "2021.10.04")

; use opensuse version since debian version has no license
(home-page "https://github.com/openSUSE/ca-certificates;)

(synopsis "Utilities for system wide CA certificate installation")
(license license:gpl2)
(description "Utilities for system wide CA certificate
installation.\nupdate-ca-certificates
is intended to keep the certificate stores of
various components in sync with the system CA certificates.")
(source
(origin
(method git-fetch)
(uri (git-reference (url "https://github.com/openSUSE/ca-certificates;)
(commit "3efbea9d908d0ecf3678aeef8ade884c0c155175")))
(sha256 "0rw2b2jqlflx171mc9f4xzhj7zgxhacdyasjqsgnrj4iir97k07j")
))
(build-system gnu-build-system)
(arguments
`(
; change DESTDIR, so makefile does not need root to install
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
; makefile does not have these targets
(delete 'configure)
(delete 'check)
))
)
)
)


The tree of the installed /gnu/store directory looks like this:
/gnu/store/yp99k9yhmi3a1bvx5w994l6akxkxqcy5-ca-certificates-2021.10.04/
├── share
│   └── doc
│   └── ca-certificates-2021.10.04
│   └── COPYING
└── usr
├── lib
│   ├── ca-certificates
│   │   └── update.d
│   │   ├── 50java.run
│   │   ├── 70openssl.run
│   │   ├── 80etc_ssl.run
│   │   └── 99certbundle.run
│   └── systemd
│   └── system
│   ├── ca-certificates.path
│   └── ca-certificates.service
├── sbin
│   └── update-ca-certificates
└── share
└── man
└── man8
└── update-ca-certificates.8

This is the error I get trying to run update-ca-certificates on Guix System
after installing the ca-certificates package with `guix package -f`:
~$ update-ca-certificates
-bash: update-ca-certificates: command not found

V/R
Tyler Parks


Re: bash scripts in Guix question - suspend ?

2022-10-05 Thread Tobias Geerinckx-Rice
Hi jordi,

>I'm puzzled, as long as   'loginctl suspend' is working in the shell

But '~/.config/i3/i3exit loginctl suspend' isn't.

Judging by your original snippet, you've mashed two commands together: you 
meant either

  ~/.config/i3/i3exit suspend

or

  loginctl suspend

But nobody here can tell you for certain how to call your 'i3exit' script 
without knowing what's in it.

Aside: you seem to be writing a wrapper script to wrap a wrapper script to call 
a wrapper for writing to /proc.  Is that necessary?  It can make things hard to 
follow.


Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.