Can't seem to use make due to glib-compile-schemas

So I’ve been trying to compile the gnome 40 version of dash-to-dock (found at https://github.com/micheleg/dash-to-dock/pull/1402) on my nix 21.05 setup as I have on a number of other distros. I’ve added gnumake to my environment yet when running it in the directory i get the error:

glib-compile-schemas ./schemas/ make: glib-compile-schemas: No such file or directory make: *** [Makefile:40: schemas/gschemas.compiled] Error 127

I’m probably missing something obvious here but if so I can’t seem to fix it.

thanks in advance for any help!

1 Like

That is in glib package. Also note we have https://github.com/NixOS/nixpkgs/pull/135293 merged to unstable.

2 Likes

I’m having the same problem trying to compile Material Shell (https://github.com/material-shell/material-shell):

$ make
cp -r schemas dist
glib-compile-schemas dist/schemas/
make: glib-compile-schemas: No such file or directory
make: *** [Makefile:8: schemas] Error 127

I have both gnumake and glib installed. I’m running NixOS 21.11.

Any ideas?

glib-compile-schemas is part of dev output of glib package. Installation will not include dev output by default.

For environment.systemPackages, you can have it included in the buildEnv result using environment.extraOutputsToInstall = [ "dev" ]; option. Or just explicitly install glib.dev.

But I would not recommend that. Globally installing libraries is considered a bad practice. The Nix way is to use nix-shell -p glib, which will include dev output for glib (since nix-shell essentially puts the packages into buildInputs).

And do not even try nix-env, unless you find pain convenient.

5 Likes

Thanks very much @jtojnar that makes sense!