summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2016-04-26 14:20:32 -0500
committerThomas Tuegel <ttuegel@gmail.com>2016-04-30 12:20:09 -0500
commit97d9368471542388dd761a1a4654c52cd7ddbea7 (patch)
tree8203c396e53105a2aa112bfc7d91a997daa23e15 /pkgs/development/libraries
parentf67be473334dbc463c8cb6dd9b6579da720357e2 (diff)
qmakeHook: move libtool archives and qmake project files to $dev/lib
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/qt-5/5.5/default.nix1
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qmake-hook.sh11
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/default.nix13
3 files changed, 24 insertions, 1 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix
index 034e25662ea18..9cfc052e730e1 100644
--- a/pkgs/development/libraries/qt-5/5.5/default.nix
+++ b/pkgs/development/libraries/qt-5/5.5/default.nix
@@ -45,7 +45,6 @@ let
       nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig self.qmakeHook ];
 
       NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
-      dontFixLibtool = args.dontFixLibtool or true;
 
       outputs = args.outputs or [ "dev" "out" ];
       setOutputFlags = args.setOutputFlags or false;
diff --git a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh
index f059c19e03bb7..aa20779f4ec05 100644
--- a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh
+++ b/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh
@@ -53,6 +53,17 @@ _qtMultioutModuleDevs() {
     # The destination directory must exist or moveToOutput will do nothing
     mkdir -p "${!outputDev}/share"
     moveToOutput "share/doc" "${!outputDev}"
+
+    # Move libtool archives and qmake project files to $dev/lib
+    if [ "z${!outputLib}" != "z${!outputDev}" ]; then
+        pushd "${!outputLib}"
+        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
+        popd
+    fi
 }
 
 qmakeConfigurePhase() {
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
index 7d68116d71685..f8dd82c88226b 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
@@ -235,6 +235,19 @@ stdenv.mkDerivation {
   # freetype-2.5.4 changed signedness of some struct fields
   NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
 
+  preFixup = ''
+    # Move libtool archives and qmake projects
+    if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then
+        pushd "''${!outputLib}"
+        find lib -name '*.a' -o -name '*.la' -o -name '*.prl' | \
+            while read -r file; do
+                mkdir -p "''${!outputDev}/$(dirname "$file")"
+                mv "''${!outputLib}/$file" "''${!outputDev}/$file"
+            done
+        popd
+    fi
+  '';
+
   postFixup =
     ''
       # Don't retain build-time dependencies like gdb and ruby.