[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Oleg Pykhalov
Subject: Re: "Command not found" when using `home-mcron-service`
Date: Mon, 15 Jan 2024 18:25:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13)

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:
>> >
>> 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")

    (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.:



    (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.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]