mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
3f3d33a078
Using a distinct prefix for plugins and QML libraries allows multiple Qt 5 minor versions to coexist in the same environment.
22 lines
463 B
Nix
22 lines
463 B
Nix
{ lib, buildEnv, qtbase }: name: paths:
|
|
|
|
buildEnv {
|
|
inherit name;
|
|
paths = [ qtbase ] ++ paths;
|
|
|
|
pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" ];
|
|
extraOutputsToInstall = [ "dev" ];
|
|
|
|
postBuild = ''
|
|
rm "$out/bin/qmake"
|
|
cp "${qtbase.dev}/bin/qmake" "$out/bin"
|
|
cat >"$out/bin/qt.conf" <<EOF
|
|
[Paths]
|
|
Prefix = $out
|
|
Plugins = $qtPluginPrefix
|
|
Qml2Imports = $qtQmlPrefix
|
|
Documentation = $qtDocPrefix
|
|
EOF
|
|
'';
|
|
}
|