qt5.env: use buildEnv
This both simplifies the code and ensures that libraries are linked too.
This commit is contained in:
parent
a14217ec6e
commit
99a83fbe1d
@ -1,28 +1,22 @@
|
|||||||
{ lib, runCommand, lndir, qtbase }: name: paths:
|
{ lib, buildEnv, qtbase }: name: paths:
|
||||||
|
|
||||||
runCommand name { qtbase = qtbase.dev; paths = lib.chooseDevOutputs paths; } ''
|
buildEnv {
|
||||||
|
inherit name;
|
||||||
|
paths = [ qtbase ] ++ paths;
|
||||||
|
|
||||||
mkdir -p "$out/bin" "$out/mkspecs" "$out/include" "$out/lib" "$out/share"
|
pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" ];
|
||||||
|
extraOutputsToInstall = [ "dev" ];
|
||||||
|
|
||||||
cp "$qtbase/bin/qmake" "$out/bin"
|
postBuild = ''
|
||||||
cat >"$out/bin/qt.conf" <<EOF
|
rm "$out/bin/qmake"
|
||||||
[Paths]
|
cp "${qtbase.dev}/bin/qmake" "$out/bin"
|
||||||
Prefix = $out
|
cat >"$out/bin/qt.conf" <<EOF
|
||||||
Plugins = lib/qt5/plugins
|
[Paths]
|
||||||
Imports = lib/qt5/imports
|
Prefix = $out
|
||||||
Qml2Imports = lib/qt5/qml
|
Plugins = lib/qt5/plugins
|
||||||
Documentation = share/doc/qt5
|
Imports = lib/qt5/imports
|
||||||
EOF
|
Qml2Imports = lib/qt5/qml
|
||||||
|
Documentation = share/doc/qt5
|
||||||
for pkg in $paths $qtbase; do
|
EOF
|
||||||
if [[ -d "$pkg/mkspecs" ]]; then
|
'';
|
||||||
${lndir}/bin/lndir -silent "$pkg/mkspecs" "$out/mkspecs"
|
}
|
||||||
|
|
||||||
for dir in bin include lib share; do
|
|
||||||
if [[ -d "$pkg/$dir" ]]; then
|
|
||||||
${lndir}/bin/lndir -silent "$pkg/$dir" "$out/$dir"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
''
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user