status-desktop/nix/pkgs/qt-5/qt-env.nix

22 lines
491 B
Nix
Raw Normal View History

2024-01-19 12:30:40 +00:00
{ buildEnv, qtbase }: name: paths:
buildEnv {
inherit name;
paths = [ qtbase ] ++ paths;
pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" ];
extraOutputsToInstall = [ "out" "dev" ];
postBuild = ''
rm "$out/bin/qmake"
cp "${qtbase.dev}/bin/qmake" "$out/bin"
cat >"$out/bin/qt.conf" <<EOF
[Paths]
Prefix = $out
Plugins = ${qtbase.qtPluginPrefix}
Qml2Imports = ${qtbase.qtQmlPrefix}
Documentation = ${qtbase.qtDocPrefix}
EOF
'';
}