From c48a234ab1b826c7712b59a10dc541c83b76b5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sun, 2 Sep 2018 15:15:01 -0300 Subject: [PATCH] dtkcore: only define QT_HOST_DATA if it is empty, enable parallel building --- pkgs/desktops/deepin/dtkcore/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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;