Yes, this makes it build correctly.
First note:
One needs to put the ggml model in ~/.local/share/nomic.ai/GPT4All/
Now, the program still does not start because of the following error messages:
qt.core.plugin.loader: In /nix/store/g2cvi1xiawh7fn3s0zm3jjvk2h7ld17x-qtwayland-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqwayland-egl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/g2cvi1xiawh7fn3s0zm3jjvk2h7ld17x-qtwayland-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqwayland-generic.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/g2cvi1xiawh7fn3s0zm3jjvk2h7ld17x-qtwayland-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqwayland-xcomposite-egl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/g2cvi1xiawh7fn3s0zm3jjvk2h7ld17x-qtwayland-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqwayland-xcomposite-glx.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqeglfs.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqlinuxfb.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqminimal.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqminimalegl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqoffscreen.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqvnc.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforms/libqxcb.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platformthemes/libqgtk3.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platformthemes/libqxdgdesktopportal.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/m9f87s8r152hia95h1lamhjrb2pd93g3-qtvirtualkeyboard-5.15.7/lib/qt-5.15.7/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /nix/store/i7k4plcqhpjv8ddqr66svmwq38ldxyh1-qtbase-5.15.7-bin/lib/qt-5.15.7/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so:
Plugin uses incompatible Qt library (5.15.0) [release]
gptj_model_load: loading model from '/home/rafael/.local/share/nomic.ai/GPT4All//ggml-gpt4all-j.bin' - please wait ...
gptj_model_load: n_vocab = 50400
gptj_model_load: n_ctx = 2048
gptj_model_load: n_embd = 4096
gptj_model_load: n_head = 16
gptj_model_load: n_layer = 28
gptj_model_load: n_rot = 64
gptj_model_load: f16 = 2
qt.core.plugin.loader: In /nix/store/7vcv31hypl3kbqp7fzlsspjigqcgnbs5-qtquickcontrols-5.15.7/lib/qt-5.15.7/qml/QtQuick/Controls/libqtquickcontrolsplugin.so:
Plugin uses incompatible Qt library (5.15.0) [release]
QQmlApplicationEngine failed to load component
qrc:/gpt4all/main.qml:3:1: The plugin '/nix/store/7vcv31hypl3kbqp7fzlsspjigqcgnbs5-qtquickcontrols-5.15.7/lib/qt-5.15.7/qml/QtQuick/Controls/libqtquickcontrolsplugin.so' uses incompatible Qt library. (5.15.0) [release]
It seems to be related to the bug fixed in the PR:
https://github.com/NixOS/nixpkgs/pull/211003
But upgrading the channel didn’t solve the error here.
I’ll keep working on this problem.