Qt: Difference between revisions
imported>Samueldr m Adds link to the fix... keep this until 20.03 for stragglers on 19.03 and before→Cannot mix incompatible Qt library (version 0x_____) with this library (version 0x_____) |
imported>Makefu No edit summary |
||
| Line 10: | Line 10: | ||
For using direnv, create a '''shell.nix''' file in the root of your project and paste these lines into it: | For using direnv, create a '''shell.nix''' file in the root of your project and paste these lines into it: | ||
<syntaxHighlight lang=nix> | |||
# shell.nix | |||
{ pkgs ? import <nixpkgs> {} }: | { pkgs ? import <nixpkgs> {} }: | ||
pkgs.mkShell { | pkgs.mkShell { | ||
| Line 19: | Line 19: | ||
]; | ]; | ||
} | } | ||
</ | </syntaxHighlight> | ||
Tip: if you want use clang-format, add '''clang-format''' to '''buildinputs''' list. | Tip: if you want use clang-format, add '''clang-format''' to '''buildinputs''' list. | ||
| Line 64: | Line 64: | ||
</pre> | </pre> | ||
The package will need to be fixed to use [the new https://github.com/NixOS/nixpkgs/issues/65399 <code>wrapQtAppsHook</code>]. | The package will need to be fixed to use [the new https://github.com/NixOS/nixpkgs/issues/65399 <code>wrapQtAppsHook</code>]. The hook wraps every qt application with adding <code>QT_PLUGIN_PATH</code> and <code>XDG_DATA_DIRS</code> as well as <code>XDG_CONFIG_DIRS</code>.See [https://github.com/NixOS/nixpkgs/blob/nixos-19.09/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh wrap-qt-hook.sh in nixpkgs] | ||
==== Debugging methods ==== | ==== Debugging methods ==== | ||