3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #99401 from Ericson2314/cmake-optional-openssl

cmake: Tighten deps
This commit is contained in:
John Ericson 2020-10-13 22:13:13 -04:00 committed by GitHub
commit e54f6b1fde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 10 deletions

View file

@ -5,6 +5,7 @@
, ps
, isBootstrap ? false
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
, useOpenSSL ? !isBootstrap, openssl
, useNcurses ? false, ncurses
, useQt4 ? false, qt4
, withQt5 ? false, qtbase
@ -50,6 +51,7 @@ stdenv.mkDerivation rec {
buildInputs = []
++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ]
++ lib.optional useOpenSSL openssl
++ lib.optional useNcurses ncurses
++ lib.optional useQt4 qt4
++ lib.optional withQt5 qtbase;
@ -92,13 +94,15 @@ stdenv.mkDerivation rec {
"-DCMAKE_AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
"-DCMAKE_RANLIB=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
"-DCMAKE_STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
]
"-DCMAKE_USE_OPENSSL=${if useOpenSSL then "ON" else "OFF"}"
# Avoid depending on frameworks.
++ lib.optional (!useNcurses) "-DBUILD_CursesDialog=OFF";
"-DBUILD_CursesDialog=${if useNcurses then "ON" else "OFF"}"
];
# make install attempts to use the just-built cmake
preInstall = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i 's|bin/cmake|${buildPackages.cmake}/bin/cmake|g' Makefile
sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile
'';
dontUseCmakeConfigure = true;

View file

@ -190,10 +190,7 @@ in rec {
stage1 = prevStage: let
persistent = self: super: with prevStage; {
cmake = super.cmake.override {
isBootstrap = true;
useSharedLibraries = false;
};
cmake = super.cmakeMinimal;
python3 = super.python3Minimal;

View file

@ -8326,9 +8326,7 @@ in
zssh = callPackage ../tools/networking/zssh { };
zstd = callPackage ../tools/compression/zstd {
cmake = buildPackages.cmake.override {
libarchive = buildPackages.libarchive.override { zstd = null; };
};
cmake = buildPackages.cmakeMinimal;
};
zsync = callPackage ../tools/compression/zsync { };
@ -10859,6 +10857,10 @@ in
cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { };
cmakeMinimal = libsForQt5.callPackage ../development/tools/build-managers/cmake {
isBootstrap = true;
};
cmakeCurses = cmake.override { useNcurses = true; };
cmakeWithGui = cmakeCurses.override { withQt5 = true; };