summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2016-12-03 09:55:39 -0600
committerThomas Tuegel <ttuegel@gmail.com>2016-12-03 09:55:39 -0600
commit2c4995c013fa093ccbf469ca279f543739529d8b (patch)
treeec6148e24db8e8d473089d192ed95b0d1d0f5a1b /pkgs/development/libraries/qt-5
parent53a694e0968430483b27509e7a80aeb8d5b78b87 (diff)
downloadnixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.tar
nixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.tar.gz
nixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.tar.bz2
nixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.tar.lz
nixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.tar.xz
nixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.tar.zst
nixpkgs-2c4995c013fa093ccbf469ca279f543739529d8b.zip
qt5: factor out common qmake setup hook
Diffstat (limited to 'pkgs/development/libraries/qt-5')
-rw-r--r--pkgs/development/libraries/qt-5/5.5/default.nix5
-rw-r--r--pkgs/development/libraries/qt-5/5.6/default.nix5
-rw-r--r--pkgs/development/libraries/qt-5/5.6/qmake-hook.sh42
-rw-r--r--pkgs/development/libraries/qt-5/5.7/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.7/qmake-hook.sh42
-rw-r--r--pkgs/development/libraries/qt-5/qmake-hook.sh (renamed from pkgs/development/libraries/qt-5/5.5/qmake-hook.sh)0
6 files changed, 9 insertions, 87 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix
index 92e71aab091..e7d35dcb84b 100644
--- a/pkgs/development/libraries/qt-5/5.5/default.nix
+++ b/pkgs/development/libraries/qt-5/5.5/default.nix
@@ -113,7 +113,10 @@ let
       ];
 
       makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh;
-      qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh;
+      qmakeHook =
+        makeSetupHook
+        { deps = [ self.qtbase.dev ]; }
+        ../qmake-hook.sh;
 
     };
 
diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix
index 68def625cb2..5c58b85639b 100644
--- a/pkgs/development/libraries/qt-5/5.6/default.nix
+++ b/pkgs/development/libraries/qt-5/5.6/default.nix
@@ -110,7 +110,10 @@ let
       ];
 
       makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh;
-      qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } ./qmake-hook.sh;
+      qmakeHook =
+        makeSetupHook
+        { deps = [ self.qtbase.dev ]; }
+        ../qmake-hook.sh;
 
     };
 
diff --git a/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh
deleted file mode 100644
index 696b4ea8dad..00000000000
--- a/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-qmakeConfigurePhase() {
-    runHook preConfigure
-
-    qmake PREFIX=$out $qmakeFlags
-
-    runHook postConfigure
-}
-
-if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
-    configurePhase=qmakeConfigurePhase
-fi
-
-_qtModuleMultioutDevsPre() {
-    # We cannot simply set these paths in configureFlags because libQtCore retains
-    # references to the paths it was built with.
-    moveToOutput "bin" "${!outputDev}"
-    moveToOutput "include" "${!outputDev}"
-
-    # The destination directory must exist or moveToOutput will do nothing
-    mkdir -p "${!outputDev}/share"
-    moveToOutput "share/doc" "${!outputDev}"
-}
-
-_qtModuleMultioutDevsPost() {
-    # Move libtool archives and qmake project files to $dev/lib
-    if [ "z${!outputLib}" != "z${!outputDev}" ]; then
-        pushd "${!outputLib}"
-        if [ -d "lib" ]; then
-            find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \
-                while read -r -d $'\0' file; do
-                    mkdir -p "${!outputDev}/$(dirname "$file")"
-                    mv "${!outputLib}/$file" "${!outputDev}/$file"
-                done
-        fi
-        popd
-    fi
-}
-
-if [ -n "$NIX_QT_SUBMODULE" ]; then
-    preFixupHooks+=(_qtModuleMultioutDevsPre)
-    postFixupHooks+=(_qtModuleMultioutDevsPost)
-fi
diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix
index 93a3fdf72b0..dbb66b6510a 100644
--- a/pkgs/development/libraries/qt-5/5.7/default.nix
+++ b/pkgs/development/libraries/qt-5/5.7/default.nix
@@ -112,7 +112,7 @@ let
       qmakeHook =
         makeSetupHook
         { deps = [ self.qtbase.dev ]; }
-        ./qmake-hook.sh;
+        ../qmake-hook.sh;
 
     };
 
diff --git a/pkgs/development/libraries/qt-5/5.7/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.7/qmake-hook.sh
deleted file mode 100644
index 696b4ea8dad..00000000000
--- a/pkgs/development/libraries/qt-5/5.7/qmake-hook.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-qmakeConfigurePhase() {
-    runHook preConfigure
-
-    qmake PREFIX=$out $qmakeFlags
-
-    runHook postConfigure
-}
-
-if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
-    configurePhase=qmakeConfigurePhase
-fi
-
-_qtModuleMultioutDevsPre() {
-    # We cannot simply set these paths in configureFlags because libQtCore retains
-    # references to the paths it was built with.
-    moveToOutput "bin" "${!outputDev}"
-    moveToOutput "include" "${!outputDev}"
-
-    # The destination directory must exist or moveToOutput will do nothing
-    mkdir -p "${!outputDev}/share"
-    moveToOutput "share/doc" "${!outputDev}"
-}
-
-_qtModuleMultioutDevsPost() {
-    # Move libtool archives and qmake project files to $dev/lib
-    if [ "z${!outputLib}" != "z${!outputDev}" ]; then
-        pushd "${!outputLib}"
-        if [ -d "lib" ]; then
-            find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \
-                while read -r -d $'\0' file; do
-                    mkdir -p "${!outputDev}/$(dirname "$file")"
-                    mv "${!outputLib}/$file" "${!outputDev}/$file"
-                done
-        fi
-        popd
-    fi
-}
-
-if [ -n "$NIX_QT_SUBMODULE" ]; then
-    preFixupHooks+=(_qtModuleMultioutDevsPre)
-    postFixupHooks+=(_qtModuleMultioutDevsPost)
-fi
diff --git a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh b/pkgs/development/libraries/qt-5/qmake-hook.sh
index 696b4ea8dad..696b4ea8dad 100644
--- a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh
+++ b/pkgs/development/libraries/qt-5/qmake-hook.sh