nixpkgs/pkgs/development/libraries/qt-5/qt-env.nix
Nikolay Amiantov 44901407f0 qtEnv: fix paths in qt.conf
The shell variables from setup hook are not visible here, so instead substitute
them from Nix side.
2018-02-18 14:44:16 +01:00

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
'';
}