How to install Gnome SDK/dev dependencies

I’m trying to develop a basic Gnome application on NixOS.
Basically I’d like to start a webview via webkitgtk, but it seems I’m missing some development dependencies.

I already installed gtk3 gtk3.dev webkitgtk webkitgtk.dev globally, but I think I’m missing something else here.

The next thing I tried was installing gnome-builder and start a basic project with that. But that results in the application complaining about the missing org.gnome.SDK and failing to install it.

So I guess my question is: How to install Gnome SDK/dev dependencies in NixOS?

Installing libraries globally is not supported see https://nixos.wiki/wiki/FAQ#I_installed_a_library_but_my_compiler_is_not_finding_it._Why.3F

You can either spawn ad-hoc shell with nix-shell -p pkg-config gtk3 webkitgtk or create nix files (example). The latter will allow you to use better tools like direnv and lorri.

I am not sure if Builder will work with the nix-shell , though. Last time I tried it seemed to clean the environment. See the introducing PR for more details.

Regarding the SDK, I did not test it but do you have flatpak installed? See services.flatpak.enable NixOS option.

1 Like

Ah thanks for your answer. Also I have not yet enabled flatpak, I’ll try that later.
Actually the nix-shell -p seems to work, even though I now have problems with libclang :man_shrugging:

Thanks again. Now I can go on :+1: