forked from mirrors/nixpkgs
44901407f0
The shell variables from setup hook are not visible here, so instead substitute them from Nix side.
22 lines
490 B
Nix
22 lines
490 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 = ${qtbase.qtPluginPrefix}
|
|
Qml2Imports = ${qtbase.qtQmlPrefix}
|
|
Documentation = ${qtbase.qtDocPrefix}
|
|
EOF
|
|
'';
|
|
}
|