about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix
blob: c754c75cc2763b143810ca7859342db9d93d9358 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ buildEnv, qtbase }: name: paths:

buildEnv {
  inherit name;
  paths = [ qtbase ] ++ paths;

  pathsToLink = [ "/metatypes" "/bin" "/mkspecs" "/include" "/lib" "/share" "/libexec" ];
  extraOutputsToInstall = [ "out" "dev" ];

  postBuild = ''
    for f in qmake qmake6; do
      rm "$out/bin/$f"
      cp "${qtbase}/bin/$f" "$out/bin"
    done
    cat >"$out/bin/qt.conf" <<EOF
    [Paths]
    Prefix = $out
    Plugins = ${qtbase.qtPluginPrefix}
    Qml2Imports = ${qtbase.qtQmlPrefix}
    EOF
  '';
}