diff options
Diffstat (limited to 'pkgs/development/tools/build-managers')
8 files changed, 99 insertions, 463 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/0.4.nix b/pkgs/development/tools/build-managers/bazel/0.4.nix index 7fa39ef21627..69f467f577c8 100644 --- a/pkgs/development/tools/build-managers/bazel/0.4.nix +++ b/pkgs/development/tools/build-managers/bazel/0.4.nix @@ -65,8 +65,9 @@ stdenv.mkDerivation rec { ]; buildPhase = '' + export TMPDIR=/tmp/.bazel-$UID ./compile.sh - ./output/bazel --output_user_root=/tmp/.bazel build //scripts:bash_completion \ + ./output/bazel --output_user_root=$TMPDIR/.bazel build //scripts:bash_completion \ --spawn_strategy=standalone \ --genrule_strategy=standalone cp bazel-bin/scripts/bazel-complete.bash output/ diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 112cd840a9f5..b59a93d37324 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -1,14 +1,32 @@ -{ stdenv, lib, writeText, writeScript, fetchurl, jdk, zip, unzip, bash, writeCBin, coreutils, binutils, makeWrapper, which, python, gnused +{ stdenv, lib, fetchurl, runCommand, makeWrapper +, jdk, zip, unzip, bash, writeCBin, coreutils +, which, python, gnused, gnugrep, findutils # 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 +, libcxx, CoreFoundation, CoreServices, Foundation }: +let + srcDeps = stdenv.lib.singleton ( + fetchurl { + url = "https://github.com/google/desugar_jdk_libs/archive/f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip"; + sha256 = "c80f3f3d442d8a6ca7adc83f90ecd638c3864087fdd6787ffac070b6f1cc8f9b"; + } + ); + + distDir = runCommand "bazel-deps" {} '' + mkdir -p $out + for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done + ''; + + defaultShellPath = lib.makeBinPath [ bash coreutils findutils gnugrep gnused which ]; + +in stdenv.mkDerivation rec { - version = "0.13.0"; + version = "0.15.1"; meta = with stdenv.lib; { homepage = "https://github.com/bazelbuild/bazel/"; @@ -22,7 +40,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; - sha256 = "143nd9dmw2x88azf8spinl2qnvw9m8lqlqc765l9q2v6hi807sc2"; + sha256 = "0v7wdwbxy4bcx488lm1glf4iv3wfdwbkg8fh6kmmmfn1lhgkaay6"; }; sourceRoot = "."; @@ -41,7 +59,7 @@ stdenv.mkDerivation rec { int main(int argc, char *argv[]) { char *path = getenv("PATH"); - char *pathToAppend = "${lib.makeBinPath [ coreutils gnused ]}"; + char *pathToAppend = "${defaultShellPath}"; char *newPath; if (path != NULL) { int length = strlen(path) + 1 + strlen(pathToAppend) + 1; @@ -56,396 +74,9 @@ stdenv.mkDerivation rec { } ''; - buildFile = writeText "BUILD" '' - package(default_visibility = ['//visibility:public']) - - filegroup(name = "empty") - - cc_toolchain_suite( - name = "nix", - toolchains = { - "darwin|compiler": ":nix_darwin_toolchain", - "k8|compiler": ":nix_linux_toolchain", - }, - ) - - cc_toolchain( - name = "nix_darwin_toolchain", - all_files = ":osx_wrapper", - compiler_files = ":osx_wrapper", - cpu = "darwin", - dwp_files = ":empty", - dynamic_runtime_libs = [":empty"], - linker_files = ":osx_wrapper", - objcopy_files = ":empty", - static_runtime_libs = [":empty"], - strip_files = ":empty", - supports_param_files = 0, - ) - - cc_toolchain( - name = "nix_linux_toolchain", - all_files = ":empty", - compiler_files = ":empty", - cpu = "k8", - dwp_files = ":empty", - dynamic_runtime_libs = [":empty"], - linker_files = ":empty", - objcopy_files = ":empty", - static_runtime_libs = [":empty"], - strip_files = ":empty", - supports_param_files = 0, - ) - - filegroup( - name = "osx_wrapper", - srcs = ["osx_cc_wrapper.sh"], - ) - ''; - - crosstoolFile = writeText "CROSSTOOL" ('' - major_version: "local" - minor_version: "" - default_target_cpu: "same_as_host" - '' + lib.optionalString stdenv.isDarwin '' - default_toolchain { - cpu: "darwin" - toolchain_identifier: "local_darwin" - } - toolchain { - abi_version: "local" - abi_libc_version: "local" - builtin_sysroot: "" - compiler: "compiler" - host_system_name: "local" - needsPic: true - target_libc: "macosx" - target_cpu: "darwin" - target_system_name: "local" - toolchain_identifier: "local_darwin" - - tool_path { name: "ar" path: "${cctools}/bin/libtool" } - tool_path { name: "compat-ld" path: "${cctools}/bin/ld" } - tool_path { name: "cpp" path: "${clang}/bin/cpp" } - tool_path { name: "dwp" path: "${coreutils}/bin/false" } - tool_path { name: "gcc" path: "osx_cc_wrapper.sh" } - cxx_flag: "-std=c++0x" - linker_flag: "-lstdc++" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" - linker_flag: "-headerpad_max_install_names" - # We know all files in `/nix/store` are immutable so it's safe to disable inclusion checks for them - cxx_builtin_include_directory: "/nix/store" - tool_path { name: "gcov" path: "${coreutils}/bin/false" } - tool_path { name: "ld" path: "${cctools}/bin/ld" } - tool_path { name: "nm" path: "${cctools}/bin/nm" } - tool_path { name: "objcopy" path: "${binutils}/bin/objcopy" } - objcopy_embed_flag: "-I" - objcopy_embed_flag: "binary" - tool_path { name: "objdump" path: "${binutils}/bin/objdump" } - tool_path { name: "strip" path: "${cctools}/bin/strip" } - - # Anticipated future default. - unfiltered_cxx_flag: "-no-canonical-prefixes" - - # Make C++ compilation deterministic. Use linkstamping instead of these - # compiler symbols. - unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" - unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" - unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" - unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" - - # Security hardening on by default. - # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases. - compiler_flag: "-D_FORTIFY_SOURCE=1" - compiler_flag: "-fstack-protector" - - # Enable coloring even if there's no attached terminal. Bazel removes the - # escape sequences if --nocolor is specified. - compiler_flag: "-fcolor-diagnostics" - - # All warnings are enabled. Maybe enable -Werror as well? - compiler_flag: "-Wall" - # Enable a few more warnings that aren't part of -Wall. - compiler_flag: "-Wthread-safety" - compiler_flag: "-Wself-assign" - - # Keep stack frames for debugging, even in opt mode. - compiler_flag: "-fno-omit-frame-pointer" - - # Anticipated future default. - linker_flag: "-no-canonical-prefixes" - - compilation_mode_flags { - mode: DBG - # Enable debug symbols. - compiler_flag: "-g" - } - compilation_mode_flags { - mode: OPT - # No debug symbols. - # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or even generally? - # However, that can't happen here, as it requires special handling in Bazel. - compiler_flag: "-g0" - - # Conservative choice for -O - # -O3 can increase binary size and even slow down the resulting binaries. - # Profile first and / or use FDO if you need better performance than this. - compiler_flag: "-O2" - - # Disable assertions - compiler_flag: "-DNDEBUG" - - # Removal of unused code and data at link time (can this increase binary size in some cases?). - compiler_flag: "-ffunction-sections" - compiler_flag: "-fdata-sections" - } - linking_mode_flags { mode: DYNAMIC } - } - '' + lib.optionalString stdenv.isLinux '' - default_toolchain { - cpu: "k8" - toolchain_identifier: "local_linux" - } - - toolchain { - abi_version: "local" - abi_libc_version: "local" - builtin_sysroot: "" - compiler: "compiler" - host_system_name: "local" - needsPic: true - supports_gold_linker: false - supports_incremental_linker: false - supports_fission: false - supports_interface_shared_objects: false - supports_normalizing_ar: false - supports_start_end_lib: false - target_libc: "local" - target_cpu: "k8" - target_system_name: "local" - toolchain_identifier: "local_linux" - - tool_path { name: "ar" path: "${binutils}/bin/ar" } - tool_path { name: "compat-ld" path: "${binutils}/bin/ld" } - tool_path { name: "cpp" path: "${stdenv.cc}/bin/cpp" } - tool_path { name: "dwp" path: "${coreutils}/bin/false" } - tool_path { name: "gcc" path: "${stdenv.cc}/bin/cc" } - cxx_flag: "-std=c++0x" - linker_flag: "-lstdc++" - # We know all files in `/nix/store` are immutable so it's safe to disable inclusion checks for them - cxx_builtin_include_directory: "/nix/store" - tool_path { name: "gcov" path: "${coreutils}/bin/false" } - - # C(++) compiles invoke the compiler (as that is the one knowing where - # to find libraries), but we provide LD so other rules can invoke the linker. - tool_path { name: "ld" path: "${binutils}/bin/ld" } - - tool_path { name: "nm" path: "${binutils}/bin/nm" } - tool_path { name: "objcopy" path: "${binutils}/bin/objcopy" } - objcopy_embed_flag: "-I" - objcopy_embed_flag: "binary" - tool_path { name: "objdump" path: "${binutils}/bin/objdump" } - tool_path { name: "strip" path: "${binutils}/bin/strip" } - - # Anticipated future default. - unfiltered_cxx_flag: "-no-canonical-prefixes" - unfiltered_cxx_flag: "-fno-canonical-system-headers" - - # Make C++ compilation deterministic. Use linkstamping instead of these - # compiler symbols. - unfiltered_cxx_flag: "-Wno-builtin-macro-redefined" - unfiltered_cxx_flag: "-D__DATE__=\"redacted\"" - unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\"" - unfiltered_cxx_flag: "-D__TIME__=\"redacted\"" - - # Security hardening on by default. - # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases. - # We need to undef it before redefining it as some distributions now have - # it enabled by default. - compiler_flag: "-U_FORTIFY_SOURCE" - compiler_flag: "-D_FORTIFY_SOURCE=1" - compiler_flag: "-fstack-protector" - linker_flag: "-Wl,-z,relro,-z,now" - - # Enable coloring even if there's no attached terminal. Bazel removes the - # escape sequences if --nocolor is specified. This isn't supported by gcc - # on Ubuntu 14.04. - # compiler_flag: "-fcolor-diagnostics" - - # All warnings are enabled. Maybe enable -Werror as well? - compiler_flag: "-Wall" - # Enable a few more warnings that aren't part of -Wall. - compiler_flag: "-Wunused-but-set-parameter" - # But disable some that are problematic. - compiler_flag: "-Wno-free-nonheap-object" # has false positives - - # Keep stack frames for debugging, even in opt mode. - compiler_flag: "-fno-omit-frame-pointer" - - # Anticipated future default. - linker_flag: "-no-canonical-prefixes" - # Have gcc return the exit code from ld. - linker_flag: "-pass-exit-codes" - # Gold linker only? Can we enable this by default? - # linker_flag: "-Wl,--warn-execstack" - # linker_flag: "-Wl,--detect-odr-violations" - - compilation_mode_flags { - mode: DBG - # Enable debug symbols. - compiler_flag: "-g" - } - compilation_mode_flags { - mode: OPT - - # No debug symbols. - # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or - # even generally? However, that can't happen here, as it requires special - # handling in Bazel. - compiler_flag: "-g0" - - # Conservative choice for -O - # -O3 can increase binary size and even slow down the resulting binaries. - # Profile first and / or use FDO if you need better performance than this. - compiler_flag: "-O2" - - # Disable assertions - compiler_flag: "-DNDEBUG" - - # Removal of unused code and data at link time (can this increase binary size in some cases?). - compiler_flag: "-ffunction-sections" - compiler_flag: "-fdata-sections" - linker_flag: "-Wl,--gc-sections" - } - linking_mode_flags { mode: DYNAMIC } - } - ''); - - osxCcWrapperFile = writeScript "osx_cc_wrapper.sh" (if stdenv.isDarwin then '' - #!${customBash}/bin/bash - # - # Copyright 2015 The Bazel Authors. All rights reserved. - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - # - # OS X relpath is not really working. This is a wrapper script around gcc - # to simulate relpath behavior. - # - # This wrapper uses install_name_tool to replace all paths in the binary - # (bazel-out/.../path/to/original/library.so) by the paths relative to - # the binary. It parses the command line to behave as rpath is supposed - # to work. - # - # See https://blogs.oracle.com/dipol/entry/dynamic_libraries_rpath_and_mac - # on how to set those paths for Mach-O binaries. - # - set -eu - - GCC="${clang}/bin/clang" - INSTALL_NAME_TOOL="${cctools}/bin/install_name_tool" - - LIBS= - LIB_DIRS= - RPATHS= - OUTPUT= - # let parse the option list - for i in "$@"; do - if [[ "''${OUTPUT}" = "1" ]]; then - OUTPUT=$i - elif [[ "$i" =~ ^-l(.*)$ ]]; then - LIBS="''${BASH_REMATCH[1]} $LIBS" - elif [[ "$i" =~ ^-L(.*)$ ]]; then - LIB_DIRS="''${BASH_REMATCH[1]} $LIB_DIRS" - elif [[ "$i" =~ ^-Wl,-rpath,\@loader_path/(.*)$ ]]; then - RPATHS="''${BASH_REMATCH[1]} ''${RPATHS}" - elif [[ "$i" = "-o" ]]; then - # output is coming - OUTPUT=1 - fi - done - - # Call gcc - ''${GCC} "$@" - - function get_library_path() { - for libdir in ''${LIB_DIRS}; do - if [ -f ''${libdir}/lib$1.so ]; then - echo "''${libdir}/lib$1.so" - elif [ -f ''${libdir}/lib$1.dylib ]; then - echo "''${libdir}/lib$1.dylib" - fi - done - } - - # A convenient method to return the actual path even for non symlinks - # and multi-level symlinks. - function get_realpath() { - local previous="$1" - local next=$(readlink "''${previous}") - while [ -n "''${next}" ]; do - previous="''${next}" - next=$(readlink "''${previous}") - done - echo "''${previous}" - } - - # Get the path of a lib inside a tool - function get_otool_path() { - # the lib path is the path of the original lib relative to the workspace - get_realpath $1 | sed 's|^.*/bazel-out/|bazel-out/|' - } - - # Do replacements in the output - for rpath in ''${RPATHS}; do - for lib in ''${LIBS}; do - unset libname - if [ -f "$(dirname ''${OUTPUT})/''${rpath}/lib''${lib}.so" ]; then - libname="lib''${lib}.so" - elif [ -f "$(dirname ''${OUTPUT})/''${rpath}/lib''${lib}.dylib" ]; then - libname="lib''${lib}.dylib" - fi - # ''${libname-} --> return $libname if defined, or undefined otherwise. This is to make - # this set -e friendly - if [[ -n "''${libname-}" ]]; then - libpath=$(get_library_path ''${lib}) - if [ -n "''${libpath}" ]; then - ''${INSTALL_NAME_TOOL} -change $(get_otool_path "''${libpath}") \ - "@loader_path/''${rpath}/''${libname}" "''${OUTPUT}" - fi - fi - done - done - '' else ""); - postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' export NIX_LDFLAGS="$NIX_LDFLAGS -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1" '' + '' - mkdir nix - cp ${buildFile} nix/BUILD - cp ${crosstoolFile} nix/CROSSTOOL - line=70 - for flag in $NIX_CFLAGS_COMPILE; do - sed -i -e "$line a compiler_flag: \"$flag\"" nix/CROSSTOOL - line=$((line + 1)) - done - for flag in $NIX_LDFLAGS; do - sed -i -e "$line a linker_flag: \"-Wl,$flag\"" nix/CROSSTOOL - line=$((line + 1)) - done - - cp ${osxCcWrapperFile} nix/osx_cc_wrapper.sh find src/main/java/com/google/devtools -type f -print0 | while IFS="" read -r -d "" path; do substituteInPlace "$path" \ --replace /bin/bash ${customBash}/bin/bash \ @@ -454,14 +85,27 @@ stdenv.mkDerivation rec { # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. substituteInPlace scripts/bootstrap/compile.sh \ --replace /bin/sh ${customBash}/bin/bash - sed -i -e "361 a --crosstool_top=//nix:nix --host_crosstool_top=//nix:nix \\\\" scripts/bootstrap/compile.sh + + echo "build --experimental_distdir=${distDir}" >> .bazelrc + echo "fetch --experimental_distdir=${distDir}" >> .bazelrc + echo "build --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\"" >> .bazelrc + echo "build --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\"" >> .bazelrc + echo "build --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\"" >> .bazelrc + echo "build --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\"" >> .bazelrc + sed -i -e "361 a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" scripts/bootstrap/compile.sh + sed -i -e "361 a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" scripts/bootstrap/compile.sh + sed -i -e "361 a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" scripts/bootstrap/compile.sh + sed -i -e "361 a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" scripts/bootstrap/compile.sh + + # --experimental_strict_action_env (which will soon become the + # default, see bazelbuild/bazel#2574) hardcodes the default + # action environment to a value that on NixOS at least is bogus. + # So we hardcode it to something useful. + substituteInPlace \ + src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java \ + --replace /bin:/usr/bin ${defaultShellPath} + patchShebangs . - '' + lib.optionalString stdenv.isDarwin '' - sed -i "s,/usr/bin/xcrun clang,clang $NIX_CFLAGS_COMPILE $NIX_LDFLAGS -framework CoreFoundation,g" \ - scripts/bootstrap/compile.sh \ - src/tools/xcode/realpath/BUILD \ - src/tools/xcode/stdredirect/BUILD \ - tools/osx/BUILD ''; buildInputs = [ @@ -469,26 +113,24 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ - gnused zip python unzip makeWrapper which customBash - ] ++ lib.optionals (stdenv.isDarwin) [ cctools clang libcxx CoreFoundation CoreServices Foundation ]; + ] ++ lib.optionals (stdenv.isDarwin) [ libcxx CoreFoundation CoreServices Foundation ]; # If TMPDIR is in the unpack dir we run afoul of blaze's infinite symlink # detector (see com.google.devtools.build.lib.skyframe.FileFunction). # Change this to $(mktemp -d) as soon as we figure out why. buildPhase = '' - export TMPDIR=/tmp + export TMPDIR=/tmp/.bazel-$UID ./compile.sh - ./output/bazel --output_user_root=/tmp/.bazel build //scripts:bash_completion \ + ./output/bazel --output_user_root=$TMPDIR/.bazel build //scripts:bash_completion \ --spawn_strategy=standalone \ - --genrule_strategy=standalone \ - --crosstool_top=//nix:nix --host_crosstool_top=//nix:nix + --genrule_strategy=standalone cp bazel-bin/scripts/bazel-complete.bash output/ ''; @@ -498,7 +140,6 @@ stdenv.mkDerivation rec { checkPhase = '' export TEST_TMPDIR=$(pwd) ./output/bazel test --test_output=errors \ - --crosstool_top=//nix:nix --host_crosstool_top=//nix:nix \ examples/cpp:hello-success_test \ examples/java-native/src/test/java/com/example/myproject:hello ''; @@ -515,7 +156,7 @@ stdenv.mkDerivation rec { # Save paths to hardcoded dependencies so Nix can detect them. postFixup = '' mkdir -p $out/nix-support - echo "${customBash} ${gnused} ${coreutils}" > $out/nix-support/depends + echo "${customBash} ${defaultShellPath}" > $out/nix-support/depends ''; dontStrip = true; diff --git a/pkgs/development/tools/build-managers/cask/default.nix b/pkgs/development/tools/build-managers/cask/default.nix deleted file mode 100644 index 234dab99c03c..000000000000 --- a/pkgs/development/tools/build-managers/cask/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ emacsPackagesNg, writeScriptBin }: -let - - emacs = emacsPackagesNg.emacsWithPackages (epkgs: [ epkgs.cask-package-toolset ]); - cpt = emacsPackagesNg.cask-package-toolset; - -in writeScriptBin "cask" '' -#!/bin/sh - -exec ${emacs}/bin/emacs --script ${cpt}/share/emacs/site-lisp/elpa/cask-package-toolset-${cpt.version}/cask-package-toolset.el -- "$@" -'' diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 438aa81a9d0a..ed0928febe29 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig +{ stdenv, fetchurl, fetchpatch, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash , majorVersion ? "3.11" # darwin attributes @@ -57,6 +57,11 @@ stdenv.mkDerivation rec { # 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"; + }) # Don't depend on frameworks. ++ optional (useSharedLibraries && majorVersion == "3.11") ./application-services.patch # TODO: remove conditional ++ optional stdenv.isCygwin ./3.2.2-cygwin.patch; diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index d80769bf210b..9ff32f1b3484 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -20,12 +20,12 @@ let newPython = python.override { }; in newPython.pkgs.buildPythonApplication rec { - version = "1.5.1"; + version = "1.5.2"; pname = "conan"; src = newPython.pkgs.fetchPypi { inherit pname version; - sha256 = "1b0iym41fpgv8vwbyys5hrh87pvh3hy2m9c01ybm72z2ki2pwxim"; + sha256 = "0r5ymq27j60py1fb396zshq7z6adda34a857lwrj3k8hqhs0ihpp"; }; postPatch = '' diff --git a/pkgs/development/tools/build-managers/doit/default.nix b/pkgs/development/tools/build-managers/doit/default.nix index e6ec8c2a80ce..c6ed406840d2 100644 --- a/pkgs/development/tools/build-managers/doit/default.nix +++ b/pkgs/development/tools/build-managers/doit/default.nix @@ -22,10 +22,10 @@ in python3Packages.buildPythonApplication { doCheck = false; checkPhase = "py.test"; - meta = { + meta = with stdenv.lib; { homepage = http://pydoit.org/; description = "A task management & automation tool"; - license = stdenv.lib.licenses.mit; + license = licenses.mit; longDescription = '' doit is a modern open-source build-tool written in python designed to be simple to use and flexible to deal with complex @@ -33,6 +33,7 @@ in python3Packages.buildPythonApplication { custom work-flows where there is no out-of-the-box solution available. ''; - platforms = stdenv.lib.platforms.all; + maintainers = with maintainers; [ pSub ]; + platforms = platforms.all; }; } diff --git a/pkgs/development/tools/build-managers/rebar3/default.nix b/pkgs/development/tools/build-managers/rebar3/default.nix index 04555f58884b..ff6dc07ea9e9 100644 --- a/pkgs/development/tools/build-managers/rebar3/default.nix +++ b/pkgs/development/tools/build-managers/rebar3/default.nix @@ -3,19 +3,19 @@ tree, fetchFromGitHub, hexRegistrySnapshot }: let - version = "3.4.3"; + version = "3.6.1"; bootstrapper = ./rebar3-nix-bootstrap; erlware_commons = fetchHex { pkg = "erlware_commons"; - version = "1.0.0"; - sha256 = "0wkphbrjk19lxdwndy92v058qwcaz13bcgdzp33h21aa7vminzx7"; + version = "1.2.0"; + sha256 = "149kkn9gc9cjgvlmakygq475r63q2rry31s29ax0s425dh37sfl7"; }; ssl_verify_fun = fetchHex { pkg = "ssl_verify_fun"; - version = "1.1.2"; - sha256 = "0qdyx70v09fydv4wzz1djnkixqj62ny40yjjhv2q6mh47lns2arj"; + version = "1.1.3"; + sha256 = "1zljxashfhqmiscmf298vhr880ppwbgi2rl3nbnyvsfn0mjhw4if"; }; certifi = fetchHex { pkg = "certifi"; @@ -24,23 +24,23 @@ let }; providers = fetchHex { pkg = "providers"; - version = "1.6.0"; - sha256 = "0byfa1h57n46jilz4q132j0vk3iqc0v1vip89li38gb1k997cs0g"; + version = "1.7.0"; + sha256 = "19p4rbsdx9lm2ihgvlhxyld1q76kxpd7qwyqxxsgmhl5r8ln3rlb"; }; getopt = fetchHex { pkg = "getopt"; - version = "0.8.2"; - sha256 = "1xw30h59zbw957cyjd8n50hf9y09jnv9dyry6x3avfwzcyrnsvkk"; + version = "1.0.1"; + sha256 = "174mb46c2qd1f4a7507fng4vvscjh1ds7rykfab5rdnfp61spqak"; }; bbmustache = fetchHex { pkg = "bbmustache"; - version = "1.3.0"; - sha256 = "042pfgss8kscq6ssg8gix8ccmdsrx0anjczsbrn2a6c36ljrx2p6"; + version = "1.5.0"; + sha256 = "0xg3r4lxhqifrv32nm55b4zmkflacc1s964g15p6y6jfx6v4y1zd"; }; relx = fetchHex { pkg = "relx"; - version = "3.23.1"; - sha256 = "13j7wds2d7b8v3r9pwy3zhwhzywgwhn6l9gm3slqzyrs1jld0a9d"; + version = "3.26.0"; + sha256 = "1f810rb01kdidpa985s321ycg3y4hvqpzbk263n6i1bfnqykkvv9"; }; cf = fetchHex { pkg = "cf"; @@ -49,13 +49,13 @@ let }; cth_readable = fetchHex { pkg = "cth_readable"; - version = "1.3.0"; - sha256 = "1s7bqj6f2zpbyjmbfq2mm6vcz1jrxjr2nd0531wshsx6fnshqhvs"; + version = "1.4.2"; + sha256 = "1pjid4f60pp81ds01rqa6ybksrnzqriw3aibilld1asn9iabxkav"; }; eunit_formatters = fetchHex { pkg = "eunit_formatters"; - version = "0.3.1"; - sha256 = "0cg9dasv60v09q3q4wja76pld0546mhmlpb0khagyylv890hg934"; + version = "0.5.0"; + sha256 = "1jb3hzb216r29x2h4pcjwfmx1k81431rgh5v0mp4x5146hhvmj6n"; }; rebar3_hex = fetchHex { pkg = "rebar3_hex"; @@ -70,7 +70,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://github.com/rebar/rebar3/archive/${version}.tar.gz"; - sha256 = "1a05gpxxc3mx5v33kzpb5xnq5vglmjl0q8hrcvpinjlazcwbg531"; + sha256 = "0cqhqymzh10pfyxqiy4hcg3d2myz3chx0y4m2ixmq8zk81acics0"; }; inherit bootstrapper; @@ -121,6 +121,6 @@ stdenv.mkDerivation { ''; platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.gleber ]; + maintainers = with stdenv.lib.maintainers; [ gleber tazjin ]; }; } diff --git a/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch b/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch index db45827f5831..59004561126c 100644 --- a/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch +++ b/pkgs/development/tools/build-managers/rebar3/hermetic-rebar3.patch @@ -1,5 +1,5 @@ diff --git a/bootstrap b/bootstrap -index 7c56bab..16c1be5 100755 +index 5dedd713..864056c4 100755 --- a/bootstrap +++ b/bootstrap @@ -101,7 +101,7 @@ extract(Binary) -> @@ -12,9 +12,8 @@ index 7c56bab..16c1be5 100755 [{body_format, binary}], rebar) of diff --git a/src/rebar_hermeticity.erl b/src/rebar_hermeticity.erl -new file mode 100644 -index 0000000..8f6cc7d ---- /dev/null +index e69de29b..8f6cc7d0 100644 +--- a/src/rebar_hermeticity.erl +++ b/src/rebar_hermeticity.erl @@ -0,0 +1,42 @@ +%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- @@ -60,20 +59,20 @@ index 0000000..8f6cc7d + ?ERROR("Request: ~p ~s", [Method, Url]), + erlang:halt(1). diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl -index d588f24..9ac8ad4 100644 +index 2cf167ee..6080aaca 100644 --- a/src/rebar_pkg_resource.erl +++ b/src/rebar_pkg_resource.erl -@@ -109,7 +109,7 @@ make_vsn(_) -> +@@ -127,7 +127,7 @@ make_vsn(_) -> request(Url, ETag) -> - HttpOptions = [{ssl, ssl_opts(Url)}, {relaxed, true} | rebar_utils:get_proxy_auth()], - -- case httpc:request(get, {Url, [{"if-none-match", ETag} || ETag =/= false]++[{"User-Agent", rebar_utils:user_agent()}]}, -+ case rebar_hermeticity:request(get, {Url, [{"if-none-match", ETag} || ETag =/= false]++[{"User-Agent", rebar_utils:user_agent()}]}, - HttpOptions, - [{body_format, binary}], - rebar) of + HttpOptions = [{ssl, ssl_opts(Url)}, + {relaxed, true} | rebar_utils:get_proxy_auth()], +- case httpc:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""} ++ case rebar_hermeticity:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""} + || ETag =/= false] ++ + [{"User-Agent", rebar_utils:user_agent()}]}, + HttpOptions, [{body_format, binary}], rebar) of diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl -index a019c5a..697cbab 100644 +index 17446311..4d44d794 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -38,6 +38,8 @@ init(State) -> @@ -85,17 +84,17 @@ index a019c5a..697cbab 100644 do(State) -> try case rebar_packages:registry_dir(State) of -@@ -52,7 +54,7 @@ do(State) -> - case rebar_utils:url_append_path(CDN, ?REMOTE_REGISTRY_FILE) of +@@ -53,7 +55,7 @@ do(State) -> {ok, Url} -> + HttpOptions = [{relaxed, true} | rebar_utils:get_proxy_auth()], ?DEBUG("Fetching registry from ~p", [Url]), - case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, + case rebar_hermeticity:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, - [], [{stream, TmpFile}, {sync, true}], + HttpOptions, [{stream, TmpFile}, {sync, true}], rebar) of {ok, saved_to_file} -> -@@ -76,6 +78,7 @@ do(State) -> - ?DEBUG("Error creating package index: ~p ~p", [C, erlang:get_stacktrace()]), +@@ -77,6 +79,7 @@ do(State) -> + ?DEBUG("Error creating package index: ~p ~p", [C, S]), throw(?PRV_ERROR(package_index_write)) end. +-endif. |