Commit Graph

8 Commits

Author SHA1 Message Date
Elias Naur 0a209f7d39 flake.*: upgrade to nixpkgs 25.05, use nixpkgs android SDK
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2025-05-24 11:47:43 +02:00
Elias Naur 1d95c7c6b3 flake.*: upgrade to nixpkgs 24.11
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2024-12-06 10:23:02 +01:00
Elias Naur a454d5fa38 flake.nix: upgrade to nixpkgs 23.11; upgrade to JDK 17
Apparently, newer Android SDKs now support Java versions newer than 8.
Finally.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2023-12-16 14:19:09 -06:00
Elias Naur 5326ca5fbe all: add support for macOS to flake.nix
The Nix version of the macOS toolchain has difficulties compiling
Objective-C modules; disable modules instead of figuring out why.
It also doesn't include any frameworks automatically; add them explicitly.

While here, move suppression of OpenGL deprecation to a GL-specific
file.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2022-08-01 01:33:21 +02:00
Elias Naur 9bf68963da flake.lock: run nix flake update
Otherwise, running Gio programs fails with an error because of
GPU driver mismatch.

References: https://todo.sr.ht/~eliasnaur/gio/417
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2022-06-07 12:28:28 +02:00
Elias Naur 4872bd3cd6 Revert "flake.lock: [NixOS] delete to avoid GPU driver version mismatch"
This reverts commit a896a467ec. Because
of

	https://github.com/NixOS/nix/issues/5810

not having flake.lock checked in makes the `nix` command add it instead,
regardless of its presence in `.gitignore`.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2022-06-07 12:28:12 +02:00
Elias Naur a896a467ec flake.lock: [NixOS] delete to avoid GPU driver version mismatch
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>
2022-06-01 12:01:44 +02:00
Elias Naur a3f147541f flake.*: add Nix development environment
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>
2022-03-28 17:48:13 +02:00