forked from mirrors/nixpkgs
Merge pull request #99401 from Ericson2314/cmake-optional-openssl
cmake: Tighten deps
This commit is contained in:
commit
e54f6b1fde
|
@ -5,6 +5,7 @@
|
||||||
, ps
|
, ps
|
||||||
, isBootstrap ? false
|
, isBootstrap ? false
|
||||||
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
|
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
|
||||||
|
, useOpenSSL ? !isBootstrap, openssl
|
||||||
, useNcurses ? false, ncurses
|
, useNcurses ? false, ncurses
|
||||||
, useQt4 ? false, qt4
|
, useQt4 ? false, qt4
|
||||||
, withQt5 ? false, qtbase
|
, withQt5 ? false, qtbase
|
||||||
|
@ -50,6 +51,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = []
|
buildInputs = []
|
||||||
++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ]
|
++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ]
|
||||||
|
++ lib.optional useOpenSSL openssl
|
||||||
++ lib.optional useNcurses ncurses
|
++ lib.optional useNcurses ncurses
|
||||||
++ lib.optional useQt4 qt4
|
++ lib.optional useQt4 qt4
|
||||||
++ lib.optional withQt5 qtbase;
|
++ 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_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_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_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.
|
# 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
|
# make install attempts to use the just-built cmake
|
||||||
preInstall = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
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;
|
dontUseCmakeConfigure = true;
|
||||||
|
|
|
@ -190,10 +190,7 @@ in rec {
|
||||||
|
|
||||||
stage1 = prevStage: let
|
stage1 = prevStage: let
|
||||||
persistent = self: super: with prevStage; {
|
persistent = self: super: with prevStage; {
|
||||||
cmake = super.cmake.override {
|
cmake = super.cmakeMinimal;
|
||||||
isBootstrap = true;
|
|
||||||
useSharedLibraries = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
python3 = super.python3Minimal;
|
python3 = super.python3Minimal;
|
||||||
|
|
||||||
|
|
|
@ -8326,9 +8326,7 @@ in
|
||||||
zssh = callPackage ../tools/networking/zssh { };
|
zssh = callPackage ../tools/networking/zssh { };
|
||||||
|
|
||||||
zstd = callPackage ../tools/compression/zstd {
|
zstd = callPackage ../tools/compression/zstd {
|
||||||
cmake = buildPackages.cmake.override {
|
cmake = buildPackages.cmakeMinimal;
|
||||||
libarchive = buildPackages.libarchive.override { zstd = null; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
zsync = callPackage ../tools/compression/zsync { };
|
zsync = callPackage ../tools/compression/zsync { };
|
||||||
|
@ -10859,6 +10857,10 @@ in
|
||||||
|
|
||||||
cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { };
|
cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { };
|
||||||
|
|
||||||
|
cmakeMinimal = libsForQt5.callPackage ../development/tools/build-managers/cmake {
|
||||||
|
isBootstrap = true;
|
||||||
|
};
|
||||||
|
|
||||||
cmakeCurses = cmake.override { useNcurses = true; };
|
cmakeCurses = cmake.override { useNcurses = true; };
|
||||||
|
|
||||||
cmakeWithGui = cmakeCurses.override { withQt5 = true; };
|
cmakeWithGui = cmakeCurses.override { withQt5 = true; };
|
||||||
|
|
Loading…
Reference in a new issue