Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Oleg,


Quoting Oleg Pykhalov (2024-01-15 18:13:13)
> Tanguy LE CARROUR  writes:
> > `mcron` can then find `notmuch`, but `notmuch` has some hooks that depend
> > on other commands; `mbsync` and `afew` in my case. For this, I cannot really
> > provide the full path? 🤔 … actually, I could, but then it would be
> > `/home/USER/.guix-home/profile/bin/mbsync`, not the actual path.
> 
> Is the hook a script?  If it is, then the script should have the PATH,
> which can be added to the script itself.

Yes, indeed. Notmuch uses hooks scripts that I provide.
So far, I was relying on `home-xdg-configuration-files-service-type`
to copy them.

```scheme
(service home-xdg-configuration-files-service-type
  `(("notmuch/default/hooks" ,(local-file "tanguy.home/notmuch_hooks" 
#:recursive? #t))
; […]
  ))
```

Now I have to find an easy way to substitute some content in them.
I'll give it a try with `find-files` and `substitute` unless you can
suggest a better way… 🤞


> > This should work, but I can help be find it a bit weird, because it
> > propagates to quite a number of files. 😞
> > And the same goes for `vdirsyncer` that relies on `pass`…
> 
> Is ‘vdirsyncer’ relies on the ‘pass’ by default, or is your
> configuration specific thing?
>
> ‘vdirsyncer’ package recipe should be modified in the first case, to
> make it work for everyone.
> 
> In case of specific configuration a wrapper can be used.

Configuration specific! Fortunately I have a not-yet-submitted home
service for that. So I can easily insert the absolute path! 🥳

Regards,

-- 
Tanguy



Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Nils,


Quoting Nils Landt (2024-01-15 19:11:25)
> 
> > Tanguy LE CARROUR  hat am 15.01.2024 13:30 CET 
> > geschrieben:
> > > If I'm correct, setting the PATH environment variable in the mcron job
> > > should fix it.
> > 
> > You mean inside the `#~(job …)`? Sorry, but… how would you do that? 😅
> 
> Haven't tried it, but something like:
> 
> #~(job '(next-minute (range 0 60 5)) (string-append #$bash " -c 
> \"PATH=$HOME/.guix-home/profile/bin " #$notmuch "/bin/notmuch new\""))

Thanks. I'll give it a try. But based on Oleg's answer, I might go with
modifying all my config files to substitute absolute paths…

Regards,

-- 
Tanguy



Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Nils Landt


> Tanguy LE CARROUR  hat am 15.01.2024 13:30 CET 
> geschrieben:
> > If I'm correct, setting the PATH environment variable in the mcron job
> > should fix it.
> 
> You mean inside the `#~(job …)`? Sorry, but… how would you do that? 😅

Haven't tried it, but something like:

#~(job '(next-minute (range 0 60 5)) (string-append #$bash " -c 
\"PATH=$HOME/.guix-home/profile/bin " #$notmuch "/bin/notmuch new\""))

> And this means that I would have to do it for every single job? 🤔

Yes.

> Sounds suboptimal to me.

Agreed! Alternatively, you could install the dependent packages (like pass) in 
guix system, not guix home.

> So I would definitively favour a solution where the PATH is set once and
> for all by Mcron.

I'm pretty sure this does not exist for mcron.



Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Oleg Pykhalov
Tanguy LE CARROUR  writes:

> Quoting Oleg Pykhalov (2024-01-15 16:25:27)
>> The Home service matches Guix System in this case, so currently
>> specification of a full path to a binary is required.
>> 
>> It's possible to do in several ways:
>> 
>> 1) Use full path to the binary with ungexp, e.g.
>> 
>> preferred and cleaner:
>> 
>> #$(file-append notmuch "/bin/notmuch")
>> 
>> or:
>> (string-append #$notmuch "/bin/notmuch")
>> 
>> Hint: make sure notmuch is defined, e.g. at the top of a file:
>> 
>> (use-modules (gnu packages mail))
>
> I tried this one! 😁
> The `string-append` version I mean.
>
> `mcron` can then find `notmuch`, but `notmuch` has some hooks that depend
> on other commands; `mbsync` and `afew` in my case. For this, I cannot really
> provide the full path? 🤔 … actually, I could, but then it would be
> `/home/USER/.guix-home/profile/bin/mbsync`, not the actual path.

Is the hook a script?  If it is, then the script should have the PATH,
which can be added to the script itself.

> This should work, but I can help be find it a bit weird, because it
> propagates to quite a number of files. 😞
> And the same goes for `vdirsyncer` that relies on `pass`…

Is ‘vdirsyncer’ relies on the ‘pass’ by default, or is your
configuration specific thing?

‘vdirsyncer’ package recipe should be modified in the first case, to
make it work for everyone.

In case of specific configuration a wrapper can be used.


Oleg.


signature.asc
Description: PGP signature


Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Oleg,

Quoting Oleg Pykhalov (2024-01-15 16:25:27)
> The Home service matches Guix System in this case, so currently
> specification of a full path to a binary is required.
> 
> It's possible to do in several ways:
> 
> 1) Use full path to the binary with ungexp, e.g.
> 
> preferred and cleaner:
> 
> #$(file-append notmuch "/bin/notmuch")
> 
> or:
> (string-append #$notmuch "/bin/notmuch")
> 
> Hint: make sure notmuch is defined, e.g. at the top of a file:
> 
> (use-modules (gnu packages mail))

I tried this one! 😁
The `string-append` version I mean.

`mcron` can then find `notmuch`, but `notmuch` has some hooks that depend
on other commands; `mbsync` and `afew` in my case. For this, I cannot really
provide the full path? 🤔 … actually, I could, but then it would be
`/home/USER/.guix-home/profile/bin/mbsync`, not the actual path.

This should work, but I can help be find it a bit weird, because it
propagates to quite a number of files. 😞
And the same goes for `vdirsyncer` that relies on `pass`…

Oh, actually, I've just figured out that this doesn't actually work,
because my `USER` is not the same on all my computers! 😱
And I cannot rely on `$HOME` because it's not supported by all the
configuration files that are affected.

So I would definitively favour a solution where the PATH is set once and
for all by Mcron.

Regards,

-- 
Tanguy



How to effectively ask for help with Guix? Date: Wed, 03 Jan 2024 04:07:35 +0000

2024-01-15 Thread Gottfried
 Hi Ben,

I installed GNU Guix approx. 2 years ago.

I didn't know almost anything.

The help of Guixers was awesome, even my little knowledge of English
didn't stop it.

 They helped me so much, that I was astonished about their endeavour.

I managed, only through Guixers, to get my system running and even to
manage several profiles in which I have installed my
programmes/packages. 

I have got now everything I wanted for the time being and am very
thankful.

Guix - like a family, people care about each other.

So be patient because there is a lot of work to be done

and too few people to take this heavy load (I guess).

Gottfried 


Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Oleg Pykhalov
Tanguy LE CARROUR  writes:

> If I'm correct, setting the PATH environment variable in the mcron job
> should fix it.
>
> You mean inside the `#~(job …)`? Sorry, but… how would you do that? 😅
> And this means that I would have to do it for every single job? 🤔
> Sounds suboptimal to me.



> Quoting Tanguy LE CARROUR (2024-01-15 13:30:35)
>> Quoting Nils Landt (2024-01-15 13:03:06)
>> > > Tanguy LE CARROUR  hat am 15.01.2024 10:38 CET
>> > > geschrieben:
>> > > […]
>> > > `mbsync` is in my profile, but Mcron cannot find it.
>> > > Do I have to declare all the required packages… somehow?! 🤔
>> > 
>> > That sounds like it's related to this issue I reported:
>> > https://issues.guix.gnu.org/65471
>> 
>> It looks like, indeed!
>
> Actually, there's a "small" difference: I'm not using Debian, but… Guix
> System! 🤔

The Home service matches Guix System in this case, so currently
specification of a full path to a binary is required.

It's possible to do in several ways:

1) Use full path to the binary with ungexp, e.g.

preferred and cleaner:

#$(file-append notmuch "/bin/notmuch")

or:
(string-append #$notmuch "/bin/notmuch")

Hint: make sure notmuch is defined, e.g. at the top of a file:

(use-modules (gnu packages mail))


2) Symlink resolving in a Guix profile, e.g.:

"/home/user123/.guix-profile/bin/notmuch"

or

(readlink "/home/user123/.guix-profile/bin/notmuch")


I would recommend for 1) because of reproducibility and easier to track
in future, especially if you have a lot of self managed services.


Oleg.


signature.asc
Description: PGP signature


Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Quoting Tanguy LE CARROUR (2024-01-15 13:30:35)
> Quoting Nils Landt (2024-01-15 13:03:06)
> > > Tanguy LE CARROUR  hat am 15.01.2024 10:38 CET 
> > > geschrieben:
> > > […]
> > > `mbsync` is in my profile, but Mcron cannot find it.
> > > Do I have to declare all the required packages… somehow?! 🤔
> > 
> > That sounds like it's related to this issue I reported:
> > https://issues.guix.gnu.org/65471
> 
> It looks like, indeed!

Actually, there's a "small" difference: I'm not using Debian, but… Guix System! 
🤔

-- 
Tanguy



Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Hi Nils,

Quoting Nils Landt (2024-01-15 13:03:06)
> > Tanguy LE CARROUR  hat am 15.01.2024 10:38 CET 
> > geschrieben:
> >
> > ```scheme
> > (gnu packages dav)  ; vdirsyncer
> > (gnu packages mail)  ; notmuch
> > ; […]
> > (service home-mcron-service-type
> > (home-mcron-configuration
> >  (jobs (list
> >  #~(job '(next-minute (range 0 60 5)) (string-append 
> > #$notmuch "/bin/notmuch new"))
> >  #~(job '(next-hour) (string-append #$vdirsyncer 
> > "/bin/vdirsyncer sync"))
> > ```
> > 
> > And now Mcron finds `notmuch` (and `vdirsyncer`), but… Notmuch has hooks
> > that depend on other commands and I now have the following error message
> > in my logs:
> > 
> > ```
> > 2024-01-15 10:20:00 6198 /gnu/store/[…]-notmuch-0.37/bin/notmuch new: 
> > […]/.config/notmuch/default/hooks/pre-new: line 3: mbsync: command not found
> > ```
> > 
> > `mbsync` is in my profile, but Mcron cannot find it.
> > Do I have to declare all the required packages… somehow?! 🤔
> 
> That sounds like it's related to this issue I reported:
> https://issues.guix.gnu.org/65471

It looks like, indeed!


> If I'm correct, setting the PATH environment variable in the mcron job
> should fix it.

You mean inside the `#~(job …)`? Sorry, but… how would you do that? 😅
And this means that I would have to do it for every single job? 🤔
Sounds suboptimal to me.

I'll ping #65471 to see if a consensus has been reached. 🤞

-- 
Tanguy



Re: "Command not found" when using `home-mcron-service`

2024-01-15 Thread Nils Landt
> Tanguy LE CARROUR  hat am 15.01.2024 10:38 CET 
> geschrieben:
>
> ```scheme
> (gnu packages dav)  ; vdirsyncer
> (gnu packages mail)  ; notmuch
> ; […]
> (service home-mcron-service-type
> (home-mcron-configuration
>  (jobs (list
>  #~(job '(next-minute (range 0 60 5)) (string-append 
> #$notmuch "/bin/notmuch new"))
>  #~(job '(next-hour) (string-append #$vdirsyncer 
> "/bin/vdirsyncer sync"))
> ```
> 
> And now Mcron finds `notmuch` (and `vdirsyncer`), but… Notmuch has hooks
> that depend on other commands and I now have the following error message
> in my logs:
> 
> ```
> 2024-01-15 10:20:00 6198 /gnu/store/[…]-notmuch-0.37/bin/notmuch new: 
> […]/.config/notmuch/default/hooks/pre-new: line 3: mbsync: command not found
> ```
> 
> `mbsync` is in my profile, but Mcron cannot find it.
> Do I have to declare all the required packages… somehow?! 🤔

That sounds like it's related to this issue I reported: 
https://issues.guix.gnu.org/65471

If I'm correct, setting the PATH environment variable in the mcron job should 
fix it.



Re: Trouble mounting cifs share

2024-01-15 Thread Efraim Flashner
On Fri, Jan 12, 2024 at 12:55:11PM +0100, Simon Tournier wrote:
> Hi,
> 
> Sorry for the late reply.
> 
> On Thu, 30 Nov 2023 at 17:22, Franz Geffke  wrote:
> > I'm having trouble mounting cifs; Initially I thought it's a network issue 
> > of 
> > some sort, but it happens on a number of systems and I assume the Hetzner 
> > Storagebox is OK (as in, configured correctly):
> >
> > - 2x 6.6.2-gnu Guix: Failed
> > - 1x 6.1.0-13 Debian: Failed
> > - 1x 5.10.0-21 Debian: Success
> 
> Sorry for this naive question, these numbers are the version of package,
> right?

They look like kernel versions to me.

-- 
Efraim Flashner  רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: Cross-compilation arm-none-eabi

2024-01-15 Thread Ekaitz Zarraga

Hi

On 2024-01-15 11:20, Kristoffer Ström wrote:
>
> Hello!
>
> I'm trying to use `qmk` to build firmware for my keyboard, but i'm
> running into cross complilation issues that i have no idea where to
> start on.
>
> When running in a shell with `qmk` i get
>
> arm-none-eabi-gcc: command not found
>
> The only maybe related package i've been able to find is
> `raspi-arm-chainloader`, however this fails to build (it seems also in
> CI)
>
> 
https://data.guix.gnu.org/revision/45a6af1c18b254e2a5bb26c6bab465c3d4476a75/package/raspi-arm-chainloader/0.1?locale=en_US.UTF-8

>
> <- link to failing build on data.guix.gnu.org
>
> Am i missing something? How would i make the cross-compile gcc available
> in a shell environment?
>
> Thx, Kristoffer
>
Give a try to this in a `manifest.scm` file.

(use-modules (gnu packages embedded))
 (packages->manifest (list 
(make-arm-none-eabi-toolchain-7-2018-q2-update)))



Since some recent changes in guix we have to make-... the package for 
these cross-compilers.

I don't like it, but it has some reason behind.

Cheers,

PS: There are other problems with cross compilation I hope you don't get 
after this, if you do, please keep me posted and I'll try to help.




Cross-compilation arm-none-eabi

2024-01-15 Thread Kristoffer Ström


Hello!

I'm trying to use `qmk` to build firmware for my keyboard, but i'm
running into cross complilation issues that i have no idea where to
start on.

When running in a shell with `qmk` i get 

arm-none-eabi-gcc: command not found

The only maybe related package i've been able to find is
`raspi-arm-chainloader`, however this fails to build (it seems also in
CI)

https://data.guix.gnu.org/revision/45a6af1c18b254e2a5bb26c6bab465c3d4476a75/package/raspi-arm-chainloader/0.1?locale=en_US.UTF-8

<- link to failing build on data.guix.gnu.org

Am i missing something? How would i make the cross-compile gcc available
in a shell environment?

Thx, Kristoffer



"Command not found" when using `home-mcron-service`

2024-01-15 Thread Tanguy LE CARROUR
Dear Guix,

I had stop using `home-mcron-service` some times ago, for I had
a problem with my home shepherd. Now that this problem seems to be
fixed 🤞, I've tried to re-enable `home-mcron-service` and, while it runs,
it cannot find the commands to execute!?

I used to have this config:

```scheme
(service home-mcron-service-type
(home-mcron-configuration
 (jobs (list
 #~(job '(next-minute (range 0 60 5)) "notmuch new")
 #~(job '(next-hour) "vdirsyncer sync")
```

But I now have `notmuch new: sh: line 1: notmuch: command not found` in
my logs.

So, I changed it to:

```scheme
(gnu packages dav)  ; vdirsyncer
(gnu packages mail)  ; notmuch
; […]
(service home-mcron-service-type
(home-mcron-configuration
 (jobs (list
 #~(job '(next-minute (range 0 60 5)) (string-append #$notmuch 
"/bin/notmuch new"))
 #~(job '(next-hour) (string-append #$vdirsyncer 
"/bin/vdirsyncer sync"))
```

And now Mcron finds `notmuch` (and `vdirsyncer`), but… Notmuch has hooks
that depend on other commands and I now have the following error message
in my logs:

```
2024-01-15 10:20:00 6198 /gnu/store/[…]-notmuch-0.37/bin/notmuch new: 
[…]/.config/notmuch/default/hooks/pre-new: line 3: mbsync: command not found
```

`mbsync` is in my profile, but Mcron cannot find it.
Do I have to declare all the required packages… somehow?! 🤔

Any help welcome!

Regards,

-- 
Tanguy