make cmake-3.2 the default version

This commit is contained in:
Thomas Tuegel 2015-03-22 17:00:46 -05:00
parent 6a6470b793
commit a910301e18
5 changed files with 57 additions and 47 deletions

View File

@ -11,7 +11,14 @@ stdenv.mkDerivation rec {
sha256 = "0ff1niks3y41gr6z13q9m391na70abqyi9rj4z3y2fz69cwm6sgz";
};
nativeBuildInputs = [ cmake python ];
nativeBuildInputs =
[
# cmake can be built with the system jsoncpp, or its own bundled version.
# Obviously we cannot build it against the system jsoncpp that doesn't yet exist, so
# we make a bootstrapping build with the bundled version.
(cmake.override { jsoncpp = null; })
python
];
meta = {
inherit version;

View File

@ -70,8 +70,7 @@ let
(with pkgs;
{
Boost = boost155;
cmake = cmake-3_2;
inherit epoxy;
inherit cmake epoxy;
GIF = giflib;
GLIB2 = glib;
Gpgme = gpgme;

View File

@ -1,14 +1,15 @@
{ stdenv, fetchurl
, bzip2, curl, expat, jsoncpp, libarchive, xz, zlib
, useNcurses ? false, ncurses, useQt4 ? false, qt4
{ stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2, libarchive
, useNcurses ? false, ncurses, useQt4 ? false, qt4, wantPS ? false, ps ? null
}:
with stdenv.lib;
assert wantPS -> (ps != null);
let
os = stdenv.lib.optionalString;
majorVersion = "3.2";
minorVersion = "1";
majorVersion = "2.8";
minorVersion = "12.2";
version = "${majorVersion}.${minorVersion}";
in
@ -19,15 +20,20 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz";
sha256 = "0b2hy4p0aa9zshlxyw9nmlh5q8q1lmnwmb594rvh6sx2n7v1r7vm";
sha256 = "0phf295a9cby0v7zqdswr238v5aiy3rb2fs6dz39zjxbmzlp8rcc";
};
enableParallelBuilding = true;
patches =
[(fetchpatch { # see http://www.cmake.org/Bug/view.php?id=13959
name = "FindFreetype-2.5.patch";
url = "http://www.cmake.org/Bug/file_download.php?file_id=4660&type=bug";
sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj";
})] ++
# Don't search in non-Nix locations such as /usr, but do search in
# Nixpkgs' Glibc.
optional (stdenv ? glibc) ./search-path-3.0.patch ++
# Nixpkgs' Glibc.
optional (stdenv ? glibc) ./search-path.patch ++
optional (stdenv ? cross) (fetchurl {
name = "fix-darwin-cross-compile.patch";
url = "http://public.kitware.com/Bug/file_download.php?"
@ -35,13 +41,14 @@ stdenv.mkDerivation rec {
sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv";
});
buildInputs =
[ bzip2 curl expat jsoncpp libarchive xz zlib ]
buildInputs = [ curl expat zlib bzip2 libarchive ]
++ optional useNcurses ncurses
++ optional useQt4 qt4;
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
propagatedBuildInputs = optional wantPS ps;
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
configureFlags =
"--docdir=/share/doc/${name} --mandir=/share/man --system-libs"
+ stdenv.lib.optionalString useQt4 " --qt-gui";
@ -54,14 +61,13 @@ stdenv.mkDerivation rec {
''
source $setupHook
fixCmakeFiles .
substituteInPlace Modules/Platform/UnixPaths.cmake \
--subst-var-by glibc ${stdenv.glibc}
substituteInPlace Modules/Platform/UnixPaths.cmake --subst-var-by glibc ${stdenv.glibc}
'';
meta = {
homepage = http://www.cmake.org/;
description = "Cross-Platform Makefile Generator";
platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.all;
maintainers = with stdenv.lib.maintainers; [ urkud mornfall ttuegel ];
maintainers = with stdenv.lib.maintainers; [ urkud mornfall ];
};
}

View File

@ -1,15 +1,14 @@
{ stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2, libarchive
, useNcurses ? false, ncurses, useQt4 ? false, qt4, wantPS ? false, ps ? null
{ stdenv, fetchurl
, bzip2, curl, expat, jsoncpp, libarchive, xz, zlib
, useNcurses ? false, ncurses, useQt4 ? false, qt4
}:
with stdenv.lib;
assert wantPS -> (ps != null);
let
os = stdenv.lib.optionalString;
majorVersion = "2.8";
minorVersion = "12.2";
majorVersion = "3.2";
minorVersion = "1";
version = "${majorVersion}.${minorVersion}";
in
@ -20,20 +19,15 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz";
sha256 = "0phf295a9cby0v7zqdswr238v5aiy3rb2fs6dz39zjxbmzlp8rcc";
sha256 = "0b2hy4p0aa9zshlxyw9nmlh5q8q1lmnwmb594rvh6sx2n7v1r7vm";
};
enableParallelBuilding = true;
patches =
[(fetchpatch { # see http://www.cmake.org/Bug/view.php?id=13959
name = "FindFreetype-2.5.patch";
url = "http://www.cmake.org/Bug/file_download.php?file_id=4660&type=bug";
sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj";
})] ++
# Don't search in non-Nix locations such as /usr, but do search in
# Nixpkgs' Glibc.
optional (stdenv ? glibc) ./search-path.patch ++
# Nixpkgs' Glibc.
optional (stdenv ? glibc) ./search-path-3.0.patch ++
optional (stdenv ? cross) (fetchurl {
name = "fix-darwin-cross-compile.patch";
url = "http://public.kitware.com/Bug/file_download.php?"
@ -41,17 +35,22 @@ stdenv.mkDerivation rec {
sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv";
});
buildInputs = [ curl expat zlib bzip2 libarchive ]
buildInputs =
[ bzip2 curl expat libarchive xz zlib ]
++ optional (jsoncpp != null) jsoncpp
++ optional useNcurses ncurses
++ optional useQt4 qt4;
propagatedBuildInputs = optional wantPS ps;
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
configureFlags =
"--docdir=/share/doc/${name} --mandir=/share/man --system-libs"
+ stdenv.lib.optionalString useQt4 " --qt-gui";
[
"--docdir=/share/doc/${name}"
"--mandir=/share/man"
"--system-libs"
]
++ optional (jsoncpp == null) "--no-system-jsoncpp"
++ optional useQt4 "--qt-gui";
setupHook = ./setup-hook.sh;
@ -61,13 +60,14 @@ stdenv.mkDerivation rec {
''
source $setupHook
fixCmakeFiles .
substituteInPlace Modules/Platform/UnixPaths.cmake --subst-var-by glibc ${stdenv.glibc}
substituteInPlace Modules/Platform/UnixPaths.cmake \
--subst-var-by glibc ${stdenv.glibc}
'';
meta = {
homepage = http://www.cmake.org/;
description = "Cross-Platform Makefile Generator";
platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.all;
maintainers = with stdenv.lib.maintainers; [ urkud mornfall ];
maintainers = with stdenv.lib.maintainers; [ urkud mornfall ttuegel ];
};
}

View File

@ -4910,12 +4910,12 @@ let
ctodo = callPackage ../applications/misc/ctodo { };
cmake = callPackage ../development/tools/build-managers/cmake {
cmake-2_8 = callPackage ../development/tools/build-managers/cmake/2.8.nix {
wantPS = stdenv.isDarwin;
ps = if stdenv.isDarwin then darwin.ps else null;
};
cmake-3_2 = callPackage ../development/tools/build-managers/cmake/3.2.nix {
cmake = callPackage ../development/tools/build-managers/cmake {
jsoncpp = jsoncpp-1_6;
};
cmake-3_0 = callPackage ../development/tools/build-managers/cmake/3.0.nix { };
@ -5728,7 +5728,7 @@ let
giblib = callPackage ../development/libraries/giblib { };
libgit2 = callPackage ../development/libraries/git2 { cmake = cmake-3_2; };
libgit2 = callPackage ../development/libraries/git2 {};
glew = callPackage ../development/libraries/glew { };
@ -10832,9 +10832,7 @@ let
kdeApps_14_12 = recurseIntoAttrs (callPackage ../applications/kde-apps-14.12 {
kf5 = kf57;
qt5 = qt54;
pkgs = pkgs // {
cmake = cmake-3_2;
};
inherit pkgs;
kde4 = kde4.override { inherit (kdeApps_14_12) kdelibs; };
});
kdeApps_stable = kdeApps_14_12;
@ -12830,9 +12828,9 @@ let
}) ../desktops/kde-4.14;
kdePackagesFor = self: dir:
let callPackageOrig = newScope { cmake = cmake-3_2; }; in
let callPackageOrig = newScope {}; in
let
callPackage = newScope (self // { cmake = cmake-3_2; });
callPackage = newScope self;
kde4 = callPackageOrig dir {
inherit callPackage callPackageOrig;
kdelibs = kdeApps_stable.kdelibs;