nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix
Yury G. Kudryashov 48c13f4096 Update cmake
Use system libraries, make curses optional, add optional qt4 gui etc.

svn path=/nixpkgs/trunk/; revision=23810
2010-09-15 18:37:21 +00:00

37 lines
1 KiB
Nix

{fetchurl, stdenv, replace, curl, expat, zlib
, useNcurses ? false, ncurses, useQt4 ? false, qt4}:
stdenv.mkDerivation rec {
name = "cmake-${majorVersion}.1";
majorVersion = "2.8";
src = fetchurl {
url = "http://www.cmake.org/files/v${majorVersion}/${name}.tar.gz";
sha256 = "0hi28blqxvir0dkhln90sgr0m3ri9n2i3hlmwdl4m5vkfsmp9bky";
};
buildInputs = [ curl expat zlib ]
++ stdenv.lib.optional useNcurses ncurses
++ stdenv.lib.optional useQt4 qt4;
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
configureFlags =
"--docdir=/share/doc/${name} --mandir=/share/man --system-libs"
+ stdenv.lib.optionalString useQt4 " --qt-gui";
setupHook = ./setup-hook.sh;
postUnpack = ''
dontUseCmakeConfigure=1
source $setupHook
fixCmakeFiles $sourceRoot
'';
meta = {
homepage = http://www.cmake.org/;
description = "Cross-Platform Makefile Generator";
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.urkud ];
};
}