A `flake.lock` file pins the versions of packages Gio requires to build.
However, pinning the `libGL` package may result in a runtime incompatibility
between the user space GPU driver and the system GPU driver. The result is
an error such as
glGetDisplay failed: 0x300
I don't know a way to keep the convenience of pinned flake.lock versions
combined with a system-defined `libGL` package version. This change implements
a workaround: exclude `flake.lock` from version control and let the first
use of `flake.nix` auto-create a lock file that (hopefully) is compatible
with the system.
References: https://todo.sr.ht/~eliasnaur/gio/417
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This change adds a Nix flake capable of setting up an environment
for building Gio programs for Linux and Android, on top of the
platforms that only needs Go (Windows, WASM).
To use the flake, install Nix 2.4 or later and enable experimental
support for flakes. Then, you can launch a development shell with
$ alias nix='nix --extra-experimental-features "nix-command flakes"'
$ nix develop sourcehut:~eliasnaur/gio
The environment can also be applied to the current shell, which is
useful in combination with direnv:
$ . <(nix print-dev-env sourcehut:~eliasnaur/gio)
Signed-off-by: Elias Naur <mail@eliasnaur.com>