Home Explore Blog Models CI



nixpkgs

6th chunk of `doc/languages-frameworks/gnome.section.md`
9325c88d9b30fae94c06187b0240ae8a57ae50c6d1e6070a00000001000008dc
There are no schemas available in `XDG_DATA_DIRS`. Temporarily add a random package containing schemas like `gsettings-desktop-schemas` to `buildInputs`. [`glib`](#ssec-gnome-hooks-glib) and [`wrapGApps*`](#ssec-gnome-hooks-wrapgappshook) setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the [next error](#ssec-gnome-common-issues-missing-schema). Or you can try looking through the source code for the actual schemas used.

### `GLib-GIO-ERROR **: 06:04:50.903: Settings schema ‘org.gnome.foo’ is not installed` {#ssec-gnome-common-issues-missing-schema}

Package is missing some GSettings schemas. You can find out the package containing the schema with `nix-locate org.gnome.foo.gschema.xml` and let the hooks handle the wrapping as [above](#ssec-gnome-common-issues-no-schemas).

### When using `wrapGApps*` hook with special derivers or hooks you can end up with double wrapped binaries. {#ssec-gnome-common-issues-double-wrapped}

This is because some setup hooks like `qt6.wrapQtAppsHook` also wrap programs using `makeWrapper`.  Likewise, some derivers (e.g. `python.pkgs.buildPythonApplication`) automatically pull in their own setup hooks that produce wrappers.

The simplest workaround is to disable the `wrapGApps*` hook's automatic wrapping using `dontWrapGApps = true;` while passing its `makeWrapper` arguments to another wrapper.

In the case of a Python application it could look like:

```nix
python3.pkgs.buildPythonApplication {
  pname = "gnome-music";
  version = "3.32.2";

  nativeBuildInputs = [
    wrapGAppsHook3
    gobject-introspection
    # ...
  ];

  dontWrapGApps = true;

  # Arguments to be passed to `makeWrapper`, only used by buildPython*
  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';
}
```

And for a QT app like:

```nix
stdenv.mkDerivation {
  pname = "calibre";
  version = "3.47.0";

  nativeBuildInputs = [
    wrapGAppsHook3
    qt6.wrapQtAppsHook
    qmake
    # ...
  ];

  dontWrapGApps = true;

  preFixup = ''
    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';
}
```

### I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension. {#ssec-gnome-common-issues-unwrappable-package}

Title: Nix GNOME Packaging: Common Troubleshooting for GSettings and Wrapping
Summary
This section addresses frequently encountered issues when packaging GNOME applications in Nix. It provides solutions for GSettings schema errors, such as 'No GSettings schemas' (by adding `gsettings-desktop-schemas` to `buildInputs`) and 'Settings schema 'org.gnome.foo' is not installed' (by using `nix-locate` to find the missing schema package). It also explains how to prevent 'double wrapped binaries' that occur when multiple setup hooks or derivers (`wrapGApps*`, `qt6.wrapQtAppsHook`, `buildPythonApplication`) create wrappers. The recommended workaround is to disable `wrapGApps*`'s automatic wrapping via `dontWrapGApps = true;` and manually pass its arguments (`gappsWrapperArgs`) to the other wrapper's argument array (e.g., `makeWrapperArgs` for Python or `qtWrapperArgs` for Qt applications), with examples provided for both.