summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorArmijn Hemel <armijn@gpl-violations.org>2009-12-24 09:49:35 +0000
committerArmijn Hemel <armijn@gpl-violations.org>2009-12-24 09:49:35 +0000
commitfaead7fa2e8b38fac4b1048d980ac17ff2ffd9af (patch)
treeeeb924326b52c5be7e4683a4e1ec43d47ff197ea /pkgs
parentf4e1fed89442531d30d84af16c78570ea6d60267 (diff)
downloadnixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.tar
nixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.tar.gz
nixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.tar.bz2
nixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.tar.lz
nixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.tar.xz
nixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.tar.zst
nixpkgs-faead7fa2e8b38fac4b1048d980ac17ff2ffd9af.zip
Qt 4.6
svn path=/nixpkgs/trunk/; revision=19089
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/qt-4.6/default.nix78
-rw-r--r--pkgs/development/libraries/qt-4.6/setup-hook.sh9
-rw-r--r--pkgs/top-level/all-packages.nix8
3 files changed, 95 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-4.6/default.nix b/pkgs/development/libraries/qt-4.6/default.nix
new file mode 100644
index 00000000000..d4fb0882049
--- /dev/null
+++ b/pkgs/development/libraries/qt-4.6/default.nix
@@ -0,0 +1,78 @@
+{ stdenv, fetchurl, lib
+, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu
+, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig
+, zlib, libjpeg, mysql, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib
+, buildDemos ? false, buildExamples ? false, keepDocumentation ? false}:
+
+stdenv.mkDerivation {
+  name = "qt-4.6.0";
+  
+  src = fetchurl {
+    url = ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.tar.gz;
+    sha256 = "12c5s9am0wd7a9fkpgizssv21hq17vra46j4ply3ixi46f0rq9am";
+  };
+  
+  setupHook = ./setup-hook.sh;
+  
+  propagatedBuildInputs = [
+    libXft 
+    libXrender 
+    libXrandr 
+    randrproto 
+    xextproto
+    libXinerama 
+    xineramaproto 
+    libXcursor 
+    zlib 
+    libjpeg 
+    mysql 
+    libpng 
+    which 
+    mesa
+    libXmu 
+    openssl 
+    dbus.libs 
+    cups 
+    pkgconfig 
+    libXext 
+    freetype 
+    fontconfig 
+    inputproto
+    fixesproto 
+    libXfixes 
+    glib 
+    libtiff
+  ];
+  
+  prefixKey = "-prefix ";
+
+  configureFlags = ''
+    -v -no-separate-debug-info -release
+    -system-zlib -system-libpng -system-libjpeg -fast
+    -qt-gif -confirm-license -opensource
+    -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql
+    -qdbus -cups -glib -xfixes -dbus-linked
+    -fontconfig -I${freetype}/include/freetype2
+    ${if buildDemos == true then "" else "-nomake demos"}
+    ${if buildExamples == true then "" else "-nomake examples"}
+  '';
+    
+  patchPhase = ''
+    substituteInPlace configure --replace /bin/pwd pwd
+    sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf
+  '';
+
+  # Remove the documentation: it takes up >= 130 MB, which is more
+  # than half of the installed size.  Ideally we should put this in a
+  # separate package (as well as the Qt Designer).
+  postInstall = ''
+    ${if keepDocumentation == false then "rm -rf $out/doc" else ""}
+  '';
+
+  meta = {
+    homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp;
+    description = "A cross-platform application framework for C++";
+    license = "GPL/LGPL";
+    maintainers = [ lib.maintainers.sander ];
+  };
+}
diff --git a/pkgs/development/libraries/qt-4.6/setup-hook.sh b/pkgs/development/libraries/qt-4.6/setup-hook.sh
new file mode 100644
index 00000000000..f9ecacbbb7d
--- /dev/null
+++ b/pkgs/development/libraries/qt-4.6/setup-hook.sh
@@ -0,0 +1,9 @@
+export QTDIR=@out@
+
+if [ -n "$includeAllQtDirs" ]; then
+  # This helps for g++, but not for moc. And no qt4 package should expect
+  # having all qt4 header files dirs into -I.
+  for d in @out@/include/*; do
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"
+  done
+fi
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ee6cb580f30..4798a98ef63 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4384,6 +4384,14 @@ let
     inherit (gnome) glib;
   };
 
+  qt46 = import ../development/libraries/qt-4.6 {
+    inherit fetchurl stdenv lib zlib libjpeg libpng which mysql mesa openssl cups dbus
+      fontconfig freetype pkgconfig libtiff;
+    inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
+      libXmu libXinerama xineramaproto libXcursor libXext
+      inputproto fixesproto libXfixes;
+    inherit (gnome) glib;
+  };
   qtscriptgenerator = import ../development/libraries/qtscriptgenerator {
     inherit stdenv fetchurl;
     qt4 = qt45;