Nix 'gramps' package Trace/breakpoint trap

I started using nix about two weeks ago.
I installed nix on a centos 7 system.
I found the application ‘gramps’ packaged and installed it.
It’s encouraging that it starts.

I am now attempting to use the ‘import’ function of the Gramps application and I trigger a “trace/breakpoint trap”.
The message from the console suggests that parts of the graphics components (GTK file chooser) does not match what the application expects - missing key show-type-column.

I paste below the console messages. How do I go about troubleshooting this?

Is it easy to get the development environment from the nix derivation for the package that I see in github at nixpkgs/default.nix at 9203abb2045f0840487b190ff9bfb2fb67f3dcc6 · NixOS/nixpkgs · GitHub ?


$ gramps
/nix/store/nsx6l4gyxazw0y89w05864ajw6n4wb8p-gramps-5.0.1/lib/python3.8/site-packages/gramps/gen/plug/ SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if PluginRegister.__instance is not 1:
/nix/store/nsx6l4gyxazw0y89w05864ajw6n4wb8p-gramps-5.0.1/lib/python3.8/site-packages/gramps/gen/plug/ SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if BasePluginManager.__instance is not 1:

(.gramps-wrapped:8793): Gtk-WARNING **: 21:57:22.595: Locale not supported by C library.
	Using the fallback 'C' locale.
/nix/store/nsx6l4gyxazw0y89w05864ajw6n4wb8p-gramps-5.0.1/lib/python3.8/site-packages/gramps/gui/ SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if GuiPluginManager.__instance is not 1:
Gtk-Message: 21:57:23.309: Failed to load module "pk-gtk-module"
Gtk-Message: 21:57:23.309: Failed to load module "canberra-gtk-module"
/nix/store/nsx6l4gyxazw0y89w05864ajw6n4wb8p-gramps-5.0.1/lib/python3.8/site-packages/gramps/plugins/lib/maps/ SyntaxWarning: "is not" with a literal. Did you mean "!="?
  self.message += "\n%s" % message if self.message is not "" else message
/nix/store/z69j718kmm2a3mwxskrh6cn91qnq7c6f-python3.8-pygobject-3.36.0/lib/python3.8/site-packages/gi/overrides/ Warning: getpwuid_r(): failed due to unknown user id (1006783)
  return super_init_func(self, **new_kwargs)

(.gramps-wrapped:8793): GLib-GIO-ERROR **: 21:57:34.221: Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column'
Trace/breakpoint trap

to respond myself, I found that I can get the development environment for the package by invoking

nix-shell '<nixpkgs>' -A gramps

I can reproduce the error invoking the application as suggested in the INSTALL file for the application
python3 -c 'from gramps.grampsapp import main; main()'

I also found a related post by @rkoe

The application I’m testing uses gtk3

I submitted a bug report in gramps’s bug tracker.

This might be a solved problem, because I don’t encounter the problem when executing the application with a git tree of gramps on the maintenance/gramps51 branch (8f4b51c83717), from 4 July 2020.

Next I would like to learn to upgrade the package to this latest version from github.

I was able to change the entry from nixpkgs to build the latest version of gramps (5.1.2)
It seems to work okay too.

However during the build there are more than 30 tests that fail.
I had a look at the code of the tests and I believe this is related to the tests attempting to create a folder under $HOME, which is set to /homeless-shelter.
The next bit to learn is:
How can I set a HOME environment variable for nix-build?

As you can set any other environment variable, though I do not think you should do that, instead upstream should fix there tests to not rely on $HOME beeing writable. Perhaps even fully remove the necessity of writing on a real filesystem completely?