to targetPkgs does not make qmake available on PATH. If I run it using its full path to nix store it doesn’t see any of those qt libraries I have specified in the targetPkgs.
Using qt5.full does NOT help. It does not contain for example gamepad and probably other libraries and if I specify both qt5.full and qt5.qtgamepad in targetPkgs then magically qmake is on PATH but it does not see qt5.qtgamepad at all.
I’d like to know what is happening why qmake doesn’t get onto PATH when installing just qmake but does with qt5.full… but it does not see the additional libraries etc…
Basically I need
A development shell with qmake and certain Qt libraries. I do not want to build a final Nix package (at least not yet).
It must be FHS because I’m dependent on some unpatchable precompiled tools with hardcoded paths etc…
I haven’t found any example for doing that. Any help is appreciated.
qmake needs PREFIX flag to be set to a path with Qt libs.
It can be done either by passing an argument to qmake which is what qmake-hook.sh does when you add qmake to nativeBuildInputs. Using build inputs seems to also automatically use dev outputs of specified input derivations as stated in Section 8.3. of nixpkgs manual. To use this in a development shell it seems one would need to create a qmakewrapper which does the same as qmakeConfigurePhase.
Or the PREFIX can be specified on qt.conf which is what qt5.full is seems to be doing by creating a derivation using buildEnv which
Explicitely specifies that dev outputs of specified packages should be installed (in mkDerivation this is implicit).
Symlinks not just /bin and /share (or whatever the default is) but also /include and /lib to the derivation being created.
Copies qmake to $out/bin/.
Creates qt.conf (on PATH && near the qmake binary - don’t know which of that is relevant) with PREFIX set to the derivation being created.
So I ended up with something like this in my buildFHSUserEnv