diff --git a/pkgs/development/libraries/qt-4/default.nix b/pkgs/development/libraries/qt-4/default.nix index 09427e2f63b3..426be3ef38a7 100644 --- a/pkgs/development/libraries/qt-4/default.nix +++ b/pkgs/development/libraries/qt-4/default.nix @@ -1,13 +1,15 @@ args: with args; + stdenv.mkDerivation { - name = "qt-4.4.0"; + name = "qt-4.4.3"; src = fetchurl { - url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.4.0.tar.bz2; - sha256 = "871dc71c6c905212f2fea7e6598362114a3b6097c220b0b251f8d159ee7d706e"; + url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.4.3.tar.bz2; + sha256 = "1nfdf1aj6vb7qyacsnjyjxrnaf44hz7vzykf6zra2znd87pglz51"; }; - setupHook = ./setup-hook.sh; + setupHook = ./setup-hook.sh; + propagatedBuildInputs = [ libXft libXrender @@ -37,14 +39,25 @@ stdenv.mkDerivation { glib libtiff ]; + prefixKey = "-prefix "; - configureFlags = " + + configureFlags = '' -v -no-separate-debug-info -release -system-zlib -system-libpng -system-libjpeg -fast -qt-gif -confirm-license -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql -qdbus -cups -glib -xfixes - -fontconfig -I${freetype}/include/freetype2"; + -fontconfig -I${freetype}/include/freetype2 + ''; - patchPhase = "sed -e 's@/bin/pwd@pwd@' -i configure; sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf"; + patchPhase = '' + substituteInPlace configure --replace /bin/pwd pwd + sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf + ''; + + meta = { + homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp; + description = "A cross-platform application framework for C++"; + }; } diff --git a/pkgs/development/libraries/qt-4/setup-hook.sh b/pkgs/development/libraries/qt-4/setup-hook.sh index c999124b8efa..36dfabb942c7 100644 --- a/pkgs/development/libraries/qt-4/setup-hook.sh +++ b/pkgs/development/libraries/qt-4/setup-hook.sh @@ -1,6 +1,7 @@ export QTDIR=@out@ + if [ -n $qt4BadIncludes ]; then - for d in @out@/include/*; do - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"; - done; + for d in @out@/include/*; do + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"; + done; fi diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index ba91271835e4..349d38f90550 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -256,6 +256,7 @@ rec { optionalString = cond: string: if cond then string else ""; + # Return the second argument if the first one is true or the empty version # of the second argument. ifEnable = cond: val: @@ -266,6 +267,7 @@ rec { else if (val == true || val == false) then false else null; + # Return a list of integers from `first' up to and including `last'. range = first: last: if builtins.lessThan last first @@ -284,7 +286,7 @@ rec { logicalOR = x: y: x || y; logicalAND = x: y: x && y; - + # Input : attrSet, [ [name default] ... ], name # Output : its value or default. getValue = attrSet: argList: name: diff --git a/pkgs/tools/system/which/default.nix b/pkgs/tools/system/which/default.nix index 7420cce0e543..3721c0f0be1a 100644 --- a/pkgs/tools/system/which/default.nix +++ b/pkgs/tools/system/which/default.nix @@ -1,12 +1,16 @@ -{stdenv, fetchurl, readline}: stdenv.mkDerivation { +{stdenv, fetchurl, readline}: + +stdenv.mkDerivation { name = "which-2.20"; + src = fetchurl { url = mirror://gnu/which/which-2.20.tar.gz; sha256 = "1y2p50zadb36izzh2zw4dm5hvdiydqf3qa88l8kav20dcmfbc5yl"; }; buildInputs = [readline]; + + meta = { + homepage = http://ftp.gnu.org/gnu/which/; + }; } - - -