summary refs log tree commit diff
path: root/pkgs/development/libraries/qscintilla
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-03-19 09:03:18 +0800
committerPeter Hoeg <peter@hoeg.com>2018-03-19 09:03:25 +0800
commit734323872a7271625e4948d9732f8ad0d59e9332 (patch)
tree4cefc89dd0fd8de0a70b3359e7bbd6db83b3af88 /pkgs/development/libraries/qscintilla
parent940fab424a9859945e8c48315d9287075d79fcf4 (diff)
downloadnixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.tar
nixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.tar.gz
nixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.tar.bz2
nixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.tar.lz
nixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.tar.xz
nixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.tar.zst
nixpkgs-734323872a7271625e4948d9732f8ad0d59e9332.zip
qscintilla: fix build on darwin
Diffstat (limited to 'pkgs/development/libraries/qscintilla')
-rw-r--r--pkgs/development/libraries/qscintilla/default.nix36
1 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix
index f5c5a667418..d6bd90fa47d 100644
--- a/pkgs/development/libraries/qscintilla/default.nix
+++ b/pkgs/development/libraries/qscintilla/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, unzip
+{ stdenv, lib, fetchurl, unzip
 , qt4 ? null, qmake4Hook ? null
-, withQt5 ? false, qtbase ? null, qmake ? null
+, withQt5 ? false, qtbase ? null, qtmacextras ? null, qmake ? null
 }:
 
 stdenv.mkDerivation rec {
@@ -14,29 +14,25 @@ stdenv.mkDerivation rec {
     sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi";
   };
 
-  buildInputs = if withQt5 then [ qtbase ] else [ qt4 ];
-  nativeBuildInputs = [ unzip ] ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]);
+  buildInputs = [ (if withQt5 then qtbase else qt4) ]
+    ++ lib.optional (withQt5 && stdenv.isDarwin) qtmacextras;
+  nativeBuildInputs = [ unzip ]
+    ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]);
 
   enableParallelBuilding = true;
 
   preConfigure = ''
     cd Qt4Qt5
-    ${if withQt5
-      then ''
-    sed -i -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \
-           -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \
-           -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/translations," \
-           -e "s,\$\$\\[QT_HOST_DATA\\]/mkspecs,$out/mkspecs," \
-           -e "s,\$\$\\[QT_INSTALL_DATA\\]/mkspecs,$out/mkspecs," \
-           -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share," \
-           qscintilla.pro
-    ''
-      else ''
-    sed -i -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \
-           -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \
-           -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/share/qt/translations," \
-           -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," \
-           qscintilla.pro
+    sed -i qscintilla.pro \
+      -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \
+      -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \
+      -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/translations," \
+    ${if withQt5 then ''
+      -e "s,\$\$\\[QT_HOST_DATA\\]/mkspecs,$out/mkspecs," \
+      -e "s,\$\$\\[QT_INSTALL_DATA\\]/mkspecs,$out/mkspecs," \
+      -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share,"
+    '' else ''
+      -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt,"
     ''}
   '';