mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 19:15:39 +00:00
99a83fbe1d
This both simplifies the code and ensures that libraries are linked too.
23 lines
493 B
Nix
23 lines
493 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 = lib/qt5/plugins
|
|
Imports = lib/qt5/imports
|
|
Qml2Imports = lib/qt5/qml
|
|
Documentation = share/doc/qt5
|
|
EOF
|
|
'';
|
|
}
|