diff options
Diffstat (limited to 'pkgs/development/tools/build-managers')
13 files changed, 269 insertions, 338 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 6a25aef8b36a..e9f005f79917 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -1,11 +1,13 @@ { stdenv, lib, fetchurl, fetchpatch, runCommand, makeWrapper , jdk, zip, unzip, bash, writeCBin, coreutils , which, python, perl, gnused, gnugrep, findutils +# Apple dependencies +, cctools, clang, libcxx, CoreFoundation, CoreServices, Foundation +# Allow to independently override the jdks used to build and run respectively +, buildJdk ? jdk, runJdk ? jdk # Always assume all markers valid (don't redownload dependencies). # Also, don't clean up environment variables. , enableNixHacks ? false -# Apple dependencies -, cctools, clang, libcxx, CoreFoundation, CoreServices, Foundation }: let @@ -26,7 +28,7 @@ let in stdenv.mkDerivation rec { - version = "0.16.0"; + version = "0.17.1"; meta = with lib; { homepage = "https://github.com/bazelbuild/bazel/"; @@ -40,7 +42,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; - sha256 = "1ca9pncnj6v4r1kvgxys7607wpz4d2ic6g0i7lpsc2zg2qwmjc67"; + sha256 = "081z40vsxvw6ndiinik4pn09gxmv140k6l9zv93dgjr86qf2ir13"; }; sourceRoot = "."; @@ -87,6 +89,9 @@ stdenv.mkDerivation rec { # and linkers from Xcode instead of from PATH export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 + # Explicitly configure gcov since we don't have it on Darwin, so autodetection fails + export GCOV=${coreutils}/bin/false + # Framework search paths aren't added by bintools hook # https://github.com/NixOS/nixpkgs/pull/41914 export NIX_LDFLAGS="$NIX_LDFLAGS -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" @@ -95,6 +100,10 @@ stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/pull/41589 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1" + # 10.10 apple_sdk Foundation doesn't have type arguments on classes + # Remove this when we update apple_sdk + sed -i -e 's/<.*\*>//g' tools/osx/xcode_locator.m + # don't use system installed Xcode to run clang, use Nix clang instead sed -i -e "s;/usr/bin/xcrun clang;${clang}/bin/clang $NIX_CFLAGS_COMPILE $NIX_LDFLAGS -framework CoreFoundation;g" \ scripts/bootstrap/compile.sh \ @@ -152,7 +161,7 @@ stdenv.mkDerivation rec { + genericPatches; buildInputs = [ - jdk + buildJdk ]; nativeBuildInputs = [ @@ -190,7 +199,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin mv output/bazel $out/bin - wrapProgram "$out/bin/bazel" --set JAVA_HOME "${jdk}" + wrapProgram "$out/bin/bazel" --set JAVA_HOME "${runJdk}" mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions mv output/bazel-complete.bash $out/share/bash-completion/completions/bazel cp scripts/zsh_completion/_bazel $out/share/zsh/site-functions/ diff --git a/pkgs/development/tools/build-managers/bear/default.nix b/pkgs/development/tools/build-managers/bear/default.nix index fb12b5a9c14a..51e8d12d3147 100644 --- a/pkgs/development/tools/build-managers/bear/default.nix +++ b/pkgs/development/tools/build-managers/bear/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "bear-${version}"; - version = "2.3.12"; + version = "2.3.13"; src = fetchFromGitHub { owner = "rizsotto"; repo = "Bear"; rev = version; - sha256 = "1zzz2yiiny9pm4h6ayb82xzxc2j5djcpf8va2wagcw92m7w6miqw"; + sha256 = "0imvvs22gyr1v6ydgp5yn2nq8fb8llmz0ra1m733ikjaczl3jm7z"; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/tools/build-managers/cmake/2.8.nix b/pkgs/development/tools/build-managers/cmake/2.8.nix index 2cbc87a5267a..8ab6b2c13ead 100644 --- a/pkgs/development/tools/build-managers/cmake/2.8.nix +++ b/pkgs/development/tools/build-managers/cmake/2.8.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj"; })] ++ # Don't search in non-Nix locations such as /usr, but do search in our libc. - [ ./search-path.patch ] ++ + [ ./search-path-2.8.patch ] ++ optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchurl { name = "fix-darwin-cross-compile.patch"; url = "https://public.kitware.com/Bug/file_download.php?" diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/application-services.patch index 0ef710fa0195..c83f56ae5720 100644 --- a/pkgs/development/tools/build-managers/cmake/application-services.patch +++ b/pkgs/development/tools/build-managers/cmake/application-services.patch @@ -1,16 +1,15 @@ -diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx -index 2008a0b..5a3e8ee 100644 ---- a/Source/cmGlobalXCodeGenerator.cxx -+++ b/Source/cmGlobalXCodeGenerator.cxx +diff -ur cmake-3.12.1/Source/cmGlobalXCodeGenerator.cxx cmake-3.12.1-patched/Source/cmGlobalXCodeGenerator.cxx +--- cmake-3.12.1/Source/cmGlobalXCodeGenerator.cxx 2018-08-09 21:14:08.000000000 +0900 ++++ cmake-3.12.1-patched/Source/cmGlobalXCodeGenerator.cxx 2018-08-12 02:47:28.719691934 +0900 @@ -35,11 +35,6 @@ struct cmLinkImplementation; -#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(__APPLE__) --#define HAVE_APPLICATION_SERVICES --#include <ApplicationServices/ApplicationServices.h> +-# define HAVE_APPLICATION_SERVICES +-# include <ApplicationServices/ApplicationServices.h> -#endif - #if defined(CMAKE_BUILD_WITH_CMAKE) - #include "cmXMLParser.h" + # include "cmXMLParser.h" diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 81a1dd23f2e0..68d4118f0491 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,6 +1,5 @@ { stdenv, fetchurl, fetchpatch, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash -, majorVersion ? "3.11" # darwin attributes , ps , isBootstrap ? false @@ -15,27 +14,12 @@ assert useQt4 -> withQt5 == false; with stdenv.lib; -with ( - { - "3.11" = { - minorVersion = "2"; - sha256 = "0j2jpx94lnqx5w59i9xihl56hf6ghk04438rqhh7lk1bryxj5g2y"; - }; - "3.10" = { - minorVersion = "2"; - sha256 = "80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b"; - }; - "3.9" = { - minorVersion = "6"; - sha256 = "7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218"; - }; - - }.${majorVersion} - or (abort ''Unsupported configuration for cmake: majorVersion = "${majorVersion}";'') -); - let os = stdenv.lib.optionalString; + majorVersion = "3.12"; + minorVersion = "1"; + # from https://cmake.org/files/v3.12/cmake-3.12.1-SHA-256.txt + sha256 = "1ckswlaid3p2is1a80fmr4hgwpfsiif66giyx1z9ayhxx0n5qgf5"; version = "${majorVersion}.${minorVersion}"; in @@ -46,7 +30,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - # from https://cmake.org/files/v3.10/cmake-3.10.2-SHA-256.txt inherit sha256; }; @@ -55,16 +38,16 @@ stdenv.mkDerivation rec { --replace '"-framework CoreServices"' '""' ''; - # Don't search in non-Nix locations such as /usr, but do search in our libc. - patches = [ ./search-path-3.9.patch ] - ++ optional (versionOlder version "3.12") (fetchpatch { - name = "cmake-3.11-libuv-1.21.patch"; - url = https://gitlab.kitware.com/cmake/cmake/commit/889033b5c6847cf1f7bd789384405d59dc333bf6.patch; - sha256 = "0683zbyb3bicaxqzrj4wgdan6x08k30m20kkmpjvw30nr6a8r6xq"; - }) + patches = [ + # Don't search in non-Nix locations such as /usr, but do search in our libc. + ./search-path.patch + # Don't depend on frameworks. - ++ optional (useSharedLibraries && majorVersion == "3.11") ./application-services.patch # TODO: remove conditional - ++ optional stdenv.isCygwin ./3.2.2-cygwin.patch; + ./application-services.patch + + # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d + ./libuv-application-services.patch + ] ++ optional stdenv.isCygwin ./3.2.2-cygwin.patch; outputs = [ "out" ]; setOutputFlags = false; diff --git a/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch b/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch new file mode 100644 index 000000000000..08899f5c241f --- /dev/null +++ b/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch @@ -0,0 +1,83 @@ +diff -ur cmake-3.12.1/Utilities/cmlibuv/CMakeLists.txt cmake-3.12.1-patched/Utilities/cmlibuv/CMakeLists.txt +--- cmake-3.12.1/Utilities/cmlibuv/CMakeLists.txt 2018-08-09 21:14:08.000000000 +0900 ++++ cmake-3.12.1-patched/Utilities/cmlibuv/CMakeLists.txt 2018-08-13 10:14:53.000000000 +0900 +@@ -173,6 +173,22 @@ + src/unix/kqueue.c + src/unix/proctitle.c + ) ++ ++ include(CheckIncludeFile) ++ ++ check_include_file("ApplicationServices/ApplicationServices.h" HAVE_ApplicationServices) ++ if (HAVE_ApplicationServices) ++ list(APPEND uv_defines ++ HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H=1 ++ ) ++ endif() ++ ++ check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices) ++ if (HAVE_CoreServices) ++ list(APPEND uv_defines ++ HAVE_CORESERVICES_CORESERVICES_H=1 ++ ) ++ endif() + endif() + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") +diff -ur cmake-3.12.1/Utilities/cmlibuv/src/unix/darwin-proctitle.c cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/darwin-proctitle.c +--- cmake-3.12.1/Utilities/cmlibuv/src/unix/darwin-proctitle.c 2018-08-09 21:14:08.000000000 +0900 ++++ cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/darwin-proctitle.c 2018-08-13 10:01:29.000000000 +0900 +@@ -26,9 +26,7 @@ + #include <stdlib.h> + #include <string.h> + +-#include <TargetConditionals.h> +- +-#if !TARGET_OS_IPHONE ++#if HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H + # include <CoreFoundation/CoreFoundation.h> + # include <ApplicationServices/ApplicationServices.h> + #endif +@@ -58,7 +56,7 @@ + + + int uv__set_process_title(const char* title) { +-#if TARGET_OS_IPHONE ++#if !HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H + return uv__pthread_setname_np(title); + #else + CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef, +@@ -205,5 +203,5 @@ + dlclose(application_services_handle); + + return err; +-#endif /* !TARGET_OS_IPHONE */ ++#endif /* HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H */ + } +diff -ur cmake-3.12.1/Utilities/cmlibuv/src/unix/fsevents.c cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/fsevents.c +--- cmake-3.12.1/Utilities/cmlibuv/src/unix/fsevents.c 2018-08-09 21:14:08.000000000 +0900 ++++ cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/fsevents.c 2018-08-13 10:01:29.000000000 +0900 +@@ -21,7 +21,7 @@ + #include "uv.h" + #include "internal.h" + +-#if TARGET_OS_IPHONE ++#if !HAVE_CORESERVICES_CORESERVICES_H + + /* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */ + +@@ -38,7 +38,7 @@ + void uv__fsevents_loop_delete(uv_loop_t* loop) { + } + +-#else /* TARGET_OS_IPHONE */ ++#else /* !HAVE_CORESERVICES_CORESERVICES_H */ + + #include <dlfcn.h> + #include <assert.h> +@@ -916,4 +916,4 @@ + return 0; + } + +-#endif /* TARGET_OS_IPHONE */ ++#endif /* !HAVE_CORESERVICES_CORESERVICES_H */ diff --git a/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch b/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch new file mode 100644 index 000000000000..9fc949661686 --- /dev/null +++ b/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch @@ -0,0 +1,92 @@ +diff -ru3 cmake-2.8.12.2/Modules/Platform/Linux.cmake cmake-2.8.12.2-new/Modules/Platform/Linux.cmake +--- cmake-2.8.12.2/Modules/Platform/Linux.cmake 2014-01-16 21:15:08.000000000 +0400 ++++ cmake-2.8.12.2-new/Modules/Platform/Linux.cmake 2016-04-13 22:00:32.928575740 +0300 +@@ -36,22 +36,11 @@ + # checking the platform every time. This option is advanced enough + # that only package maintainers should need to adjust it. They are + # capable of providing a setting on the command line. +- if(EXISTS "/etc/debian_version") +- set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL +- "Install .so files without execute permission.") +- else() +- set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL +- "Install .so files without execute permission.") +- endif() ++ set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL ++ "Install .so files without execute permission.") + endif() + + # Match multiarch library directory names. + set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") + + include(Platform/UnixPaths) +- +-# Debian has lib64 paths only for compatibility so they should not be +-# searched. +-if(EXISTS "/etc/debian_version") +- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) +-endif() +diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake +--- cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake 2014-01-16 21:15:08.000000000 +0400 ++++ cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake 2016-04-14 00:09:10.106362636 +0300 +@@ -32,9 +32,6 @@ + # List common installation prefixes. These will be used for all + # search types. + list(APPEND CMAKE_SYSTEM_PREFIX_PATH +- # Standard +- /usr/local /usr / +- + # CMake install location + "${_CMAKE_INSTALL_DIR}" + +@@ -44,44 +41,26 @@ + + # List common include file locations not under the common prefixes. + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH +- # Windows API on Cygwin +- /usr/include/w32api +- +- # X11 +- /usr/X11R6/include /usr/include/X11 +- +- # Other +- /usr/pkg/include +- /opt/csw/include /opt/include +- /usr/openwin/include ++ @libc_dev@/include + ) + + list(APPEND CMAKE_SYSTEM_LIBRARY_PATH +- # Windows API on Cygwin +- /usr/lib/w32api +- +- # X11 +- /usr/X11R6/lib /usr/lib/X11 +- +- # Other +- /usr/pkg/lib +- /opt/csw/lib /opt/lib +- /usr/openwin/lib ++ @libc_lib@/lib + ) + + list(APPEND CMAKE_SYSTEM_PROGRAM_PATH +- /usr/pkg/bin ++ @libc_bin@/bin + ) + + list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES +- /lib /usr/lib /usr/lib32 /usr/lib64 ++ @libc_lib@/lib + ) + + list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES +- /usr/include ++ @libc_dev@/include + ) + list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES +- /usr/include ++ @libc_dev@/include + ) + + # Enable use of lib64 search path variants by default. diff --git a/pkgs/development/tools/build-managers/cmake/search-path-3.9.patch b/pkgs/development/tools/build-managers/cmake/search-path-3.9.patch deleted file mode 100644 index 6213138402b1..000000000000 --- a/pkgs/development/tools/build-managers/cmake/search-path-3.9.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -ur cmake-3.9.1/Modules/Platform/UnixPaths.cmake cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake ---- cmake-3.9.1/Modules/Platform/UnixPaths.cmake 2017-08-10 13:36:32.000000000 +0000 -+++ cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake 2017-09-03 01:24:31.901473539 +0000 -@@ -22,9 +22,6 @@ - # List common installation prefixes. These will be used for all - # search types. - list(APPEND CMAKE_SYSTEM_PREFIX_PATH -- # Standard -- /usr/local /usr / -- - # CMake install location - "${_CMAKE_INSTALL_DIR}" - ) -@@ -43,31 +40,26 @@ - - # Non "standard" but common install prefixes - list(APPEND CMAKE_SYSTEM_PREFIX_PATH -- /usr/X11R6 -- /usr/pkg -- /opt - ) - - # List common include file locations not under the common prefixes. - list(APPEND CMAKE_SYSTEM_INCLUDE_PATH -- # X11 -- /usr/include/X11 -+ @libc_dev@/include - ) - - list(APPEND CMAKE_SYSTEM_LIBRARY_PATH -- # X11 -- /usr/lib/X11 -+ @libc_lib@/lib - ) - - list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES -- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 -+ @libc_lib@/lib - ) - - list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES -- /usr/include -+ @libc_dev@/include - ) - list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES -- /usr/include -+ @libc_dev@/include - ) - - # Enable use of lib32 and lib64 search path variants by default. -diff -ur cmake-3.9.1/Modules/Platform/WindowsPaths.cmake cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake ---- cmake-3.9.1/Modules/Platform/WindowsPaths.cmake 2017-08-10 13:36:32.000000000 +0000 -+++ cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake 2017-09-03 01:19:32.808355986 +0000 -@@ -66,7 +66,7 @@ - - if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") - # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) -- list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) -+ # list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) - endif() - - list(APPEND CMAKE_SYSTEM_INCLUDE_PATH diff --git a/pkgs/development/tools/build-managers/cmake/search-path.patch b/pkgs/development/tools/build-managers/cmake/search-path.patch index 9fc949661686..6213138402b1 100644 --- a/pkgs/development/tools/build-managers/cmake/search-path.patch +++ b/pkgs/development/tools/build-managers/cmake/search-path.patch @@ -1,35 +1,7 @@ -diff -ru3 cmake-2.8.12.2/Modules/Platform/Linux.cmake cmake-2.8.12.2-new/Modules/Platform/Linux.cmake ---- cmake-2.8.12.2/Modules/Platform/Linux.cmake 2014-01-16 21:15:08.000000000 +0400 -+++ cmake-2.8.12.2-new/Modules/Platform/Linux.cmake 2016-04-13 22:00:32.928575740 +0300 -@@ -36,22 +36,11 @@ - # checking the platform every time. This option is advanced enough - # that only package maintainers should need to adjust it. They are - # capable of providing a setting on the command line. -- if(EXISTS "/etc/debian_version") -- set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL -- "Install .so files without execute permission.") -- else() -- set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL -- "Install .so files without execute permission.") -- endif() -+ set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL -+ "Install .so files without execute permission.") - endif() - - # Match multiarch library directory names. - set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") - - include(Platform/UnixPaths) -- --# Debian has lib64 paths only for compatibility so they should not be --# searched. --if(EXISTS "/etc/debian_version") -- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) --endif() -diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake ---- cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake 2014-01-16 21:15:08.000000000 +0400 -+++ cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake 2016-04-14 00:09:10.106362636 +0300 -@@ -32,9 +32,6 @@ +diff -ur cmake-3.9.1/Modules/Platform/UnixPaths.cmake cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake +--- cmake-3.9.1/Modules/Platform/UnixPaths.cmake 2017-08-10 13:36:32.000000000 +0000 ++++ cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake 2017-09-03 01:24:31.901473539 +0000 +@@ -22,9 +22,6 @@ # List common installation prefixes. These will be used for all # search types. list(APPEND CMAKE_SYSTEM_PREFIX_PATH @@ -38,45 +10,31 @@ diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Mod - # CMake install location "${_CMAKE_INSTALL_DIR}" + ) +@@ -43,31 +40,26 @@ -@@ -44,44 +41,26 @@ + # Non "standard" but common install prefixes + list(APPEND CMAKE_SYSTEM_PREFIX_PATH +- /usr/X11R6 +- /usr/pkg +- /opt + ) # List common include file locations not under the common prefixes. list(APPEND CMAKE_SYSTEM_INCLUDE_PATH -- # Windows API on Cygwin -- /usr/include/w32api -- - # X11 -- /usr/X11R6/include /usr/include/X11 -- -- # Other -- /usr/pkg/include -- /opt/csw/include /opt/include -- /usr/openwin/include +- /usr/include/X11 + @libc_dev@/include ) list(APPEND CMAKE_SYSTEM_LIBRARY_PATH -- # Windows API on Cygwin -- /usr/lib/w32api -- - # X11 -- /usr/X11R6/lib /usr/lib/X11 -- -- # Other -- /usr/pkg/lib -- /opt/csw/lib /opt/lib -- /usr/openwin/lib +- /usr/lib/X11 + @libc_lib@/lib ) - list(APPEND CMAKE_SYSTEM_PROGRAM_PATH -- /usr/pkg/bin -+ @libc_bin@/bin - ) - list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES -- /lib /usr/lib /usr/lib32 /usr/lib64 +- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 + @libc_lib@/lib ) @@ -89,4 +47,16 @@ diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Mod + @libc_dev@/include ) - # Enable use of lib64 search path variants by default. + # Enable use of lib32 and lib64 search path variants by default. +diff -ur cmake-3.9.1/Modules/Platform/WindowsPaths.cmake cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake +--- cmake-3.9.1/Modules/Platform/WindowsPaths.cmake 2017-08-10 13:36:32.000000000 +0000 ++++ cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake 2017-09-03 01:19:32.808355986 +0000 +@@ -66,7 +66,7 @@ + + if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") + # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) +- list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) ++ # list(APPEND CMAKE_SYSTEM_PREFIX_PATH /) + endif() + + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH diff --git a/pkgs/development/tools/build-managers/gn/default.nix b/pkgs/development/tools/build-managers/gn/default.nix index 399486c4d902..a273afd71580 100644 --- a/pkgs/development/tools/build-managers/gn/default.nix +++ b/pkgs/development/tools/build-managers/gn/default.nix @@ -1,107 +1,38 @@ -{ stdenv, lib, fetchgit, fetchzip, fetchpatch -, libevent, ninja, python, darwin }: +{ stdenv, lib, fetchgit, fetchzip, fetchpatch, darwin, writeText +, git, ninja, python }: let - depsGit = { - "tools/gn" = fetchgit { - url = "https://chromium.googlesource.com/chromium/src/tools/gn"; - rev = "0fa417a0d2d8484e9a5a636e3301da322f586601"; - sha256 = "0pigcl14yc4aak6q1ghfjxdz2ah4fg4m2r5y3asw2rz6mpr5y9z0"; - }; - "base" = fetchgit { - url = "https://chromium.googlesource.com/chromium/src/base"; - rev = "ab1d7c3b92ce9c9bc756bdefb8338360d1a33a1e"; - sha256 = "15wis6qg9ka62k6v1vamg0bp3v5vkpapg485jsn4bbfcaqp6di0f"; - }; - "build" = fetchgit { - url = "https://chromium.googlesource.com/chromium/src/build"; - rev = "8d44c08a4c9997695db8098198bdd5026bc7a6f9"; - sha256 = "19sajgf55xfmvnwvy2ss7g6pyljp751cfsws30w415m6m00lmpxl"; - }; - "config" = fetchgit { - url = "https://chromium.googlesource.com/chromium/src/build/config"; - rev = "14116c0cdcb9e28995ca8bb384a12e5c9dbd1dbb"; - sha256 = "04nif0lm4wcy05b7xhal023874s4r0iq067q57cgwdm72i2gml40"; - }; - "testing/gtest" = fetchgit { - url = "https://chromium.googlesource.com/chromium/testing/gtest"; - rev = "585ec31ea716f08233a815e680fc0d4699843938"; - sha256 = "0csn1cza66851nmxxiw42smsm3422mx67vcyykwn0a71lcjng6rc"; - }; - "third_party/apple_apsl" = fetchzip { - url = "https://chromium.googlesource.com/chromium/src/third_party/+archive/8e6ccb8c74db6dfa15dd21401ace3ac96c054cf7/apple_apsl.tar.gz"; - sha256 = "1vgcg741lwz84kdy0qc5wn9dxx3j9zh6a9d185fpygdsipwikqv8"; - stripRoot = false; - }; - "buildtools/third_party/libc++/trunk" = fetchgit { - url = "https://chromium.googlesource.com/chromium/llvm-project/libcxx"; - rev = "ece1de8658d749e19c12cacd4458cc330eca94e3"; - sha256 = "1nlyvfkzhchwv9b18bh82jcamqv3acj26ah9ajs31f2dql05amhg"; - }; - "buildtools/third_party/libc++abi/trunk" = fetchgit { - url = "https://chromium.googlesource.com/chromium/llvm-project/libcxxabi"; - rev = "52c7a3760aef1df328a9bc957f686410872f0dc0"; - sha256 = "1aam539j01381q27b7xhij18pz3h0lhw08hglvqq4hgvlqx5cn2s"; - }; - }; + rev = "106b823805adcc043b2bfe5bc21d58f160a28a7b"; + sha256 = "1a5s6i07s8l4f1bakh3fyaym00xz7zgd49sp6awm10xb7yjh95ba"; -in stdenv.mkDerivation rec { - name = "gn-${version}"; - version = "20180423"; - sourceRoot = "."; + shortRev = builtins.substring 0 7 rev; + lastCommitPosition = writeText "last_commit_position.h" '' + #ifndef OUT_LAST_COMMIT_POSITION_H_ + #define OUT_LAST_COMMIT_POSITION_H_ - unpackPhase = '' - ${lib.concatStringsSep "\n" ( - lib.mapAttrsToList (n: v: '' - mkdir -p $sourceRoot/${n} - if [ -d ${v} ]; then - cp -r ${v}/* $sourceRoot/${n} - else - mkdir -p $sourceRoot/${n} - pushd $sourceRoot/${n} - unpackFile ${v} - popd - fi - '') depsGit)} + #define LAST_COMMIT_POSITION "(${shortRev})" - chmod u+w -R $sourceRoot + #endif // OUT_LAST_COMMIT_POSITION_H_ ''; - patches = [ - (fetchpatch { - url = "https://raw.githubusercontent.com/Eloston/ungoogled-chromium/3375fbc7b865dafe1230431a1e3f9bffd27ec184/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch"; - sha256 = "1h8jgxznm7zrxlzb4wcfx4zx4lyvfrmpd0r7cd7h0s23wn8ibb3a"; - }) - ]; +in +stdenv.mkDerivation rec { + name = "gn-${version}"; + version = "20180830"; - postPatch = '' - # Disable libevent bootstrapping (we will provide it). - sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \ - tools/gn/bootstrap/bootstrap.py + src = fetchgit { + url = "https://gn.googlesource.com/gn"; + inherit rev sha256; + }; + postPatch = '' # FIXME Needed with old Apple SDKs substituteInPlace base/mac/foundation_util.mm \ --replace "NSArray<NSString*>*" "NSArray*" - substituteInPlace base/mac/sdk_forward_declarations.h \ - --replace "NSDictionary<VNImageOption, id>*" "NSDictionary*" \ - --replace "NSArray<VNRequest*>*" "NSArray*" \ - --replace "typedef NSString* VNImageOption NS_STRING_ENUM" "typedef NSString* VNImageOption" - - # Patch shebangs (for sandbox build) - patchShebangs build ''; - # FIXME again this shouldn't be necessary but I can't figure out a better way - NIX_CFLAGS_COMPILE = "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"; - - NIX_LDFLAGS = "-levent"; - - nativeBuildInputs = [ ninja python ]; - buildInputs = [ libevent ] - - # FIXME These dependencies shouldn't be needed but can't find a way - # around it. Chromium pulls this in while bootstrapping GN. - ++ lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + nativeBuildInputs = [ ninja python git ]; + buildInputs = lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ libobjc cctools @@ -109,25 +40,21 @@ in stdenv.mkDerivation rec { ApplicationServices Foundation AppKit - ImageCaptureCore - CoreBluetooth - IOBluetooth - CoreWLAN - Quartz - Cocoa ]); buildPhase = '' - python tools/gn/bootstrap/bootstrap.py -s + python build/gen.py --no-sysroot --no-last-commit-position + ln -s ${lastCommitPosition} out/last_commit_position.h + ninja -j $NIX_BUILD_CORES -C out gn ''; installPhase = '' - install -vD out/Release/gn "$out/bin/gn" + install -vD out/gn "$out/bin/gn" ''; meta = with lib; { description = "A meta-build system that generates NinjaBuild files"; - homepage = https://chromium.googlesource.com/chromium/src/tools/gn; + homepage = https://gn.googlesource.com/gn; license = licenses.bsd3; platforms = platforms.unix; maintainers = with maintainers; [ stesie matthewbauer ]; diff --git a/pkgs/development/tools/build-managers/nant/default.nix b/pkgs/development/tools/build-managers/nant/default.nix deleted file mode 100644 index c394d87e09ec..000000000000 --- a/pkgs/development/tools/build-managers/nant/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ stdenv, fetchFromGitHub, pkgconfig, mono, makeWrapper -, targetVersion ? "4.5" }: - -let - version = "2015-11-15"; - - src = fetchFromGitHub { - owner = "nant"; - repo = "nant"; - rev = "19bec6eca205af145e3c176669bbd57e1712be2a"; - sha256 = "11l5y76csn686p8i3kww9s0sxy659ny9l64krlqg3y2nxaz0fk6l"; - }; - - nant-bootstrapped = stdenv.mkDerivation { - name = "nant-bootstrapped-${version}"; - inherit src; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ mono makeWrapper ]; - - buildFlags = "bootstrap"; - - dontStrip = true; - - installPhase = '' - mkdir -p $out/lib/nant-bootstrap - cp -r bootstrap/* $out/lib/nant-bootstrap - - mkdir -p $out/bin - makeWrapper "${mono}/bin/mono" $out/bin/nant \ - --add-flags "$out/lib/nant-bootstrap/NAnt.exe" - ''; - }; - -in stdenv.mkDerivation { - name = "nant-${version}"; - inherit src; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ mono makeWrapper nant-bootstrapped ]; - - dontStrip = true; - - buildPhase = '' - nant -t:mono-${targetVersion} - ''; - - installPhase = '' - mkdir -p $out/lib/nant - cp -r build/mono-${targetVersion}.unix/nant-debug/bin/* $out/lib/nant/ - - mkdir -p $out/bin - makeWrapper "${mono}/bin/mono" $out/bin/nant \ - --add-flags "$out/lib/nant/NAnt.exe" - ''; - - meta = with stdenv.lib; { - homepage = http://nant.sourceforge.net; - description = "NAnt is a free .NET build tool"; - - longDescription = '' - NAnt is a free .NET build tool. In theory it is kind of like make without - make's wrinkles. In practice it's a lot like Ant. - ''; - - license = licenses.gpl2Plus; - maintainers = with maintainers; [ zohl ]; - platforms = platforms.linux; - }; -} - diff --git a/pkgs/development/tools/build-managers/pants/default.nix b/pkgs/development/tools/build-managers/pants/default.nix index 1ad52f327e15..02bf9c23cbac 100644 --- a/pkgs/development/tools/build-managers/pants/default.nix +++ b/pkgs/development/tools/build-managers/pants/default.nix @@ -17,6 +17,7 @@ in buildPythonApplication rec { prePatch = '' sed -E -i "s/'([[:alnum:].-]+)[=><][[:digit:]=><.,]*'/'\\1'/g" setup.py + substituteInPlace setup.py --replace "requests[security]<2.19,>=2.5.0" "requests[security]<2.20,>=2.5.0" ''; # Unnecessary, and causes some really weird behavior around .class files, which diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix index b5751a19455e..bbbbbf462ec8 100644 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ b/pkgs/development/tools/build-managers/sbt/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { name = "sbt-${version}"; - version = "1.2.1"; + version = "1.2.3"; src = fetchurl { urls = [ @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz" "https://cocl.us/sbt-${version}.tgz" ]; - sha256 = "1pyp98svh5x8b6yp5vfl0jhz8aysjm0dqvqf7znyb3l7knfqk726"; + sha256 = "1szyp9hgrvr3r5rhr98cn5mkhca1mr0qfs6cd8fiihm6hzjzn0nm"; }; patchPhase = '' |