2010-09-15 20:37:21 +02:00
|
|
|
{fetchurl, stdenv, replace, curl, expat, zlib
|
|
|
|
, useNcurses ? false, ncurses, useQt4 ? false, qt4}:
|
2007-07-08 00:31:37 +02:00
|
|
|
|
2008-11-13 22:05:01 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2010-09-15 20:37:21 +02:00
|
|
|
name = "cmake-${majorVersion}.1";
|
2009-02-13 15:43:01 +01:00
|
|
|
|
2009-12-11 08:58:54 +01:00
|
|
|
majorVersion = "2.8";
|
2009-04-17 15:48:22 +02:00
|
|
|
|
2008-11-13 22:05:01 +01:00
|
|
|
src = fetchurl {
|
2009-04-17 15:48:22 +02:00
|
|
|
url = "http://www.cmake.org/files/v${majorVersion}/${name}.tar.gz";
|
2010-04-09 18:04:11 +02:00
|
|
|
sha256 = "0hi28blqxvir0dkhln90sgr0m3ri9n2i3hlmwdl4m5vkfsmp9bky";
|
2007-07-08 00:31:37 +02:00
|
|
|
};
|
2009-04-17 15:48:22 +02:00
|
|
|
|
2010-09-15 20:37:21 +02:00
|
|
|
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;
|
|
|
|
|
2009-02-13 15:43:01 +01:00
|
|
|
postUnpack = ''
|
|
|
|
dontUseCmakeConfigure=1
|
|
|
|
source $setupHook
|
|
|
|
fixCmakeFiles $sourceRoot
|
|
|
|
'';
|
2009-04-17 15:48:22 +02:00
|
|
|
|
2010-09-15 20:37:21 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.cmake.org/;
|
|
|
|
description = "Cross-Platform Makefile Generator";
|
2010-09-15 20:52:07 +02:00
|
|
|
platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.all;
|
2010-09-15 20:37:21 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.urkud ];
|
|
|
|
};
|
2007-07-08 00:31:37 +02:00
|
|
|
}
|