Re: Edits to `etc/resolv.conf` being overwritten

2021-04-02 Thread phil
I found when using GuixSD with Gnome that the network manager would 
periodically overwrite my DNS changes made directly to resolv.conf.

If you experience this issue it should leave a comment on the first line.

I was able to make it work by changing it through Gnome's Settings GUI, rather 
than editing the file myself.  Even then I have to disable and re-enable the 
network interface for the new settings to take effect.



-Original Message-
From: Bone Baboon 
To: help-guix@gnu.org
Sent: Fri, 02 Apr 2021 2:37
Subject: Edits to `etc/resolv.conf` being overwritten

Any suggestion on how to stop my edits of `etc/resolv.conf` from being
overwritten?

`/etc/resolv.conf` is being overwritten removing changes I save to it.
My edits to `etc/resolv.conf` specify some name servers.  Some time
after my edits are saved the file is completely rewritten to it's
original contents before I made my edits.  The original contents include
nameserver, domain and search for my internet service provider's DNS. 

When I run `sudo herd status` it outputs:

```
Started:
 + console-font-tty1
 + console-font-tty2
 + console-font-tty3
 + console-font-tty4
 + console-font-tty5
 + console-font-tty6
 + dbus-system
 + elogind
 + file-system-/dev/pts
 + file-system-/dev/shm
 + file-system-/gnu/store
 + file-system-/run/systemd
 + file-system-/run/user
 + file-system-/sys/firmware/efi/efivars
 + file-system-/sys/fs/cgroup
 + file-system-/sys/fs/cgroup/blkio
 + file-system-/sys/fs/cgroup/cpu
 + file-system-/sys/fs/cgroup/cpuacct
 + file-system-/sys/fs/cgroup/cpuset
 + file-system-/sys/fs/cgroup/devices
 + file-system-/sys/fs/cgroup/elogind
 + file-system-/sys/fs/cgroup/freezer
 + file-system-/sys/fs/cgroup/memory
 + file-system-/sys/fs/cgroup/perf_event
 + file-system-/sys/fs/cgroup/pids
 + file-system-/sys/kernel/debug
 + file-systems
 + guix-daemon
 + loopback
 + mcron
 + nscd
 + root
 + root-file-system
 + swap-/swapfile
 + syslogd
 + term-tty1
 + term-tty2
 + term-tty3
 + term-tty4
 + term-tty5
 + term-tty6
 + udev
 + urandom-seed
 + user-file-systems
 + user-processes
 + virtual-terminal
Stopped:
 - term-auto
One-shot:
 * host-name
 * sysctl
 * user-homes
```



[Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread Jérémy Korwin-Zmijowski
Hey Guixters !

On my laptop running Guix System, I try to execute a VM from the script
generated by "guix system vm". But I issue the following message :

$ /gnu/store/dxrwz82s34zi33n9h9cpn8sqw5pv4qyz-run-vm.sh
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize kvm: Permission denied

I already add builders to the kvm group as stated in /etc/group :

kvm:x:984:guixbuilder01,guixbuilder02,guixbuilder03,guixbuilder04,guixb
uilder05,guixbuilder06,guixbuilder07,guixbuilder08,guixbuilder09,guixbu
ilder10
guixbuild:x:3:guixbuilder01,guixbuilder02,guixbuilder03,guixbuilder
04,guixbuilder05,guixbuilder06,guixbuilder07,guixbuilder08,guixbuilder0
9,guixbuilder10

What do I miss ? :/

Cheers,
Jérémy




Re: [Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread Mathieu Othacehe


Hello Jérémy,

> $ /gnu/store/dxrwz82s34zi33n9h9cpn8sqw5pv4qyz-run-vm.sh
> Could not access KVM kernel module: Permission denied
> qemu-system-x86_64: failed to initialize kvm: Permission denied

Are you part of the "kvm" group yourself?

Mathieu



Re: [Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread Jérémy Korwin-Zmijowski
Le vendredi 02 avril 2021 à 11:36 +0200, Mathieu Othacehe a écrit :
> Are you part of the "kvm" group yourself?
> 
> Mathieu

Hi Mathiue !

I tried to add myself to the group using :

$ sudo usermod -a -G kvm jeko

Then re-executing the vm script returned the same error.

Jérémy




Re: [Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread Sergiu Ivanov
Thus quoth  Jérémy Korwin-Zmijowski  on Fri Apr 02 2021 at 11:39 (+0200):
> Le vendredi 02 avril 2021 à 11:36 +0200, Mathieu Othacehe a écrit :
>> Are you part of the "kvm" group yourself?
>> 
>> Mathieu
>
> Hi Mathiue !
>
> I tried to add myself to the group using :
>
> $ sudo usermod -a -G kvm jeko
>
> Then re-executing the vm script returned the same error.

Just in case: did you logout and login afterwards?

Group attributions need that to become effective.

-
Sergiu



Re: [Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread Jérémy Korwin-Zmijowski
Le vendredi 02 avril 2021 à 11:43 +0200, Sergiu Ivanov a écrit :
> Just in case: did you logout and login afterwards?
> 
> Group attributions need that to become effective.
> 
> -
> Sergiu

Hi Sergiu!

That's becoming embarrassing... I rebooted instead of logged out and I
might have lost the group attribution doing so.
Now the VM is running.
Sorry for bothering you with this.

Cheers,
Jérémy !




Re: [Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread divoplade
Le vendredi 02 avril 2021 à 11:39 +0200, Jérémy Korwin-Zmijowski a
écrit :
> I tried to add myself to the group using :
> 
> $ sudo usermod -a -G kvm jeko

Hello, 

Groups need to be specified in the config.scm file.

You need to edit it, and under "(user-account", find or create the
entry "(supplementary-groups" containing a list of strings.

I have something like this:

(user-account
(name ...)
(comment ...)
(group ...)
(home-directory ...)
(supplementary-groups
 '("wheel" "netdev" "audio" "video" ... "libvirt"
"kvm")))

Reconfigure (and possibly reboot) and it will be better :)




Re: [Guix System] Can't run VM script because of KVM kernel module permission

2021-04-02 Thread Mathieu Othacehe


> Now the VM is running.
> Sorry for bothering you with this.

No worries, in fact I was thinking yesterday about adding the user by
default to the "kvm" group when running the installer, to prevent this
kind of issues.

Mathieu



Re: About packaging documentation

2021-04-02 Thread Zelphir Kaltstahl
Hello Ricardo!

On 3/16/21 11:03 PM, Ricardo Wurmus wrote:
> Hi Zelphir,
>
>> Hello Ricardo!
>>
>> On 3/15/21 4:43 PM, Ricardo Wurmus wrote:
>>> Hi Zelphir,
>>>
 https://guix.gnu.org/cookbook/en/html_node/Packaging-Tutorial.html
 is a good
 start. It has even got cookbook in the name. Definitely the right idea to
 complement the general documentation. I am aware of its existence.
 Unfortunately, I could not get the basic approach of the "Hello World 
 package"
 working for my package, even though it is pure guile, no other library 
 required
 and no FFI or anything. I would have preferred not having to go through 
 all the
 autotools stuff, and to have this simple way working for my package. 
 Perhaps I
 did something slightly wrong. I do not know. Someone mentioned on the 
 guile user
 mailing list, that this is all that should be needed for a pure guile 
 package.
 Perhaps it can be updated?
>>> Could you share the code you’re trying to package?  Perhaps it will
>>> become clearer to us what you would like to see changed in the cookbook
>>> — and perhaps it will become clearer to you how packaging for Guix works.
>> Yes, I'll link it:
>>
>> https://notabug.org/ZelphirKaltstahl/guile-fslib/commit/eacdbb5ee9e30413392908d9e3988e30e9411aa7
>> 
>>
>> Or:
>>
>> https://notabug.org/ZelphirKaltstahl/guile-fslib/src/0.2.0
> Excellent.
>
> Here’s the package (I dumped this in (gnu packages guile-xyz)):
>
> --8<---cut here---start->8---
> (define-public guile-fslib
>   (package
> (name "guile-fslib")
> (version "0.2.0")
> (source
>  (origin
>(method git-fetch)
>(uri (git-reference
>  (url "https://notabug.org/ZelphirKaltstahl/guile-fslib/";)
>  (commit version)))
>(file-name (git-file-name name version))
>(sha256
> (base32
>  "118d84p443w7hrslv8hjyhgws631ia08mggiyklkmk0b9plfdsvz"
> (build-system guile-build-system)
> (inputs
>  `(("guile" ,guile-3.0)))
> (home-page "https://notabug.org/ZelphirKaltstahl/guile-fslib";)
> (synopsis "File system utilities")
> (description
>  "This package contains like super cool file system utilities and stuff.
> It's really good and so easy to install!")
> (license license:agpl3+)))
> --8<---cut here---end--->8---
>
> I only gave it a quick test like this:
>
> --8<---cut here---start->8---
> $ ./pre-inst-env guix environment --ad-hoc guile  guile-fslib -- guile
> […]
> GNU Guile 3.0.5
> Copyright (C) 1995-2021 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> ,use (file-system)
> scheme@(guile-user)> file-size-in-bytes
> $1 = #
> scheme@(guile-user)> 
> --8<---cut here---end--->8---
>
> Seems to work.
>
> And this is what was installed:
>
> --8<---cut here---start->8---
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/logging.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-fslib.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-list-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-string-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/fslib.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-reader.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/list-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-system.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/string-utils.go
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile
> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site
>

Re: Edits to `etc/resolv.conf` being overwritten

2021-04-02 Thread Bone Baboon
In this case I am not using Gnome or NetworkManager.  There are no
comment on the first line of `resolv.conf`.  I am connecting to the
internet using `wpa_supplicant` and `dhclient`.

p...@beadling.co.uk writes:

> I found when using GuixSD with Gnome that the network manager would
> periodically overwrite my DNS changes made directly to resolv.conf. 
>
> If you experience this issue it should leave a comment on the first line.
>
> I was able to make it work by changing it through Gnome's Settings
> GUI, rather than editing the file myself.  Even then I have to disable
> and re-enable the network interface for the new settings to take
> effect. 
>
> -Original Message-
> From: Bone Baboon 
> To: help-guix@gnu.org
> Sent: Fri, 02 Apr 2021 2:37
> Subject: Edits to `etc/resolv.conf` being overwritten
>
> Any suggestion on how to stop my edits of `etc/resolv.conf` from being
> overwritten?
>
> `/etc/resolv.conf` is being overwritten removing changes I save to it.
> My edits to `etc/resolv.conf` specify some name servers.  Some time
> after my edits are saved the file is completely rewritten to it's
> original contents before I made my edits.  The original contents include
> nameserver, domain and search for my internet service provider's DNS. 



Re: freecad 19.1 / flatpak

2021-04-02 Thread Gary Johnson
Christophe Pisteur  writes:

> Unfortunately there is no git on flathub. There is only gitg, which I
> installed, but the problem remains with the freecad addons. 

That's unfortunate. So...maybe I missed (or forgot) this part of the
discussion, but I see that guix has a package definition for freecad. Is
there a reason you don't want to build and install it through guix
instead of flatpak?

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: About packaging documentation

2021-04-02 Thread Zelphir Kaltstahl
Hi Ricardo!

On 4/2/21 1:29 PM, Zelphir Kaltstahl wrote:
>
> Hello Ricardo!
>
> On 3/16/21 11:03 PM, Ricardo Wurmus wrote:
>> Hi Zelphir,
>>
>>> Hello Ricardo!
>>>
>>> On 3/15/21 4:43 PM, Ricardo Wurmus wrote:
 Hi Zelphir,

> https://guix.gnu.org/cookbook/en/html_node/Packaging-Tutorial.html
> is a good
> start. It has even got cookbook in the name. Definitely the right idea to
> complement the general documentation. I am aware of its existence.
> Unfortunately, I could not get the basic approach of the "Hello World 
> package"
> working for my package, even though it is pure guile, no other library 
> required
> and no FFI or anything. I would have preferred not having to go through 
> all the
> autotools stuff, and to have this simple way working for my package. 
> Perhaps I
> did something slightly wrong. I do not know. Someone mentioned on the 
> guile user
> mailing list, that this is all that should be needed for a pure guile 
> package.
> Perhaps it can be updated?
 Could you share the code you’re trying to package?  Perhaps it will
 become clearer to us what you would like to see changed in the cookbook
 — and perhaps it will become clearer to you how packaging for Guix works.
>>> Yes, I'll link it:
>>>
>>> https://notabug.org/ZelphirKaltstahl/guile-fslib/commit/eacdbb5ee9e30413392908d9e3988e30e9411aa7
>>> 
>>>
>>> Or:
>>>
>>> https://notabug.org/ZelphirKaltstahl/guile-fslib/src/0.2.0
>> Excellent.
>>
>> Here’s the package (I dumped this in (gnu packages guile-xyz)):
>>
>> --8<---cut here---start->8---
>> (define-public guile-fslib
>>   (package
>> (name "guile-fslib")
>> (version "0.2.0")
>> (source
>>  (origin
>>(method git-fetch)
>>(uri (git-reference
>>  (url "https://notabug.org/ZelphirKaltstahl/guile-fslib/";)
>>  (commit version)))
>>(file-name (git-file-name name version))
>>(sha256
>> (base32
>>  "118d84p443w7hrslv8hjyhgws631ia08mggiyklkmk0b9plfdsvz"
>> (build-system guile-build-system)
>> (inputs
>>  `(("guile" ,guile-3.0)))
>> (home-page "https://notabug.org/ZelphirKaltstahl/guile-fslib";)
>> (synopsis "File system utilities")
>> (description
>>  "This package contains like super cool file system utilities and stuff.
>> It's really good and so easy to install!")
>> (license license:agpl3+)))
>> --8<---cut here---end--->8---
>>
>> I only gave it a quick test like this:
>>
>> --8<---cut here---start->8---
>> $ ./pre-inst-env guix environment --ad-hoc guile  guile-fslib -- guile
>> […]
>> GNU Guile 3.0.5
>> Copyright (C) 1995-2021 Free Software Foundation, Inc.
>>
>> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
>> This program is free software, and you are welcome to redistribute it
>> under certain conditions; type `,show c' for details.
>>
>> Enter `,help' for help.
>> scheme@(guile-user)> ,use (file-system)
>> scheme@(guile-user)> file-size-in-bytes
>> $1 = #
>> scheme@(guile-user)> 
>> --8<---cut here---end--->8---
>>
>> Seems to work.
>>
>> And this is what was installed:
>>
>> --8<---cut here---start->8---
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/logging.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-fslib.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-list-utils.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-string-utils.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/fslib.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-reader.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/list-utils.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-system.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/string-utils.go
>> /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0

Re: Edits to `etc/resolv.conf` being overwritten

2021-04-02 Thread Gary Johnson
Bone Baboon  writes:

>> Any suggestion on how to stop my edits of `etc/resolv.conf` from being
>> overwritten?
>>
>> `/etc/resolv.conf` is being overwritten removing changes I save to it.
>> My edits to `etc/resolv.conf` specify some name servers.  Some time
>> after my edits are saved the file is completely rewritten to it's
>> original contents before I made my edits.  The original contents include
>> nameserver, domain and search for my internet service provider's DNS. 

When running Guix System, your OS configuration is meant to be fully
derived from evaluating your `operating-system` definition. This
means, in particular, that you should not manually edit any files
outside of your home directories (i.e., /root and /home/*). This
includes, of course, any files under /etc.

Instead, any custom changes that you want to see under /etc need to be
included in your `operating-system` definition. The way to do this
depends on the change you want to make.

For example, if you want to edit /etc/sudoers, you should include this
field in your `operating-system` definition (on the same level as
`packages`, `services`, and so on):

(sudoers-file (plain-file "sudoers" my-sudoers))

Then remember to define `my-sudoers` somewhere above the
`operating-system` form. Here's an example:

(define my-sudoers
  "root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
")

Similarly, if you want to modify /etc/hosts, you add this to `operating-system`:

(hosts-file (plain-file "hosts"
 (string-append (local-host-aliases host-name)
my-host-aliases)))

And again define my-host-aliases somewhere above `operating-system`:

(define my-host-aliases
  "
# Some Servers
123.123.123.100 foo
123.123.123.101 bar
123.123.123.102 baz
")

Most other files under /etc are managed by different services. You
should review the "Guix Services" section of the info pages to find
the appropriate service for whatever files you want to modify.

As of today, I'm not aware of a Guix service that modifies
/etc/resolv.conf other than the network-manager-service-type (which is
what I use on my system).

However, if you are not using NetworkManager and want to manually set
the values in /etc/resolv.conf such that they persist across calls to
`guix system reconfigure`, you should add this form to the `services`
list in your `operating-system` definition:

(simple-service 'resolv-service
etc-service-type
`(("resolv.conf" ,(plain-file "resolv.conf" my-resolv.conf

And finally remember to define `my-resolv.conf` above `operating-system`:

(define my-resolv.conf
  "# Generated by Guix!
nameserver 255.255.255.1
nameserver ::::1
")

Have fun and happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: About packaging documentation

2021-04-02 Thread Ricardo Wurmus


Hi Zelphir,

> (1) The cookbook does not even mention the guile-build-system. […]
> I guess this is, because the cookbook tries to be generic in a way, to apply 
> to
> all languages, if only one uses autotools, as those are applicable to all
> languages.

No, you’re overthinking it :)  The cookbook is pretty short.  It started
because blog posts eventually go stale, so having some of these useful
blog posts updated with Guix seemed like a good idea.

The cookbook is supposed to include useful tutorials, recipes, extensive
examples — all stuff that would bloat up the reference manual or make it
lose scope.

The fact that the cookbook doesn’t mention the guile-build-system is due
to two reasons:

1) it’s not a reference manual, but a collection of tutorials
2) nobody contributed a tutorial involving the guile-build-system.

1 is by design, but 2 is not.  We would certainly add a tutorial for
simple Guile packages if someone contributed it.

> (2) The hello package example is using the gnu-build-system. I guess that 
> means,
> that Guix will go through the usual autotools steps, after extracting a 
> tarball
> or cloning a repository. However, then it would seem, that the success of the
> installation of the package largely hinges on what is defined in the autotools
> related files, like Makefile and such, which are part of the downloaded tar.

Correct.  The GNU build system commonly consists of a bootstrap step,
the execution of the configure script, followed by “make” and “make
install”.  The gnu-build-system abstraction merely automates that and
assumes that these things exist and are in a functional state, so that
it can call them with certain default arguments.

> Those however, are not described in the cookbook. If one is to create a 
> package,
> which makes use of the gnu-build-system, then a description of how to get this
> done would be good to have. People have done it before, but documentation does
> not capture it.

I can understand the desire for comprehensive documentation, but I think
that’s too far out of scope for even the cookbook.  The GNU build system
is just very *very* common, which is why the tutorial uses the
gnu-build-system abstraction.  It something you are bound to encounter
when packaging non-trivial C/C++ applications.

Guix has abstractions for many other build systems, such as the
r-build-system, or the cmake-build-system.  But I think it would be
excessive to add tutorials on how to write an R package according to
specifications, or how to write CMakeList.txt for a cmake-using project.

> Then there is another confusion: The definition you have written – Is that for
> editing the `guile.scm` in the Guix source tree

Not, for guile.scm but for gnu/packages/guile-xyz.scm or rather the (gnu
package guile-xyz) module.  It works in that context because that module
already has all the necessary imports.

-- 
Ricardo



Re: About packaging documentation

2021-04-02 Thread Ricardo Wurmus


Hi Zelphir,

> $ ./pre-inst-env guix build guile-fslib
> guix build: error: guile-fslib: unknown package
[…]
> Ugh. Not working.

for what it’s worth, I added the definition to
gnu/packages/guile-xyz.scm and it worked.

I note that you haven’t mentioned running “make”, but your output does
not indicate that the Guix sources are interpreted.  I wonder why.  It
seems to me that pre-inst-env in your case doesn’t have the intended
effect.

You should run “make”.

-- 
Ricardo



Guix build system customization

2021-04-02 Thread Timmy Douglas


I was wondering if there were any guides for making large customizations
to the Guix build systems. For example, one might want to set up custom
CFLAGS for gnu-build-system, change the default value for stripping
binaries, etc. This would disable substitutions and void the warranty,
but might be fun for people that make a hobby out of system crafting...


I tried changing the default value for #:strip-binaries for example, but
hit &derivation-missing-output-error (output: "debug") when doing guix
pull on my forked repo. The error makes sense given the context of what
I did, but it doesn't help me find my mistake.

I thought it might be worth seeing if anyone has spent more time looking
at this and/or documenting it. I wasn't able to find much with the
search terms I tried.

Thanks!