Settings schema is not usable inside shell created by `nix develop`

I’m trying to use nix develop to continuosly edit and re-build nixpkgs#shortwave (World / Shortwave · GitLab).

I’m running

cd shortwave-src
nix develop nixpkgs#shortwave
eval $configurePhase && eval $buildPhase && eval $installPhase
fixupPhase

The problem is, after trying to run ../outputs/out/bin/shortwave, the settings schema can’t be found.

(shortwave:500922): GLib-GIO-ERROR **: 18:41:22.392: Settings schema 'de.haeckerfelix.Shortwave' is not installed
Trace/breakpoint trap (core dumped)

Therefore I can’t develop shortwave, or any other gnome application.
I can compile the app, but I can’t run it afterwards.

How can I run the app after compiling it inside the nix develop shell?

I would recommend not using the phases interactively for development, unless you are specifically debugging the Nix build or something. There are just too many moving parts to get it right. In your case gappsWrapperArgsHook is run as a part of preFixupPhases:

which are distinct from fixupPhase:

Instead I would recommend the standard Meson development steps not specific to Nix:

  • rm -rf _build; meson _build for initial setup (or when the flake is updated)
  • ninja -C _build for builds
  • meson -C _build devenv shortwave for running the app

Just make sure Meson knows to compile the schemas for devenv (example).

1 Like