[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to create and test a new service definition
From: |
Ludovic Courtès |
Subject: |
Re: how to create and test a new service definition |
Date: |
Sat, 13 May 2017 22:06:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Vincent Legoll <address@hidden> skribis:
>> The best way to test your code is to write an ‘operating-system’
>> declaration that uses the new service and to instantiate it in a VM with
>> ‘guix system vm’.
>
> Should that be working properly (out-of-the-box) when you're already in
> a qemu VM (recursive virtualization) ?
>
> I ask because I'm getting:
>
> [...]
> ERROR: qemu failed "qemu-system-x86_64"
What were the lines above this one? This tool tries to use KVM if it
seems available. Maybe in your case it “seems” to be available (as in
/dev/kvm exists) but is actually unusable?
>> Once you’ve done that, you can also write an automated test for the new
>> service; see <https://gnu.org/s/guix/news/guixsd-system-tests.html>.
>
> I'm far from there, I have a *really* hard time getting back to guixsd. For
> instance it took me very long time to find back the GUIX_PACKAGE_PATH
> env var. This looks under-documented, or I don't understand how one is to
> work on custom or new packages, etc...
‘GUIX_PACKAGE_PATH’ is documented at
<https://www.gnu.org/software/guix/manual/html_node/Package-Modules.html#index-GUIX_005fPACKAGE_005fPATH>.
The workflow for defining packages is described at
<https://www.gnu.org/software/guix/manual/html_node/Defining-Packages.html>,
and that for contributing them is at
<https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>.
There’s probably room for improvement though. What changes/additions
would you suggest?
> guix edit is throwing me :
> E166: Can't open linked file for writing
This error does not come from ‘guix edit’, but maybe from your editor.
As for why the file is read-only, see
<https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-edit.html>.
HTH,
Ludo’.