Creating Nix packages for Qt-based software

I’m trying to create a nix package for

GitHub - OpenBoard-org/OpenBoard: OpenBoard is a cross-platform interactive whiteboard application intended for use in a classroom setting.

Firstly, I’m not at all used to installing Qt software in general. Secondly, searching for Qt-related stuff in the Nix docs, and comparing it to what people actually do in nixpkgs has left me thoroughly confused.

Before giving up on the whole idea, I thought I’d ask here whether anyone can get me going on packaging up OpenBoard.

So, at a glance, I think you should be able to follow the guidelines as usual (Put nativeBuildInputs = [ qmake ];, as it uses qmake to build), but it looks like there are a few things to work around with OpenBoard:

  • qtwebkit is marked as broken with Qt 5.15. You could try using libsForQt514.callPackage (Qt 5.14) instead of libsForQt5.callPackage to avoid this problem.
  • OpenBoard has vendored dependencies in a separate OpenBoard-ThirdParty repo. I suspect that the reason for this is not that they need a specific modified version of the dependencies, but simply that for their windows builds, where there’s no package manager to help locate dependencies, it’s the simplest thing to get it working. With this in mind, I would try to “de-vendor” the vendored dependencies: e.g. add quazip to the buildInputs, and try to patch or substitute out the parts of the source project files which reference the third party repo.
  • It looks like there are some other hardcoded paths in the project files which may or may not cause problems.