diff --git a/pkgs/desktops/deepin/dtkcore/default.nix b/pkgs/desktops/deepin/dtkcore/default.nix index 561e951f34d..1dfb627c605 100644 --- a/pkgs/desktops/deepin/dtkcore/default.nix +++ b/pkgs/desktops/deepin/dtkcore/default.nix @@ -23,11 +23,16 @@ stdenv.mkDerivation rec { ]; postPatch = '' - sed -i src/src.pro src/dtk_module.prf \ - -e "s,\$\''${QT_HOST_DATA}/mkspecs,$out/mkspecs," + # Only define QT_HOST_DATA if it is empty + sed '/QT_HOST_DATA=/a }' -i src/dtk_module.prf + sed '/QT_HOST_DATA=/i isEmpty(QT_HOST_DATA) {' -i src/dtk_module.prf - sed -i tools/script/dtk-translate.py \ - -e "s,#!env,#!/usr/bin/env," + # Fix shebang + sed -i tools/script/dtk-translate.py -e "s,#!env,#!/usr/bin/env," + ''; + + preConfigure = '' + qmakeFlags="$qmakeFlags QT_HOST_DATA=$out" ''; postFixup = '' @@ -35,6 +40,8 @@ stdenv.mkDerivation rec { wrapPythonProgramsIn "$out/lib/dtk2" "$out $pythonPath" ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Deepin tool kit core modules"; homepage = https://github.com/linuxdeepin/dtkcore;