cmake: format, cleanup
This commit is contained in:
parent
09c573b5b0
commit
9e3ca9d8ee
@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "cmake"
|
pname = "cmake"
|
||||||
+ lib.optionalString isBootstrap "-boot"
|
+ lib.optionalString isBootstrap "-boot"
|
||||||
+ lib.optionalString useNcurses "-cursesUI"
|
+ lib.optionalString useNcurses "-cursesUI"
|
||||||
+ lib.optionalString withQt5 "-qt5UI";
|
+ lib.optionalString withQt5 "-qt5UI";
|
||||||
version = "3.19.7";
|
version = "3.19.7";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -48,8 +48,7 @@ stdenv.mkDerivation rec {
|
|||||||
++ lib.optionals buildDocs [ texinfo ]
|
++ lib.optionals buildDocs [ texinfo ]
|
||||||
++ lib.optionals withQt5 [ wrapQtAppsHook ];
|
++ lib.optionals withQt5 [ wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = []
|
buildInputs = lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ]
|
||||||
++ lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ]
|
|
||||||
++ lib.optional useOpenSSL openssl
|
++ lib.optional useOpenSSL openssl
|
||||||
++ lib.optional useNcurses ncurses
|
++ lib.optional useNcurses ncurses
|
||||||
++ lib.optional withQt5 qtbase;
|
++ lib.optional withQt5 qtbase;
|
||||||
@ -62,27 +61,24 @@ stdenv.mkDerivation rec {
|
|||||||
--subst-var-by libc_bin ${lib.getBin stdenv.cc.libc} \
|
--subst-var-by libc_bin ${lib.getBin stdenv.cc.libc} \
|
||||||
--subst-var-by libc_dev ${lib.getDev stdenv.cc.libc} \
|
--subst-var-by libc_dev ${lib.getDev stdenv.cc.libc} \
|
||||||
--subst-var-by libc_lib ${lib.getLib stdenv.cc.libc}
|
--subst-var-by libc_lib ${lib.getLib stdenv.cc.libc}
|
||||||
''
|
# CC_FOR_BUILD and CXX_FOR_BUILD are used to bootstrap cmake
|
||||||
# CC_FOR_BUILD and CXX_FOR_BUILD are used to bootstrap cmake
|
|
||||||
+ ''
|
|
||||||
configureFlags="--parallel=''${NIX_BUILD_CORES:-1} CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD $configureFlags"
|
configureFlags="--parallel=''${NIX_BUILD_CORES:-1} CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD $configureFlags"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--docdir=share/doc/${pname}${version}"
|
"--docdir=share/doc/${pname}${version}"
|
||||||
] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
|
] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
|
||||||
++ lib.optional withQt5 "--qt-gui"
|
++ lib.optional withQt5 "--qt-gui"
|
||||||
++ lib.optionals buildDocs [
|
++ lib.optionals buildDocs [
|
||||||
"--sphinx-build=${sphinx}/bin/sphinx-build"
|
"--sphinx-build=${sphinx}/bin/sphinx-build"
|
||||||
"--sphinx-man"
|
"--sphinx-man"
|
||||||
"--sphinx-info"
|
"--sphinx-info"
|
||||||
]
|
]
|
||||||
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
|
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
|
||||||
++ lib.optionals stdenv.hostPlatform.is32bit [
|
++ lib.optionals stdenv.hostPlatform.is32bit [
|
||||||
"CFLAGS=-D_FILE_OFFSET_BITS=64"
|
"CFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||||
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
|
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||||
]
|
] ++ [
|
||||||
++ [
|
|
||||||
"--"
|
"--"
|
||||||
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||||
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
|
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
|
||||||
@ -117,8 +113,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://cmake.org/";
|
homepage = "https://cmake.org/";
|
||||||
changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/"
|
changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/release/${lib.versions.majorMinor version}.html";
|
||||||
+ "release/${lib.versions.majorMinor version}.html";
|
|
||||||
description = "Cross-Platform Makefile Generator";
|
description = "Cross-Platform Makefile Generator";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
CMake is an open-source, cross-platform family of tools designed to
|
CMake is an open-source, cross-platform family of tools designed to
|
||||||
|
Loading…
Reference in New Issue
Block a user