about summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/qt-env.nix
blob: fad68fbd74505f7af1420f0c7e05d3d746c5d856 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ 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
  '';
}