Error compiling qmake qt app

I’m trying to compile a certain QT app and hopefully contribute it to Nixpkgs:

The download is from here: EqualX - Downloads and documentation for building from source is here: EqualX - Documentation

I’ve tried first testing the compilation of it in a nix-shell (direnv to be exact…) with this shell.nix:

with import <nixpkgs> {};
pkgs.mkShell {
  buildInputs = [

I build it with the commands:

$ qmake
$ make

But the build fails with:

-DQT_CORE_LIB -I. -I/usr/include/exempi-2.0 -Iinclude -Iinclude/Library -Iinclude/BookmarksPanel -Iinclude/HistoryPanel -I/nix/store/05izlf
i7gzyk3nj6fafdsp1wsnn2mbcx-exempi-2.5.1/include/exempi-2.0 -I/nix/store/05izlfi7gzyk3nj6fafdsp1wsnn2mbcx-exempi-2.5.1/include -isystem /nix
/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtWidgets -isystem /nix/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.1
2.5-dev/include/QtGui -isystem /nix/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtSql -isystem /nix/store/kv6mipfp13cl
4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtCore -Itmp -I/nix/store/09kinq7pbr3an3ch1nn7y82ckpfzbxkv-mesa-19.2.4-dev/include -I. -I/ni
x/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/mkspecs/linux-g++ -o DialogPreferences.o src/DialogPreferences.cpp
src/DialogPreferences.cpp: In member function ‘void DialogPreferences::setCurrentExportType(QAction*)’:
src/DialogPreferences.cpp:81:36: error: invalid use of incomplete type ‘class QAction’
In file included from /nix/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtWidgets/qdialog.h:44,
                from /nix/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtWidgets/qfiledialog.h:47,
                from /nix/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtWidgets/QFileDialog:1,
                from src/DialogPreferences.cpp:21:
/nix/store/kv6mipfp13cl4m39c33a7kn0b3yzjs1v-qtbase-5.12.5-dev/include/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QActio
class QAction;
make: *** [Makefile:955: DialogPreferences.o] Error 1

I’ve talked with the developer over email and he says that QT is probably installed incorrectly…

I noticed there’s also the qmakeHook derivation which might have been a better choice if I was packaging it straight to Nixpkgs but I’d really like to test it with a local build first before trying to build it inside nixpkgs.

I think this needs an older version of Qt. Maybe try qt 5.10.

Funny, I get the error:

undefined variable 'qt511' at /home/doron/downloads/equalx-0.7.1/shell.nix:5:5

When trying this shell.nix:

with import <nixpkgs> {};
pkgs.mkShell {
  buildInputs = [

And the same with qt510.

I do see for example nixpkgs.qt510.qtbase when doing a nix search.

pkgs.qt511 definitely exists in unstable, but qt510 doesn’t. Try qt59 or qt4 (4.8.7) instead.

Thanks for commenting @earvstedt I tried again building it from within Nixpkgs and still I get the same error. With qt4 the build passes but the UI looks awful… The main issue is that I can’t find qt511 - is there supposed to be a libsForQt511.callPackage function I could use? Or should I use libsForQt5 and somehow specify that qt511 should be used instead of the default qt512?