Merge branch 'staging', containing closure-size #7701
This commit is contained in:
@@ -48,8 +48,8 @@ stdenv.mkDerivation {
|
||||
mkdir -p "$out"
|
||||
./install.sh "--prefix=$out"
|
||||
'' + (if stdenv.isLinux then ''
|
||||
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib}/lib" \
|
||||
patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
|
||||
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib.out}/lib" \
|
||||
"$out/bin/cargo"
|
||||
'' else "") + postInstall;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
propagatedBuildInputs = optional wantPS ps;
|
||||
|
||||
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
|
||||
|
||||
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":"
|
||||
(concatMap (p: [ p p.out ]) buildInputs);
|
||||
|
||||
configureFlags =
|
||||
"--docdir=/share/doc/${name} --mandir=/share/man --system-libs"
|
||||
+ stdenv.lib.optionalString useQt4 " --qt-gui";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
, bzip2, curl, expat, libarchive, xz, zlib
|
||||
, useNcurses ? false, ncurses, useQt4 ? false, qt4
|
||||
, wantPS ? false, ps ? null
|
||||
@@ -25,26 +25,34 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1yl0z422gr7zfc638chifv343vx0ig5gasvrh7nzf7b15488qgxp";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches =
|
||||
# Don't search in non-Nix locations such as /usr, but do search in
|
||||
# Nixpkgs' Glibc.
|
||||
optional (stdenv ? glibc) ./search-path-3.2.patch
|
||||
++ optional stdenv.isCygwin ./3.2.2-cygwin.patch;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
setOutputFlags = false;
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
buildInputs =
|
||||
[ bzip2 curl expat libarchive xz zlib ]
|
||||
[ setupHook pkgconfig bzip2 curl expat libarchive xz zlib ]
|
||||
++ optional useNcurses ncurses
|
||||
++ optional useQt4 qt4;
|
||||
|
||||
propagatedBuildInputs = optional wantPS ps;
|
||||
|
||||
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
|
||||
|
||||
preConfigure = with stdenv; optionalString (stdenv ? glibc)
|
||||
''
|
||||
fixCmakeFiles .
|
||||
substituteInPlace Modules/Platform/UnixPaths.cmake \
|
||||
--subst-var-by glibc_bin ${glibc.bin or glibc} \
|
||||
--subst-var-by glibc_dev ${glibc.dev or glibc} \
|
||||
--subst-var-by glibc_lib ${glibc.out or glibc}
|
||||
'';
|
||||
configureFlags =
|
||||
[ "--docdir=/share/doc/${name}"
|
||||
"--mandir=/share/man"
|
||||
"--no-system-jsoncpp"
|
||||
]
|
||||
++ optional (!stdenv.isCygwin) "--system-libs"
|
||||
@@ -52,22 +60,18 @@ stdenv.mkDerivation rec {
|
||||
++ ["--"]
|
||||
++ optional (!useNcurses) "-DBUILD_CursesDialog=OFF";
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
preConfigure = optionalString (stdenv ? glibc)
|
||||
''
|
||||
source $setupHook
|
||||
fixCmakeFiles .
|
||||
substituteInPlace Modules/Platform/UnixPaths.cmake \
|
||||
--subst-var-by glibc ${stdenv.glibc}
|
||||
'';
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
preInstall = ''mkdir "$doc" '';
|
||||
|
||||
postInstall = ''moveToOutput "share/cmake-*/Help" "$doc" '';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
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 ];
|
||||
platforms = if useQt4 then qt4.meta.platforms else platforms.all;
|
||||
maintainers = with maintainers; [ urkud mornfall ttuegel ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,21 +53,21 @@ index 20ee1d1..39834e6 100644
|
||||
-
|
||||
-list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
|
||||
- /usr/pkg/bin
|
||||
+ "@glibc@"
|
||||
+ "@glibc_bin@"
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
||||
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
|
||||
+ "@glibc@/lib"
|
||||
+ "@glibc_lib@/lib"
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
- /usr/include
|
||||
+ "@glibc@/include"
|
||||
+ "@glibc_dev@/include"
|
||||
)
|
||||
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
- /usr/include
|
||||
+ "@glibc@/include"
|
||||
+ "@glibc_dev@/include"
|
||||
)
|
||||
|
||||
# Enable use of lib64 search path variants by default.
|
||||
|
||||
@@ -13,7 +13,7 @@ fixCmakeFiles() {
|
||||
}
|
||||
|
||||
cmakeConfigurePhase() {
|
||||
eval "$preConfigure"
|
||||
runHook preConfigure
|
||||
|
||||
if [ -z "$dontFixCmake" ]; then
|
||||
fixCmakeFiles .
|
||||
@@ -53,10 +53,11 @@ cmakeConfigurePhase() {
|
||||
|
||||
cmake ${cmakeDir:-.} $cmakeFlags "${cmakeFlagsArray[@]}"
|
||||
|
||||
eval "$postConfigure"
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "$dontUseCmakeConfigure" -a -z "$configurePhase" ]; then
|
||||
setOutputFlags=
|
||||
configurePhase=cmakeConfigurePhase
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ stdenv.mkDerivation {
|
||||
./no-tty-name.patch
|
||||
];
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/make/;
|
||||
description = "A tool to control the generation of non-source files from sources";
|
||||
|
||||
Reference in New Issue
Block a user