diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/development/tools/build-managers | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/tools/build-managers')
124 files changed, 11441 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/alibuild/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/alibuild/default.nix new file mode 100644 index 000000000000..ad9813cde6fb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/alibuild/default.nix @@ -0,0 +1,24 @@ +{ lib, python}: + +python.pkgs.buildPythonApplication rec { + pname = "alibuild"; + version = "1.5.5"; + + src = python.pkgs.fetchPypi { + inherit pname version; + sha256 = "1sh02avpab4qlyin3p928xw91l4fgs8x5x2rzl623ayqsnfjv19j"; + }; + + doCheck = false; + propagatedBuildInputs = [ + python.pkgs.requests + python.pkgs.pyyaml + ]; + + meta = with lib; { + homepage = "https://alisw.github.io/alibuild/"; + description = "Build tool for ALICE experiment software"; + license = licenses.gpl3; + maintainers = with maintainers; [ ktf ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-ant/1.9.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-ant/1.9.nix new file mode 100644 index 000000000000..49f8435b3773 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-ant/1.9.nix @@ -0,0 +1,112 @@ +{ fetchurl, stdenv, coreutils, makeWrapper }: + +let version = "1.9.15"; in + +stdenv.mkDerivation { + pname = "ant"; + inherit version; + + buildInputs = [ makeWrapper ]; + + src = fetchurl { + url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2"; + sha256 = "0yfx5qsvrg12lar4908ndbnlpppy7g7qk8ay41y4sz9g873v07mr"; + }; + + contrib = fetchurl { + url = "mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2"; + sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1"; + }; + + installPhase = + '' + mkdir -p $out/bin $out/lib/ant + mv * $out/lib/ant/ + + # Get rid of the manual (35 MiB). Maybe we should put this in a + # separate output. Keep the antRun script since it's vanilla sh + # and needed for the <exec/> task (but since we set ANT_HOME to + # a weird value, we have to move antRun to a weird location). + # Get rid of the other Ant scripts since we provide our own. + mv $out/lib/ant/bin/antRun $out/bin/ + rm -rf $out/lib/ant/{manual,bin,WHATSNEW} + mkdir $out/lib/ant/bin + mv $out/bin/antRun $out/lib/ant/bin/ + + # Install ant-contrib. + unpackFile $contrib + cp -p ant-contrib/ant-contrib-*.jar $out/lib/ant/lib/ + + cat >> $out/bin/ant <<EOF + #! ${stdenv.shell} -e + + ANT_HOME=$out/lib/ant + + # Find the JDK by looking for javac. As a fall-back, find the + # JRE by looking for java. The latter allows just the JRE to be + # used with (say) ECJ as the compiler. Finally, allow the GNU + # JVM. + if [ -z "\''${JAVA_HOME-}" ]; then + for i in javac java gij; do + if p="\$(type -p \$i)"; then + export JAVA_HOME="\$(${coreutils}/bin/dirname \$(${coreutils}/bin/dirname \$(${coreutils}/bin/readlink -f \$p)))" + break + fi + done + if [ -z "\''${JAVA_HOME-}" ]; then + echo "\$0: cannot find the JDK or JRE" >&2 + exit 1 + fi + fi + + if [ -z \$NIX_JVM ]; then + if [ -e \$JAVA_HOME/bin/java ]; then + NIX_JVM=\$JAVA_HOME/bin/java + elif [ -e \$JAVA_HOME/bin/gij ]; then + NIX_JVM=\$JAVA_HOME/bin/gij + else + NIX_JVM=java + fi + fi + + LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH" + + exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \ + -Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \ + org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \ + -cp "\$CLASSPATH" "\$@" + EOF + + chmod +x $out/bin/ant + ''; # */ + + meta = { + homepage = "http://ant.apache.org/"; + description = "A Java-based build tool"; + + longDescription = '' + Apache Ant is a Java-based build tool. In theory, it is kind of like + Make, but without Make's wrinkles. + + Why another build tool when there is already make, gnumake, nmake, jam, + and others? Because all those tools have limitations that Ant's + original author couldn't live with when developing software across + multiple platforms. Make-like tools are inherently shell-based -- they + evaluate a set of dependencies, then execute commands not unlike what + you would issue in a shell. This means that you can easily extend + these tools by using or writing any program for the OS that you are + working on. However, this also means that you limit yourself to the + OS, or at least the OS type such as Unix, that you are working on. + + Ant is different. Instead of a model where it is extended with + shell-based commands, Ant is extended using Java classes. Instead of + writing shell commands, the configuration files are XML-based, calling + out a target tree where various tasks get executed. Each task is run + by an object that implements a particular Task interface. + ''; + + license = stdenv.lib.licenses.asl20; + maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix new file mode 100644 index 000000000000..b0411090fbe5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix @@ -0,0 +1,112 @@ +{ fetchurl, stdenv, coreutils, makeWrapper }: + +let version = "1.10.8"; in + +stdenv.mkDerivation { + pname = "ant"; + inherit version; + + buildInputs = [ makeWrapper ]; + + src = fetchurl { + url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2"; + sha256 = "0zh94csb2hl6ir2ccn18ps506mjgh3mffnrb8wpsmp1x5fcykha5"; + }; + + contrib = fetchurl { + url = "mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2"; + sha256 = "1l8say86bz9gxp4yy777z7nm4j6m905pg342li1aphc14p5grvwn"; + }; + + installPhase = + '' + mkdir -p $out/bin $out/lib/ant + mv * $out/lib/ant/ + + # Get rid of the manual (35 MiB). Maybe we should put this in a + # separate output. Keep the antRun script since it's vanilla sh + # and needed for the <exec/> task (but since we set ANT_HOME to + # a weird value, we have to move antRun to a weird location). + # Get rid of the other Ant scripts since we provide our own. + mv $out/lib/ant/bin/antRun $out/bin/ + rm -rf $out/lib/ant/{manual,bin,WHATSNEW} + mkdir $out/lib/ant/bin + mv $out/bin/antRun $out/lib/ant/bin/ + + # Install ant-contrib. + unpackFile $contrib + cp -p ant-contrib/ant-contrib-*.jar $out/lib/ant/lib/ + + cat >> $out/bin/ant <<EOF + #! ${stdenv.shell} -e + + ANT_HOME=$out/lib/ant + + # Find the JDK by looking for javac. As a fall-back, find the + # JRE by looking for java. The latter allows just the JRE to be + # used with (say) ECJ as the compiler. Finally, allow the GNU + # JVM. + if [ -z "\''${JAVA_HOME-}" ]; then + for i in javac java gij; do + if p="\$(type -p \$i)"; then + export JAVA_HOME="\$(${coreutils}/bin/dirname \$(${coreutils}/bin/dirname \$(${coreutils}/bin/readlink -f \$p)))" + break + fi + done + if [ -z "\''${JAVA_HOME-}" ]; then + echo "\$0: cannot find the JDK or JRE" >&2 + exit 1 + fi + fi + + if [ -z \$NIX_JVM ]; then + if [ -e \$JAVA_HOME/bin/java ]; then + NIX_JVM=\$JAVA_HOME/bin/java + elif [ -e \$JAVA_HOME/bin/gij ]; then + NIX_JVM=\$JAVA_HOME/bin/gij + else + NIX_JVM=java + fi + fi + + LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH" + + exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \ + -Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \ + org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \ + -cp "\$CLASSPATH" "\$@" + EOF + + chmod +x $out/bin/ant + ''; # */ + + meta = { + homepage = "http://ant.apache.org/"; + description = "A Java-based build tool"; + + longDescription = '' + Apache Ant is a Java-based build tool. In theory, it is kind of like + Make, but without Make's wrinkles. + + Why another build tool when there is already make, gnumake, nmake, jam, + and others? Because all those tools have limitations that Ant's + original author couldn't live with when developing software across + multiple platforms. Make-like tools are inherently shell-based -- they + evaluate a set of dependencies, then execute commands not unlike what + you would issue in a shell. This means that you can easily extend + these tools by using or writing any program for the OS that you are + working on. However, this also means that you limit yourself to the + OS, or at least the OS type such as Unix, that you are working on. + + Ant is different. Instead of a model where it is extended with + shell-based commands, Ant is extended using Java classes. Instead of + writing shell commands, the configuration files are XML-based, calling + out a target tree where various tasks get executed. Each task is run + by an object that implements a particular Task interface. + ''; + + license = stdenv.lib.licenses.asl20; + maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-maven/builder.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-maven/builder.sh new file mode 100644 index 000000000000..dcc38b9ec74a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-maven/builder.sh @@ -0,0 +1,18 @@ +source $stdenv/setup + +unpackPhase + +mkdir -p $out/maven +cp -r $name/* $out/maven + +makeWrapper $out/maven/bin/mvn $out/bin/mvn --set-default JAVA_HOME "$jdk" +makeWrapper $out/maven/bin/mvnDebug $out/bin/mvnDebug --set-default JAVA_HOME "$jdk" + +# Add the maven-axis and JIRA plugin by default when using maven 1.x +if [ -e $out/maven/bin/maven ] +then + export OLD_HOME=$HOME + export HOME=. + $out/maven/bin/maven plugin:download -DgroupId=maven-plugins -DartifactId=maven-axis-plugin -Dversion=0.7 + export HOME=OLD_HOME +fi diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-maven/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-maven/default.nix new file mode 100644 index 000000000000..83260cbc1860 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/apache-maven/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, jdk, makeWrapper }: + +assert jdk != null; + +let version = "3.6.3"; in +stdenv.mkDerivation rec { + pname = "apache-maven"; + inherit version; + + builder = ./builder.sh; + + src = fetchurl { + url = "mirror://apache/maven/maven-3/${version}/binaries/${pname}-${version}-bin.tar.gz"; + sha256 = "1i9qlj3vy4j1yyf22nwisd0pg88n9qzp9ymfhwqabadka7br3b96"; + }; + + buildInputs = [ makeWrapper ]; + + inherit jdk; + + meta = with stdenv.lib; { + description = "Build automation tool (used primarily for Java projects)"; + homepage = "http://maven.apache.org/"; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = with maintainers; [ cko ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/arpa2cm/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/arpa2cm/default.nix new file mode 100644 index 000000000000..ef3062c6ca50 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/arpa2cm/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "arpa2cm"; + version = "0.5"; + + src = fetchFromGitHub { + sha256 = "093h7njj8d8iiwnw5byfxkkzlbny60fwv1w57j8f1lsd4yn6rih4"; + rev = "version-${version}"; + repo = pname; + owner = "arpa2"; + }; + + buildInputs = [ cmake ]; + + meta = with stdenv.lib; { + description = "CMake Module library for the ARPA2 project"; + license = licenses.bsd2; + maintainers = with maintainers; [ leenaars ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bam/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bam/default.nix new file mode 100644 index 000000000000..969cd9879746 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bam/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, lua5_3, python }: + +stdenv.mkDerivation rec { + pname = "bam"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "matricks"; + repo = "bam"; + rev = "v${version}"; + sha256 = "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6"; + }; + + buildInputs = [ lua5_3 python ]; + + buildPhase = ''${stdenv.shell} make_unix.sh''; + + checkPhase = ''${python.interpreter} scripts/test.py''; + + installPhase = '' + mkdir -p "$out/share/bam" + cp -r docs examples tests "$out/share/bam" + mkdir -p "$out/bin" + cp bam "$out/bin" + ''; + + meta = with stdenv.lib; { + description = "Yet another build manager"; + maintainers = with maintainers; + [ + raskin + ]; + platforms = platforms.linux; + license = licenses.zlib; + downloadPage = "http://matricks.github.com/bam/"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bash-tools-test.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bash-tools-test.nix new file mode 100644 index 000000000000..b67a5ab22341 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bash-tools-test.nix @@ -0,0 +1,44 @@ +{ writeText, bazel, runLocal, bazelTest, distDir }: + +# Tests that certain executables are available in bazel-executed bash shells. + +let + WORKSPACE = writeText "WORKSPACE" '' + workspace(name = "our_workspace") + ''; + + fileIn = writeText "input.txt" '' + one + two + three + ''; + + fileBUILD = writeText "BUILD" '' + genrule( + name = "tool_usage", + srcs = [ ":input.txt" ], + outs = [ "output.txt" ], + cmd = "cat $(location :input.txt) | gzip - | gunzip - | awk '/t/' > $@", + ) + ''; + + workspaceDir = runLocal "our_workspace" {} '' + mkdir $out + cp ${WORKSPACE} $out/WORKSPACE + cp ${fileIn} $out/input.txt + cp ${fileBUILD} $out/BUILD + ''; + + testBazel = bazelTest { + name = "bazel-test-bash-tools"; + bazelPkg = bazel; + inherit workspaceDir; + + bazelScript = '' + ${bazel}/bin/bazel build :tool_usage --distdir=${distDir} + cp bazel-bin/output.txt $out + echo "Testing content" && [ "$(cat $out | wc -l)" == "2" ] && echo "OK" + ''; + }; + +in testBazel diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix new file mode 100644 index 000000000000..4cde308b8359 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix @@ -0,0 +1,90 @@ +{ buildBazelPackage +, cacert +, fetchFromGitHub +, git +, go +, stdenv +}: + +buildBazelPackage rec { + name = "bazel-remote-${version}"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "buchgr"; + repo = "bazel-remote"; + rev = "v${version}"; + sha256 = "1fpdw139d5q1377qnqbgkahmdr4mdaa17d2m10wkyvyvijwm4r2m"; + }; + + nativeBuildInputs = [ go git ]; + + bazelTarget = "//:bazel-remote"; + + removeRulesCC = false; + + # this is to work around `test -f` failing when called by gazelle + # https://github.com/bazelbuild/bazel-gazelle/blob/v0.19.1/internal/go_repository.bzl#L135 + patches = [ ./disable_build_file_generation.patch ]; + + fetchAttrs = { + preBuild = '' + patchShebangs . + + # tell rules_go to use the Go binary found in the PATH + sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE + + # tell rules_go to invoke GIT with custom CAINFO path + export GIT_SSL_CAINFO="${cacert}/etc/ssl/certs/ca-bundle.crt" + + # force gazelle to use the nix go cache rather than its own + # export GO_REPOSITORY_USE_HOST_CACHE=1 + ''; + + preInstall = '' + # Remove the go_sdk (it's just a copy of the go derivation) and all + # references to it from the marker files. Bazel does not need to download + # this sdk because we have patched the WORKSPACE file to point to the one + # currently present in PATH. Without removing the go_sdk from the marker + # file, the hash of it will change anytime the Go derivation changes and + # that would lead to impurities in the marker files which would result in + # a different sha256 for the fetch phase. + rm -rf $bazelOut/external/{go_sdk,\@go_sdk.marker} + sed -e '/^FILE:@go_sdk.*/d' -i $bazelOut/external/\@*.marker + + # Remove the gazelle repository cache as it contains built binaries + chmod -R u+w $bazelOut/external/bazel_gazelle_go_repository_cache + rm -rf $bazelOut/external/{bazel_gazelle_go_repository_cache,\@bazel_gazelle_go_repository_cache.marker} + sed -e '/^FILE:@bazel_gazelle_go_repository_cache.*/d' -i $bazelOut/external/\@*.marker + + # Remove the gazelle tools, they contain go binaries that are built + # non-deterministically. As long as the gazelle version matches the tools + # should be equivalent. + rm -rf $bazelOut/external/{bazel_gazelle_go_repository_tools,\@bazel_gazelle_go_repository_tools.marker} + sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker + ''; + + sha256 = "1m7fmb03lirffxx04ck73bn5zwaji7zdwhlqq8s1c6pgp755d3vi"; + }; + + buildAttrs = { + preBuild = '' + patchShebangs . + + # tell rules_go to use the Go binary found in the PATH + sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE + ''; + + installPhase = '' + install -Dm755 bazel-bin/*_pure_stripped/bazel-remote $out/bin/bazel-remote + ''; + }; + + meta = with stdenv.lib; { + homepage = "https://github.com/buchgr/bazel-remote"; + description = "A remote HTTP/1.1 cache for Bazel"; + license = licenses.asl20; + maintainers = [ maintainers.uri-canva ]; + platforms = platforms.darwin ++ platforms.linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel-remote/disable_build_file_generation.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel-remote/disable_build_file_generation.patch new file mode 100644 index 000000000000..67df8f559a20 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel-remote/disable_build_file_generation.patch @@ -0,0 +1,24 @@ +From 3f5abd591b93ebdbc1ae82e5c29cf26024222f5f Mon Sep 17 00:00:00 2001 +From: Uri Baghin <uri@canva.com> +Date: Thu, 30 Jan 2020 16:47:36 +1100 +Subject: [PATCH] Disable build file generation for remote apis. + +--- + WORKSPACE | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/WORKSPACE b/WORKSPACE +index f9ebafa..52e4e0b 100644 +--- a/WORKSPACE ++++ b/WORKSPACE +@@ -208,6 +208,7 @@ http_archive( + + go_repository( + name = "com_github_bazelbuild_remote_apis", ++ build_file_generation = "off", + importpath = "github.com/bazelbuild/remote-apis", + sum = "h1:OPH+hf+ICw8WEp2CV2ncfdyWPC30Cmw8b5NKun0n5IQ=", + version = "v0.0.0-20191119143007-b5123b1bb285", +-- +2.25.0 + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix new file mode 100644 index 000000000000..2ec244e502bf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix @@ -0,0 +1,388 @@ +{ stdenv, callPackage, lib, fetchurl, fetchpatch, runCommand, makeWrapper +, zip, unzip, bash, writeCBin, coreutils +, which, python, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils +# Apple dependencies +, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation +# Allow to independently override the jdks used to build and run respectively +, buildJdk, runJdk +, buildJdkName +, runtimeShell +# Always assume all markers valid (don't redownload dependencies). +# Also, don't clean up environment variables. +, enableNixHacks ? false +}: + +let + srcDeps = [ + # From: $REPO_ROOT/WORKSPACE + (fetchurl { + url = "https://github.com/google/desugar_jdk_libs/archive/915f566d1dc23bc5a8975320cd2ff71be108eb9c.zip"; + sha256 = "0b926df7yxyyyiwm9cmdijy6kplf0sghm23sf163zh8wrk87wfi7"; + }) + (fetchurl { + url = "https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz"; + sha256 = "4a1318fed4831697b83ce879b3ab70ae09592b167e5bda8edaff45132d1c3b3f"; + }) + (fetchurl { + url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz"; + sha256 = "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52"; + }) + (fetchurl { + url = "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz"; + sha256 = "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898"; + }) + (fetchurl { + url = "https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.1/java_tools_javac10_linux-v3.1.zip"; + sha256 = "a0cd51f9db1bf05a722ff7f5c60a07fa1c7d27428fff0815c342d32aa6c53576"; + }) + (fetchurl { + url = "https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.1/java_tools_javac10_darwin-v3.1.zip"; + sha256 = "c646aad8808b8ec5844d6a80a1287fc8e13203375fe40d6af4819eff48b9bbaf"; + }) + (fetchurl { + url = "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v1.0.zip"; + sha256 = "cc470e529fafb6165b5be3929ff2d99b38429b386ac100878687416603a67889"; + }) + (fetchurl { + url = "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip"; + sha256 = "9b72bb0aea72d7cbcfc82a01b1e25bf3d85f791e790ddec16c65e2d906382ee0"; + }) + (fetchurl { + url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.2.tar.gz"; + sha256 = "04f85f2dd049e87805511e3babc5cea3f5e72332b1627e34f3a5461cc38e815f"; + }) + ]; + + distDir = runCommand "bazel-deps" {} '' + mkdir -p $out + for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done + ''; + + defaultShellPath = lib.makeBinPath + # Keep this list conservative. For more exotic tools, prefer to use + # @rules_nixpkgs to pull in tools from the nix repository. Example: + # + # WORKSPACE: + # + # nixpkgs_git_repository( + # name = "nixpkgs", + # revision = "def5124ec8367efdba95a99523dd06d918cb0ae8", + # ) + # + # # This defines an external Bazel workspace. + # nixpkgs_package( + # name = "bison", + # repositories = { "nixpkgs": "@nixpkgs//:default.nix" }, + # ) + # + # some/BUILD.bazel: + # + # genrule( + # ... + # cmd = "$(location @bison//:bin/bison) -other -args", + # tools = [ + # ... + # "@bison//:bin/bison", + # ], + # ) + # + [ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip ]; + + # Java toolchain used for the build and tests + javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}"; + stdenv' = if stdenv.isDarwin then llvmPackages_8.libcxxStdenv else stdenv; + +in +stdenv'.mkDerivation rec { + + version = "0.26.0"; + + meta = with lib; { + homepage = "https://github.com/bazelbuild/bazel/"; + description = "Build tool that builds code quickly and reliably"; + license = licenses.asl20; + platforms = platforms.linux ++ platforms.darwin; + }; + + # Additional tests that check bazel’s functionality. Execute + # + # nix-build . -A bazel.tests + # + # in the nixpkgs checkout root to exercise them locally. + passthru.tests = { + pythonBinPath = callPackage ./python-bin-path-test.nix {}; + bashTools = callPackage ./bash-tools-test.nix {}; + }; + + name = "bazel-${version}"; + + src = fetchurl { + url = "https://github.com/bazelbuild/bazel/releases/download/${version}/${name}-dist.zip"; + sha256 = "d26dadf62959255d58e523da3448a6222af768fe1224e321b120c1d5bbe4b4f2"; + }; + + # Necessary for the tests to pass on Darwin with sandbox enabled. + # Bazel starts a local server and needs to bind a local address. + __darwinAllowLocalNetworking = true; + + sourceRoot = "."; + + patches = [ + ./glibc.patch + ./python-stub-path-fix.patch + ] ++ lib.optional enableNixHacks ../nix-hacks.patch; + + # Bazel expects several utils to be available in Bash even without PATH. Hence this hack. + + customBash = writeCBin "bash" '' + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <unistd.h> + + extern char **environ; + + int main(int argc, char *argv[]) { + char *path = getenv("PATH"); + char *pathToAppend = "${defaultShellPath}"; + char *newPath; + if (path != NULL) { + int length = strlen(path) + 1 + strlen(pathToAppend) + 1; + newPath = malloc(length * sizeof(char)); + snprintf(newPath, length, "%s:%s", path, pathToAppend); + } else { + newPath = pathToAppend; + } + setenv("PATH", newPath, 1); + execve("${bash}/bin/bash", argv, environ); + return 0; + } + ''; + + postPatch = let + + darwinPatches = '' + bazelLinkFlags () { + eval set -- "$NIX_LDFLAGS" + local flag + for flag in "$@"; do + printf ' -Wl,%s' "$flag" + done + } + + # Disable Bazel's Xcode toolchain detection which would configure compilers + # 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+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" + + # libcxx includes aren't added by libcxx hook + # https://github.com/NixOS/nixpkgs/pull/41589 + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${llvmPackages_8.libcxx}/include/c++/v1" + + # don't use system installed Xcode to run clang, use Nix clang instead + sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv'.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \ + scripts/bootstrap/compile.sh \ + src/tools/xcode/realpath/BUILD \ + src/tools/xcode/stdredirect/BUILD \ + tools/osx/BUILD + + # nixpkgs's libSystem cannot use pthread headers directly, must import GCD headers instead + sed -i -e "/#include <pthread\/spawn.h>/i #include <dispatch/dispatch.h>" src/main/cpp/blaze_util_darwin.cc + + # clang installed from Xcode has a compatibility wrapper that forwards + # invocations of gcc to clang, but vanilla clang doesn't + sed -i -e 's;_find_generic(repository_ctx, "gcc", "CC", overriden_tools);_find_generic(repository_ctx, "clang", "CC", overriden_tools);g' tools/cpp/unix_cc_configure.bzl + + sed -i -e 's;/usr/bin/libtool;${cctools}/bin/libtool;g' tools/cpp/unix_cc_configure.bzl + wrappers=( tools/cpp/osx_cc_wrapper.sh tools/cpp/osx_cc_wrapper.sh.tpl ) + for wrapper in "''${wrappers[@]}"; do + sed -i -e "s,/usr/bin/install_name_tool,${cctools}/bin/install_name_tool,g" $wrapper + done + ''; + + genericPatches = '' + # Substitute python's stub shebang to plain python path. (see TODO add pr URL) + # See also `postFixup` where python is added to $out/nix-support + substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\ + --replace "/usr/bin/env python" "${python}/bin/python" \ + --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \ + + # md5sum is part of coreutils + sed -i 's|/sbin/md5|md5sum|' \ + src/BUILD + + # substituteInPlace is rather slow, so prefilter the files with grep + grep -rlZ /bin src/main/java/com/google/devtools | while IFS="" read -r -d "" path; do + # If you add more replacements here, you must change the grep above! + # Only files containing /bin are taken into account. + substituteInPlace "$path" \ + --replace /bin/bash ${customBash}/bin/bash \ + --replace /usr/bin/env ${coreutils}/bin/env \ + --replace /bin/true ${coreutils}/bin/true + done + + # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. + substituteInPlace scripts/bootstrap/compile.sh \ + --replace /bin/bash ${customBash}/bin/bash + + # add nix environment vars to .bazelrc + cat >> .bazelrc <<EOF + build --experimental_distdir=${distDir} + fetch --experimental_distdir=${distDir} + build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')" + build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')" + build --linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')" + build --host_linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')" + build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')" + build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')" + build --host_javabase='@local_jdk//:jdk' + build --host_java_toolchain='${javaToolchain}' + EOF + + # add the same environment vars to compile.sh + sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \ + -e "/\$command \\\\$/a --host_java_toolchain='${javaToolchain}' \\\\" \ + -i 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} + + # This is necessary to avoid: + # "error: no visible @interface for 'NSDictionary' declares the selector + # 'initWithContentsOfURL:error:'" + # This can be removed when the apple_sdk is upgraded beyond 10.13+ + sed -i '/initWithContentsOfURL:versionPlistUrl/ { + N + s/error:nil\];/\];/ + }' tools/osx/xcode_locator.m + + # append the PATH with defaultShellPath in tools/bash/runfiles/runfiles.bash + echo "PATH=\$PATH:${defaultShellPath}" >> runfiles.bash.tmp + cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp + mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash + + patchShebangs . + ''; + in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches + + genericPatches; + + buildInputs = [ + buildJdk + ]; + + # when a command can’t be found in a bazel build, you might also + # need to add it to `defaultShellPath`. + nativeBuildInputs = [ + zip + python + unzip + makeWrapper + which + customBash + ] ++ lib.optionals (stdenv.isDarwin) [ cctools CoreFoundation CoreServices Foundation ]; + + # Bazel makes extensive use of symlinks in the WORKSPACE. + # This causes problems with infinite symlinks if the build output is in the same location as the + # Bazel WORKSPACE. This is why before executing the build, the source code is moved into a + # subdirectory. + # Failing to do this causes "infinite symlink expansion detected" + preBuildPhases = ["preBuildPhase"]; + preBuildPhase = '' + mkdir bazel_src + shopt -s dotglob extglob + mv !(bazel_src) bazel_src + ''; + + buildPhase = '' + # Increasing memory during compilation might be necessary. + # export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m" + ./bazel_src/compile.sh + ./bazel_src/scripts/generate_bash_completion.sh \ + --bazel=./bazel_src/output/bazel \ + --output=./bazel_src/output/bazel-complete.bash \ + --prepend=./bazel_src/scripts/bazel-complete-header.bash \ + --prepend=./bazel_src/scripts/bazel-complete-template.bash + ''; + + installPhase = '' + mkdir -p $out/bin + + # official wrapper scripts that searches for $WORKSPACE_ROOT/tools/bazel + # if it can’t find something in tools, it calls $out/bin/bazel-real + cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel + mv ./bazel_src/output/bazel $out/bin/bazel-real + + wrapProgram "$out/bin/bazel" --add-flags --server_javabase="${runJdk}" + + # shell completion files + mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions + mv ./bazel_src/output/bazel-complete.bash $out/share/bash-completion/completions/bazel + cp ./bazel_src/scripts/zsh_completion/_bazel $out/share/zsh/site-functions/ + ''; + + # Temporarily disabling for now. A new approach is needed for this derivation as Bazel + # accesses the internet during the tests which fails in a sandbox. + doInstallCheck = false; + installCheckPhase = '' + export TEST_TMPDIR=$(pwd) + + hello_test () { + $out/bin/bazel test \ + --test_output=errors \ + --java_toolchain='${javaToolchain}' \ + examples/cpp:hello-success_test \ + examples/java-native/src/test/java/com/example/myproject:hello + } + + cd ./bazel_src + + # test whether $WORKSPACE_ROOT/tools/bazel works + + mkdir -p tools + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exit 1 + EOF + chmod +x tools/bazel + + # first call should fail if tools/bazel is used + ! hello_test + + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exec "$BAZEL_REAL" "$@" + EOF + + # second call succeeds because it defers to $out/bin/bazel-real + hello_test + ''; + + # Save paths to hardcoded dependencies so Nix can detect them. + postFixup = '' + mkdir -p $out/nix-support + echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends + # The templates get tar’d up into a .jar, + # so nix can’t detect python is needed in the runtime closure + echo "${python}" >> $out/nix-support/depends + ''; + + dontStrip = true; + dontPatchELF = true; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/glibc.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/glibc.patch new file mode 100644 index 000000000000..c4de48068f11 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/glibc.patch @@ -0,0 +1,78 @@ +From https://github.com/grpc/grpc/commit/57586a1ca7f17b1916aed3dea4ff8de872dbf853 +From: Benjamin Peterson <benjamin@dropbox.com> +Date: Fri, 3 May 2019 08:11:00 -0700 +Subject: [PATCH] Rename gettid() functions. + +glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts. +--- + src/core/lib/gpr/log_linux.cc | 6 ++---- + src/core/lib/gpr/log_posix.cc | 4 ++-- + src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- + 3 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/third_party/grpc/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc +index 81026e5689b..8b597b4cf2f 100644 +--- a/third_party/grpc/src/core/lib/gpr/log_linux.cc ++++ b/third_party/grpc/src/core/lib/gpr/log_linux.cc +@@ -40,7 +40,7 @@ + #include <time.h> + #include <unistd.h> + +-static long gettid(void) { return syscall(__NR_gettid); } ++static long sys_gettid(void) { return syscall(__NR_gettid); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) { + gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); + struct tm tm; + static __thread long tid = 0; +- if (tid == 0) tid = gettid(); ++ if (tid == 0) tid = sys_gettid(); + + timer = static_cast<time_t>(now.tv_sec); + final_slash = strrchr(args->file, '/'); +diff --git a/third_party/grpc/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc +index b6edc14ab6b..2f7c6ce3760 100644 +--- a/third_party/grpc/src/core/lib/gpr/log_posix.cc ++++ b/third_party/grpc/src/core/lib/gpr/log_posix.cc +@@ -31,7 +31,7 @@ + #include <string.h> + #include <time.h> + +-static intptr_t gettid(void) { return (intptr_t)pthread_self(); } ++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) { + char* prefix; + gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]", + gpr_log_severity_string(args->severity), time_buffer, +- (int)(now.tv_nsec), gettid(), display_file, args->line); ++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line); + + fprintf(stderr, "%-70s %s\n", prefix, args->message); + gpr_free(prefix); +diff --git a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc +index c2d80c08ddb..4a83cb6c215 100644 +--- a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc ++++ b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc +@@ -1077,7 +1077,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, + } + + #ifndef NDEBUG +-static long gettid(void) { return syscall(__NR_gettid); } ++static long sys_gettid(void) { return syscall(__NR_gettid); } + #endif + + /* pollset->mu lock must be held by the caller before calling this. +@@ -1097,7 +1097,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset, + #define WORKER_PTR (&worker) + #endif + #ifndef NDEBUG +- WORKER_PTR->originator = gettid(); ++ WORKER_PTR->originator = sys_gettid(); + #endif + if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { + gpr_log(GPR_INFO, diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/python-stub-path-fix.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/python-stub-path-fix.patch new file mode 100644 index 000000000000..cbc4192d2d9b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_26/python-stub-path-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt +index dac21c9a83..69b11c283f 100644 +--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt ++++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt +@@ -67,7 +67,7 @@ def FindPythonBinary(module_space): + return os.path.join(module_space, PYTHON_BINARY) + else: + # Case 4: Path has to be looked up in the search path. +- return SearchPath(PYTHON_BINARY) ++ return "NIX_STORE_PYTHON_PATH" + + def CreatePythonPathEntries(python_imports, module_space): + parts = python_imports.split(':'); diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix new file mode 100644 index 000000000000..92bbbd452145 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix @@ -0,0 +1,564 @@ +{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub +, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs +# this package (through the fixpoint glass) +, bazel_self +, lr, xe, zip, unzip, bash, writeCBin, coreutils +, which, gawk, gnused, gnutar, gnugrep, gzip, findutils +# updater +, python27, python3, writeScript +# Apple dependencies +, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation +# Allow to independently override the jdks used to build and run respectively +, buildJdk, runJdk +, buildJdkName +, runtimeShell +# Downstream packages for tests +, bazel-watcher +# Always assume all markers valid (this is needed because we remove markers; they are non-deterministic). +# Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers). +, enableNixHacks ? false +, gcc-unwrapped +, autoPatchelfHook +, file +, substituteAll +, writeTextFile +}: + +let + version = "0.29.1"; + + src = fetchurl { + url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; + sha256 = "1rcd6xy61n07n7m6dgcw23275r8z3gkwmqdkd48nwrq8yb7m4al7"; + }; + + # Update with `eval $(nix-build -A bazel.updater)`, + # then add new dependencies from the dict in ./src-deps.json as required. + srcDeps = lib.attrsets.attrValues srcDepsSet; + srcDepsSet = + let + srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json)); + toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl { + urls = d.urls; + sha256 = d.sha256; + }); + in builtins.listToAttrs (map toFetchurl [ + srcs.desugar_jdk_libs + srcs.io_bazel_skydoc + srcs.bazel_skylib + srcs.io_bazel_rules_sass + srcs.platforms + (if stdenv.hostPlatform.isDarwin + then srcs."java_tools_javac11_darwin-v4.0.zip" + else srcs."java_tools_javac11_linux-v4.0.zip") + srcs."coverage_output_generator-v1.0.zip" + srcs.build_bazel_rules_nodejs + srcs."android_tools_pkg-0.8.tar.gz" + srcs."0.27.1.tar.gz" + srcs.rules_pkg + srcs.rules_cc + srcs.rules_java + srcs.rules_proto + ]); + + distDir = runCommand "bazel-deps" {} '' + mkdir -p $out + for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done + ''; + + defaultShellPath = lib.makeBinPath + # Keep this list conservative. For more exotic tools, prefer to use + # @rules_nixpkgs to pull in tools from the nix repository. Example: + # + # WORKSPACE: + # + # nixpkgs_git_repository( + # name = "nixpkgs", + # revision = "def5124ec8367efdba95a99523dd06d918cb0ae8", + # ) + # + # # This defines an external Bazel workspace. + # nixpkgs_package( + # name = "bison", + # repositories = { "nixpkgs": "@nixpkgs//:default.nix" }, + # ) + # + # some/BUILD.bazel: + # + # genrule( + # ... + # cmd = "$(location @bison//:bin/bison) -other -args", + # tools = [ + # ... + # "@bison//:bin/bison", + # ], + # ) + # + [ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip ]; + + # Java toolchain used for the build and tests + javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}"; + + platforms = lib.platforms.linux ++ lib.platforms.darwin; + + # This repository is fetched by bazel at runtime + # however it contains prebuilt java binaries, with wrong interpreter + # and libraries path. + # We prefetch it, patch it, and override it in a global bazelrc. + system = if stdenv.hostPlatform.isDarwin then "darwin" else "linux"; + + remote_java_tools = stdenv.mkDerivation { + name = "remote_java_tools_${system}"; + + src = srcDepsSet."java_tools_javac11_${system}-v4.0.zip"; + + nativeBuildInputs = [ autoPatchelfHook unzip ]; + buildInputs = [ gcc-unwrapped ]; + + sourceRoot = "."; + + buildPhase = '' + mkdir $out; + ''; + + installPhase = '' + cp -Ra * $out/ + touch $out/WORKSPACE + ''; + }; + + bazelRC = writeTextFile { + name = "bazel-rc"; + text = '' + build --override_repository=${remote_java_tools.name}=${remote_java_tools} + build --distdir=${distDir} + startup --server_javabase=${runJdk} + + # load default location for the system wide configuration + try-import /etc/bazel.bazelrc + ''; + }; + stdenv' = if stdenv.isDarwin then llvmPackages_8.libcxxStdenv else stdenv; + +in +stdenv'.mkDerivation rec { + pname = "bazel"; + inherit version; + + meta = with lib; { + homepage = "https://github.com/bazelbuild/bazel/"; + description = "Build tool that builds code quickly and reliably"; + license = licenses.asl20; + maintainers = [ maintainers.mboes ]; + inherit platforms; + }; + + inherit src; + sourceRoot = "."; + + patches = [ + # On Darwin, the last argument to gcc is coming up as an empty string. i.e: '' + # This is breaking the build of any C target. This patch removes the last + # argument if it's found to be an empty string. + ../trim-last-argument-to-gcc-if-empty.patch + ./glibc.patch + + # --experimental_strict_action_env (which may one day become the default + # see bazelbuild/bazel#2574) hardcodes the default + # action environment to a non hermetic value (e.g. "/usr/local/bin"). + # This is non hermetic on non-nixos systems. On NixOS, bazel cannot find the required binaries. + # So we are replacing this bazel paths by defaultShellPath, + # improving hermeticity and making it work in nixos. + (substituteAll { + src = ../strict_action_env.patch; + strictActionEnvPatch = defaultShellPath; + }) + + # bazel reads its system bazelrc in /etc + # override this path to a builtin one + (substituteAll { + src = ../bazel_rc.patch; + bazelSystemBazelRCPath = bazelRC; + }) + ] ++ lib.optional enableNixHacks ../nix-hacks.patch; + + + # Additional tests that check bazel’s functionality. Execute + # + # nix-build . -A bazel.tests + # + # in the nixpkgs checkout root to exercise them locally. + passthru.tests = + let + runLocal = name: attrs: script: + let + attrs' = removeAttrs attrs [ "buildInputs" ]; + buildInputs = [ python3 ] ++ (attrs.buildInputs or []); + in + runCommandCC name ({ + inherit buildInputs; + preferLocalBuild = true; + meta.platforms = platforms; + } // attrs') script; + + # bazel wants to extract itself into $install_dir/install every time it runs, + # so let’s do that only once. + extracted = bazelPkg: + let install_dir = + # `install_base` field printed by `bazel info`, minus the hash. + # yes, this path is kinda magic. Sorry. + "$HOME/.cache/bazel/_bazel_nixbld"; + in runLocal "bazel-extracted-homedir" { passthru.install_dir = install_dir; } '' + export HOME=$(mktemp -d) + touch WORKSPACE # yeah, everything sucks + install_base="$(${bazelPkg}/bin/bazel info | grep install_base)" + # assert it’s actually below install_dir + [[ "$install_base" =~ ${install_dir} ]] \ + || (echo "oh no! $install_base but we are \ + trying to copy ${install_dir} to $out instead!"; exit 1) + cp -R ${install_dir} $out + ''; + + bazelTest = { name, bazelScript, workspaceDir, bazelPkg, buildInputs ? [] }: + let + be = extracted bazelPkg; + in runLocal name { inherit buildInputs; } ( + # skip extraction caching on Darwin, because nobody knows how Darwin works + (lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + # set up home with pre-unpacked bazel + export HOME=$(mktemp -d) + mkdir -p ${be.install_dir} + cp -R ${be}/install ${be.install_dir} + + # https://stackoverflow.com/questions/47775668/bazel-how-to-skip-corrupt-installation-on-centos6 + # Bazel checks whether the mtime of the install dir files + # is >9 years in the future, otherwise it extracts itself again. + # see PosixFileMTime::IsUntampered in src/main/cpp/util + # What the hell bazel. + ${lr}/bin/lr -0 -U ${be.install_dir} | ${xe}/bin/xe -N0 -0 touch --date="9 years 6 months" {} + '') + + + '' + # Note https://github.com/bazelbuild/bazel/issues/5763#issuecomment-456374609 + # about why to create a subdir for the workspace. + cp -r ${workspaceDir} wd && chmod u+w wd && cd wd + + ${bazelScript} + + touch $out + ''); + + bazelWithNixHacks = bazel_self.override { enableNixHacks = true; }; + + bazel-examples = fetchFromGitHub { + owner = "bazelbuild"; + repo = "examples"; + rev = "5d8c8961a2516ebf875787df35e98cadd08d43dc"; + sha256 = "03c1bwlq5bs3hg96v4g4pg2vqwhqq6w538h66rcpw02f83yy7fs8"; + }; + + in (if !stdenv.hostPlatform.isDarwin then { + # `extracted` doesn’t work on darwin + shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; }; + } else {}) // { + bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; }; + cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; + java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; + protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; }; + pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; }; + + bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + + cppWithNixHacks = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; }; + javaWithNixHacks = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; }; + protobufWithNixHacks = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + pythonBinPathWithNixHacks = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + + # downstream packages using buildBazelPackage + # fixed-output hashes of the fetch phase need to be spot-checked manually + downstream = recurseIntoAttrs ({ + inherit bazel-watcher; + } + # dm-sonnet is only packaged for linux + // (lib.optionalAttrs stdenv.isLinux { + # TODO(timokau) dm-sonnet is broken currently + # dm-sonnet-linux = python3.pkgs.dm-sonnet; + })); + }; + + # update the list of workspace dependencies + passthru.updater = writeScript "update-bazel-deps.sh" '' + #!${runtimeShell} + cat ${runCommand "bazel-deps.json" {} '' + ${unzip}/bin/unzip ${src} WORKSPACE + ${python3}/bin/python3 ${../update-srcDeps.py} ./WORKSPACE > $out + ''} > ${builtins.toString ./src-deps.json} + ''; + + # Necessary for the tests to pass on Darwin with sandbox enabled. + # Bazel starts a local server and needs to bind a local address. + __darwinAllowLocalNetworking = true; + + # Bazel expects several utils to be available in Bash even without PATH. Hence this hack. + customBash = writeCBin "bash" '' + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <unistd.h> + + extern char **environ; + + int main(int argc, char *argv[]) { + char *path = getenv("PATH"); + char *pathToAppend = "${defaultShellPath}"; + char *newPath; + if (path != NULL) { + int length = strlen(path) + 1 + strlen(pathToAppend) + 1; + newPath = malloc(length * sizeof(char)); + snprintf(newPath, length, "%s:%s", path, pathToAppend); + } else { + newPath = pathToAppend; + } + setenv("PATH", newPath, 1); + execve("${bash}/bin/bash", argv, environ); + return 0; + } + ''; + + postPatch = let + + darwinPatches = '' + bazelLinkFlags () { + eval set -- "$NIX_LDFLAGS" + local flag + for flag in "$@"; do + printf ' -Wl,%s' "$flag" + done + } + + # Disable Bazel's Xcode toolchain detection which would configure compilers + # 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+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" + + # libcxx includes aren't added by libcxx hook + # https://github.com/NixOS/nixpkgs/pull/41589 + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${llvmPackages_8.libcxx}/include/c++/v1" + + # don't use system installed Xcode to run clang, use Nix clang instead + sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv'.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \ + scripts/bootstrap/compile.sh \ + src/tools/xcode/realpath/BUILD \ + src/tools/xcode/stdredirect/BUILD \ + tools/osx/BUILD + + # nixpkgs's libSystem cannot use pthread headers directly, must import GCD headers instead + sed -i -e "/#include <pthread\/spawn.h>/i #include <dispatch/dispatch.h>" src/main/cpp/blaze_util_darwin.cc + + # clang installed from Xcode has a compatibility wrapper that forwards + # invocations of gcc to clang, but vanilla clang doesn't + sed -i -e 's;_find_generic(repository_ctx, "gcc", "CC", overriden_tools);_find_generic(repository_ctx, "clang", "CC", overriden_tools);g' tools/cpp/unix_cc_configure.bzl + + sed -i -e 's;/usr/bin/libtool;${cctools}/bin/libtool;g' tools/cpp/unix_cc_configure.bzl + wrappers=( tools/cpp/osx_cc_wrapper.sh tools/cpp/osx_cc_wrapper.sh.tpl ) + for wrapper in "''${wrappers[@]}"; do + sed -i -e "s,/usr/bin/install_name_tool,${cctools}/bin/install_name_tool,g" $wrapper + done + ''; + + genericPatches = '' + # Substitute j2objc and objc wrapper's python shebang to plain python path. + # These scripts explicitly depend on Python 2.7, hence we use python27. + # See also `postFixup` where python27 is added to $out/nix-support + substituteInPlace tools/j2objc/j2objc_header_map.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + substituteInPlace tools/j2objc/j2objc_wrapper.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + substituteInPlace tools/objc/j2objc_dead_code_pruner.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + + # md5sum is part of coreutils + sed -i 's|/sbin/md5|md5sum|' \ + src/BUILD + + # substituteInPlace is rather slow, so prefilter the files with grep + grep -rlZ /bin src/main/java/com/google/devtools | while IFS="" read -r -d "" path; do + # If you add more replacements here, you must change the grep above! + # Only files containing /bin are taken into account. + # We default to python3 where possible. See also `postFixup` where + # python3 is added to $out/nix-support + substituteInPlace "$path" \ + --replace /bin/bash ${customBash}/bin/bash \ + --replace "/usr/bin/env bash" ${customBash}/bin/bash \ + --replace "/usr/bin/env python" ${python3}/bin/python \ + --replace /usr/bin/env ${coreutils}/bin/env \ + --replace /bin/true ${coreutils}/bin/true + done + + # bazel test runner include references to /bin/bash + substituteInPlace tools/build_rules/test_rules.bzl \ + --replace /bin/bash ${customBash}/bin/bash + + for i in $(find tools/cpp/ -type f) + do + substituteInPlace $i \ + --replace /bin/bash ${customBash}/bin/bash + done + + # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. + substituteInPlace scripts/bootstrap/compile.sh \ + --replace /bin/bash ${customBash}/bin/bash + + # add nix environment vars to .bazelrc + cat >> .bazelrc <<EOF + build --distdir=${distDir} + fetch --distdir=${distDir} + build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')" + build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')" + build --linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')" + build --host_linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')" + build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')" + build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')" + build --host_javabase='@local_jdk//:jdk' + build --host_java_toolchain='${javaToolchain}' + EOF + + # add the same environment vars to compile.sh + sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \ + -e "/\$command \\\\$/a --host_java_toolchain='${javaToolchain}' \\\\" \ + -i scripts/bootstrap/compile.sh + + # This is necessary to avoid: + # "error: no visible @interface for 'NSDictionary' declares the selector + # 'initWithContentsOfURL:error:'" + # This can be removed when the apple_sdk is upgraded beyond 10.13+ + sed -i '/initWithContentsOfURL:versionPlistUrl/ { + N + s/error:nil\];/\];/ + }' tools/osx/xcode_locator.m + + # append the PATH with defaultShellPath in tools/bash/runfiles/runfiles.bash + echo "PATH=\$PATH:${defaultShellPath}" >> runfiles.bash.tmp + cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp + mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash + + patchShebangs . + ''; + in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches + + genericPatches; + + buildInputs = [ + buildJdk + python3 + ]; + + # when a command can’t be found in a bazel build, you might also + # need to add it to `defaultShellPath`. + nativeBuildInputs = [ + zip + python3 + unzip + makeWrapper + which + customBash + ] ++ lib.optionals (stdenv.isDarwin) [ cctools CoreFoundation CoreServices Foundation ]; + + # Bazel makes extensive use of symlinks in the WORKSPACE. + # This causes problems with infinite symlinks if the build output is in the same location as the + # Bazel WORKSPACE. This is why before executing the build, the source code is moved into a + # subdirectory. + # Failing to do this causes "infinite symlink expansion detected" + preBuildPhases = ["preBuildPhase"]; + preBuildPhase = '' + mkdir bazel_src + shopt -s dotglob extglob + mv !(bazel_src) bazel_src + ''; + + buildPhase = '' + # Increasing memory during compilation might be necessary. + # export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m" + ./bazel_src/compile.sh + ./bazel_src/scripts/generate_bash_completion.sh \ + --bazel=./bazel_src/output/bazel \ + --output=./bazel_src/output/bazel-complete.bash \ + --prepend=./bazel_src/scripts/bazel-complete-header.bash \ + --prepend=./bazel_src/scripts/bazel-complete-template.bash + ''; + + installPhase = '' + mkdir -p $out/bin + + # official wrapper scripts that searches for $WORKSPACE_ROOT/tools/bazel + # if it can’t find something in tools, it calls $out/bin/bazel-real + cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel + mv ./bazel_src/output/bazel $out/bin/bazel-real + + # shell completion files + mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions + mv ./bazel_src/output/bazel-complete.bash $out/share/bash-completion/completions/bazel + cp ./bazel_src/scripts/zsh_completion/_bazel $out/share/zsh/site-functions/ + ''; + + doInstallCheck = true; + installCheckPhase = '' + export TEST_TMPDIR=$(pwd) + + hello_test () { + $out/bin/bazel test --distdir=${distDir} \ + --test_output=errors \ + --java_toolchain='${javaToolchain}' \ + examples/cpp:hello-success_test \ + examples/java-native/src/test/java/com/example/myproject:hello + } + + cd ./bazel_src + + # test whether $WORKSPACE_ROOT/tools/bazel works + + mkdir -p tools + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exit 1 + EOF + chmod +x tools/bazel + + # first call should fail if tools/bazel is used + ! hello_test + + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exec "$BAZEL_REAL" "$@" + EOF + + # second call succeeds because it defers to $out/bin/bazel-real + hello_test + ''; + + # Save paths to hardcoded dependencies so Nix can detect them. + postFixup = '' + mkdir -p $out/nix-support + echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends + # The templates get tar’d up into a .jar, + # so nix can’t detect python is needed in the runtime closure + # Some of the scripts explicitly depend on Python 2.7. Otherwise, we + # default to using python3. Therefore, both python27 and python3 are + # runtime dependencies. + echo "${python27}" >> $out/nix-support/depends + echo "${python3}" >> $out/nix-support/depends + '' + lib.optionalString stdenv.isDarwin '' + echo "${cctools}" >> $out/nix-support/depends + ''; + + dontStrip = true; + dontPatchELF = true; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/glibc.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/glibc.patch new file mode 100644 index 000000000000..c4de48068f11 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/glibc.patch @@ -0,0 +1,78 @@ +From https://github.com/grpc/grpc/commit/57586a1ca7f17b1916aed3dea4ff8de872dbf853 +From: Benjamin Peterson <benjamin@dropbox.com> +Date: Fri, 3 May 2019 08:11:00 -0700 +Subject: [PATCH] Rename gettid() functions. + +glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts. +--- + src/core/lib/gpr/log_linux.cc | 6 ++---- + src/core/lib/gpr/log_posix.cc | 4 ++-- + src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- + 3 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/third_party/grpc/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc +index 81026e5689b..8b597b4cf2f 100644 +--- a/third_party/grpc/src/core/lib/gpr/log_linux.cc ++++ b/third_party/grpc/src/core/lib/gpr/log_linux.cc +@@ -40,7 +40,7 @@ + #include <time.h> + #include <unistd.h> + +-static long gettid(void) { return syscall(__NR_gettid); } ++static long sys_gettid(void) { return syscall(__NR_gettid); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) { + gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); + struct tm tm; + static __thread long tid = 0; +- if (tid == 0) tid = gettid(); ++ if (tid == 0) tid = sys_gettid(); + + timer = static_cast<time_t>(now.tv_sec); + final_slash = strrchr(args->file, '/'); +diff --git a/third_party/grpc/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc +index b6edc14ab6b..2f7c6ce3760 100644 +--- a/third_party/grpc/src/core/lib/gpr/log_posix.cc ++++ b/third_party/grpc/src/core/lib/gpr/log_posix.cc +@@ -31,7 +31,7 @@ + #include <string.h> + #include <time.h> + +-static intptr_t gettid(void) { return (intptr_t)pthread_self(); } ++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) { + char* prefix; + gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]", + gpr_log_severity_string(args->severity), time_buffer, +- (int)(now.tv_nsec), gettid(), display_file, args->line); ++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line); + + fprintf(stderr, "%-70s %s\n", prefix, args->message); + gpr_free(prefix); +diff --git a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc +index c2d80c08ddb..4a83cb6c215 100644 +--- a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc ++++ b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc +@@ -1077,7 +1077,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, + } + + #ifndef NDEBUG +-static long gettid(void) { return syscall(__NR_gettid); } ++static long sys_gettid(void) { return syscall(__NR_gettid); } + #endif + + /* pollset->mu lock must be held by the caller before calling this. +@@ -1097,7 +1097,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset, + #define WORKER_PTR (&worker) + #endif + #ifndef NDEBUG +- WORKER_PTR->originator = gettid(); ++ WORKER_PTR->originator = sys_gettid(); + #endif + if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { + gpr_log(GPR_INFO, diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/src-deps.json b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/src-deps.json new file mode 100644 index 000000000000..f93794249ec7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_0_29/src-deps.json @@ -0,0 +1,506 @@ +{ + "0.16.2.zip": { + "name": "0.16.2.zip", + "sha256": "9b72bb0aea72d7cbcfc82a01b1e25bf3d85f791e790ddec16c65e2d906382ee0", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip", + "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip" + ] + }, + "0.27.1.tar.gz": { + "name": "0.27.1.tar.gz", + "sha256": "28cb3666da80fbc62d4c46814f5468dd5d0b59f9064c0b933eee3140d706d330", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.27.1.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/0.27.1.tar.gz" + ] + }, + "0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip": { + "name": "0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip", + "sha256": "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip", + "https://github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip" + ] + }, + "41c28e43dffbae39c52dd4b91932d1209e5a8893.tar.gz": { + "name": "41c28e43dffbae39c52dd4b91932d1209e5a8893.tar.gz", + "sha256": "fdc34621839104b57363a258eab9d821b02ff7837923cfe7fb6fd67182780829", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/41c28e43dffbae39c52dd4b91932d1209e5a8893.tar.gz", + "https://github.com/bazelbuild/skydoc/archive/41c28e43dffbae39c52dd4b91932d1209e5a8893.tar.gz" + ] + }, + "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip": { + "name": "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip", + "sha256": "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip", + "https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip" + ] + }, + "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": { + "name": "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ] + }, + "8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz": { + "name": "8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz", + "sha256": "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz", + "https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz" + ] + }, + "android_tools_pkg-0.8.tar.gz": { + "name": "android_tools_pkg-0.8.tar.gz", + "sha256": "a9eac6e1b27d5549edaaa724b20eb1cdae6253b84f44d5744c30372bd523cfcd", + "urls": [ + "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.8.tar.gz" + ] + }, + "b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz": { + "name": "b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz", + "sha256": "88b0a90433866b44bb4450d4c30bc5738b8c4f9c9ba14e9661deb123f56a833d", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz" + ] + }, + "bazel_j2objc": { + "name": "bazel_j2objc", + "sha256": "8d3403b5b7db57e347c943d214577f6879e5b175c2b59b7e075c0b6453330e9b", + "strip_prefix": "j2objc-2.5", + "urls": [ + "https://miirror.bazel.build/github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip", + "https://github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip" + ] + }, + "bazel_skylib": { + "name": "bazel_skylib", + "sha256": "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52", + "strip_prefix": "bazel-skylib-f83cb8dd6f5658bc574ccd873e25197055265d1c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz" + ] + }, + "bazel_toolchains": { + "name": "bazel_toolchains", + "sha256": "28cb3666da80fbc62d4c46814f5468dd5d0b59f9064c0b933eee3140d706d330", + "strip_prefix": "bazel-toolchains-0.27.1", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.27.1.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/0.27.1.tar.gz" + ] + }, + "build_bazel_rules_nodejs": { + "name": "build_bazel_rules_nodejs", + "sha256": "9b72bb0aea72d7cbcfc82a01b1e25bf3d85f791e790ddec16c65e2d906382ee0", + "strip_prefix": "rules_nodejs-0.16.2", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip", + "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip" + ] + }, + "com_google_googletest": { + "name": "com_google_googletest", + "sha256": "0fb00ff413f6b9b80ccee44a374ca7a18af7315aea72a43c62f2acd1ca74e9b5", + "strip_prefix": "googletest-f13bbe2992d188e834339abe6f715b2b2f840a77", + "urls": [ + "https://mirror.bazel.build/github.com/google/googletest/archive/f13bbe2992d188e834339abe6f715b2b2f840a77.tar.gz", + "https://github.com/google/googletest/archive/f13bbe2992d188e834339abe6f715b2b2f840a77.tar.gz" + ] + }, + "coverage_output_generator-v1.0.zip": { + "name": "coverage_output_generator-v1.0.zip", + "sha256": "cc470e529fafb6165b5be3929ff2d99b38429b386ac100878687416603a67889", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v1.0.zip" + ] + }, + "desugar_jdk_libs": { + "name": "desugar_jdk_libs", + "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d", + "strip_prefix": "desugar_jdk_libs-e0b0291b2c51fbe5a7cfa14473a1ae850f94f021", + "urls": [ + "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip" + ] + }, + "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip": { + "name": "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d", + "urls": [ + "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip" + ] + }, + "f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz": { + "name": "f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", + "sha256": "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz" + ] + }, + "io_bazel_rules_sass": { + "name": "io_bazel_rules_sass", + "sha256": "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898", + "strip_prefix": "rules_sass-8ccf4f1c351928b55d5dddf3672e3667f6978d60", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz", + "https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz" + ] + }, + "io_bazel_skydoc": { + "name": "io_bazel_skydoc", + "sha256": "fdc34621839104b57363a258eab9d821b02ff7837923cfe7fb6fd67182780829", + "strip_prefix": "skydoc-41c28e43dffbae39c52dd4b91932d1209e5a8893", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/41c28e43dffbae39c52dd4b91932d1209e5a8893.tar.gz", + "https://github.com/bazelbuild/skydoc/archive/41c28e43dffbae39c52dd4b91932d1209e5a8893.tar.gz" + ] + }, + "java_tools_javac11_darwin-v4.0.zip": { + "name": "java_tools_javac11_darwin-v4.0.zip", + "sha256": "fbf5bf22e9aab9c622e4c8c59314a1eef5ea09eafc5672b4f3250dc0b971bbcc", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_darwin-v4.0.zip" + ] + }, + "java_tools_javac11_linux-v4.0.zip": { + "name": "java_tools_javac11_linux-v4.0.zip", + "sha256": "96e223094a12c842a66db0bb7bb6866e88e26e678f045842911f9bd6b47161f5", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_linux-v4.0.zip" + ] + }, + "java_tools_javac11_windows-v4.0.zip": { + "name": "java_tools_javac11_windows-v4.0.zip", + "sha256": "a1de51447b2ba2eab923d589ba6c72c289c16e6091e6a3bb3e67a05ef4ad200c", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v4.0/java_tools_javac11_windows-v4.0.zip" + ] + }, + "java_tools_langtools_javac10": { + "name": "java_tools_langtools_javac10", + "sha256": "0e9c9ac5ef17869de3cb8c3497c4c0d31836ef7b63efe1690506f53783adb212", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk10_v2.zip" + ] + }, + "java_tools_langtools_javac11": { + "name": "java_tools_langtools_javac11", + "sha256": "cf0814fa002ef3d794582bb086516d8c9ed0958f83f19799cdb08949019fe4c7", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11_v2.zip" + ] + }, + "java_tools_langtools_javac12": { + "name": "java_tools_langtools_javac12", + "sha256": "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip" + ] + }, + "java_tools_langtools_javac9": { + "name": "java_tools_langtools_javac9", + "sha256": "d94befcfb325a9a62aebc2052e631fde2322b4df5c82a19ed260b38ba12a0ad1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk9_v2.zip" + ] + }, + "jdk10-server-release-1804.tar.xz": { + "name": "jdk10-server-release-1804.tar.xz", + "sha256": "b7098b7aaf6ee1ffd4a2d0371a0be26c5a5c87f6aebbe46fe9a92c90583a84be", + "urls": [ + "https://mirror.bazel.build/openjdk.linaro.org/releases/jdk10-server-release-1804.tar.xz" + ] + }, + "jdk9-server-release-1708.tar.xz": { + "name": "jdk9-server-release-1708.tar.xz", + "sha256": "72e7843902b0395e2d30e1e9ad2a5f05f36a4bc62529828bcbc698d54aec6022", + "urls": [ + "https://mirror.bazel.build/openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz" + ] + }, + "openjdk10_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk10_linux_archive", + "sha256": "b3c2d762091a615b0c1424ebbd05d75cc114da3bf4f25a0dec5c51ea7e84146f", + "strip_prefix": "zulu10.2+3-jdk10.0.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-linux_x64.tar.gz" + ] + }, + "openjdk11_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk11_linux_archive", + "sha256": "ddb0fd4526089cf1ce2db36282c282263f587a9e8be373fa02f511a12923cc48", + "strip_prefix": "zulu11.31.11-ca-jdk11.0.3-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.11-ca-jdk11.0.3/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz" + ] + }, + "openjdk12_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk12_linux_archive", + "sha256": "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13", + "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz" + ] + }, + "openjdk9_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk9_linux_archive", + "sha256": "45f2dfbee93b91b1468cf81d843fc6d9a47fef1f831c0b7ceff4f1eb6e6851c8", + "strip_prefix": "zulu9.0.7.1-jdk9.0.7-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz" + ] + }, + "openjdk_linux": { + "downloaded_file_path": "zulu-linux.tar.gz", + "name": "openjdk_linux", + "sha256": "460d8a4f0c0204160b48086e341b22943c9cca471b195340e75b38ae9eb33c1c", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64-allmodules-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209950.tar.gz" + ] + }, + "openjdk_linux_aarch64": { + "downloaded_file_path": "zulu-linux-aarch64.tar.gz", + "name": "openjdk_linux_aarch64", + "sha256": "23c37c0c3a8fdcbc68e96e70ff5c5c020c14db76deaae9b547849afda4586e5e", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64-allmodules-c82eb4878c7dc829455caeb915affe36c89df06f-1561630858.tar.gz" + ] + }, + "openjdk_linux_aarch64_minimal": { + "downloaded_file_path": "zulu-linux-aarch64-minimal.tar.gz", + "name": "openjdk_linux_aarch64_minimal", + "sha256": "7af2583fe5ef0a781d4a9dca0c0160d42e7db1305ec1b66f98aa44c91cc875df", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64-minimal-c82eb4878c7dc829455caeb915affe36c89df06f-1561630858.tar.gz" + ] + }, + "openjdk_linux_aarch64_vanilla": { + "downloaded_file_path": "zulu-linux-aarch64-vanilla.tar.gz", + "name": "openjdk_linux_aarch64_vanilla", + "sha256": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz" + ] + }, + "openjdk_linux_minimal": { + "downloaded_file_path": "zulu-linux-minimal.tar.gz", + "name": "openjdk_linux_minimal", + "sha256": "5123bc8dd21886761d1fd9ca0fb1898b3372d7243064a070ec81ca9c9d1a6791", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64-minimal-524ae2ca2a782c9f15e00f08bd35b3f8ceacbd7f-1556011926.tar.gz" + ] + }, + "openjdk_linux_vanilla": { + "downloaded_file_path": "zulu-linux-vanilla.tar.gz", + "name": "openjdk_linux_vanilla", + "sha256": "f3f44b6235508e87b760bf37a49e186cc1fa4e9cd28384c4dbf5a33991921e08", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz" + ] + }, + "openjdk_macos": { + "downloaded_file_path": "zulu-macos.tar.gz", + "name": "openjdk_macos", + "sha256": "8fa61d85ca6f657d646fdb50cfc8634987f8f7d8a3250ed39fb7364647633252", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64-allmodules-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209951.tar.gz" + ] + }, + "openjdk_macos_minimal": { + "downloaded_file_path": "zulu-macos-minimal.tar.gz", + "name": "openjdk_macos_minimal", + "sha256": "ac56e44db46fd56ac78b39b6823daed4faa74a2677ac340c7d217f863884ec0f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64-minimal-524ae2ca2a782c9f15e00f08bd35b3f8ceacbd7f-1556003114.tar.gz" + ] + }, + "openjdk_macos_vanilla": { + "downloaded_file_path": "zulu-macos-vanilla.tar.gz", + "name": "openjdk_macos_vanilla", + "sha256": "059f8e3484bf07b63a8f2820d5f528f473eff1befdb1896ee4f8ff06be3b8d8f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip" + ] + }, + "openjdk_win": { + "downloaded_file_path": "zulu-win.zip", + "name": "openjdk_win", + "sha256": "e6ddb361309f8e84eb5fb5ad8b0f5cc031ba3679910139262c31efd8f7579d05", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64-allmodules-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209972.zip" + ] + }, + "openjdk_win_minimal": { + "downloaded_file_path": "zulu-win-minimal.zip", + "name": "openjdk_win_minimal", + "sha256": "8e5dada6e9ebcc9ce29b4d051449bb95d3ee1e620e166da862224bbf15211f8b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64-minimal-524ae2ca2a782c9f15e00f08bd35b3f8ceacbd7f-1556003136.zip" + ] + }, + "openjdk_win_vanilla": { + "downloaded_file_path": "zulu-win-vanilla.zip", + "name": "openjdk_win_vanilla", + "sha256": "e1f5b4ce1b9148140fae2fcfb8a96d1c9b7eac5b8df0e13fbcad9b8561284880", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64.zip" + ] + }, + "platforms": { + "name": "platforms", + "sha256": "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5", + "strip_prefix": "platforms-441afe1bfdadd6236988e9cac159df6b5a9f5a98", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip", + "https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip" + ] + }, + "rules_cc": { + "name": "rules_cc", + "sha256": "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89", + "strip_prefix": "rules_cc-0d5f3f2768c6ca2faca0079a997a97ce22997a0c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip", + "https://github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip" + ] + }, + "rules_java": { + "name": "rules_java", + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ] + }, + "rules_pkg": { + "name": "rules_pkg", + "sha256": "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/rules_pkg-0.2.0.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz" + ] + }, + "rules_pkg-0.2.0.tar.gz": { + "name": "rules_pkg-0.2.0.tar.gz", + "sha256": "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/rules_pkg-0.2.0.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz" + ] + }, + "rules_proto": { + "name": "rules_proto", + "sha256": "88b0a90433866b44bb4450d4c30bc5738b8c4f9c9ba14e9661deb123f56a833d", + "strip_prefix": "rules_proto-b0cc14be5da05168b01db282fe93bdf17aa2b9f4", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz" + ] + }, + "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz": { + "name": "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz", + "sha256": "57fad3602e74c79587901d6966d3b54ef32cb811829a2552163185d5064fe9b5", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz" + ] + }, + "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz": { + "name": "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz", + "sha256": "e669c9a897413d855b550b4e39d79614392e6fb96f494e8ef99a34297d9d85d3", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz" + ] + }, + "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip": { + "name": "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip", + "sha256": "c39e7700a8d41794d60985df5a20352435196e78ecbc6a2b30df7be8637bffd5", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" + ] + }, + "zulu11.2.3-jdk11.0.1-linux_x64.tar.gz": { + "name": "zulu11.2.3-jdk11.0.1-linux_x64.tar.gz", + "sha256": "232b1c3511f0d26e92582b7c3cc363be7ac633e371854ca2f2e9f2b50eb72a75", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz" + ] + }, + "zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz": { + "name": "zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz", + "sha256": "1edf366ee821e5db8e348152fcb337b28dfd6bf0f97943c270dcc6747cedb6cb", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz" + ] + }, + "zulu11.2.3-jdk11.0.1-win_x64.zip": { + "name": "zulu11.2.3-jdk11.0.1-win_x64.zip", + "sha256": "8e1e2b8347de6746f3fd1538840dd643201533ab113abc4ed93678e342d28aa3", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-win_x64.zip" + ] + }, + "zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz": { + "name": "zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz", + "sha256": "f3f44b6235508e87b760bf37a49e186cc1fa4e9cd28384c4dbf5a33991921e08", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz" + ] + }, + "zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip": { + "name": "zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip", + "sha256": "059f8e3484bf07b63a8f2820d5f528f473eff1befdb1896ee4f8ff06be3b8d8f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip" + ] + }, + "zulu11.29.3-ca-jdk11.0.2-win_x64.zip": { + "name": "zulu11.29.3-ca-jdk11.0.2-win_x64.zip", + "sha256": "e1f5b4ce1b9148140fae2fcfb8a96d1c9b7eac5b8df0e13fbcad9b8561284880", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64.zip" + ] + }, + "zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz": { + "name": "zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz", + "sha256": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz" + ] + }, + "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz": { + "name": "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz", + "sha256": "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz" + ] + }, + "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz": { + "name": "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz", + "sha256": "404e7058ff91f956612f47705efbee8e175a38b505fb1b52d8c1ea98718683de", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz" + ] + }, + "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip": { + "name": "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip", + "sha256": "e738829017f107e7a7cd5069db979398ec3c3f03ef56122f89ba38e7374f63ed", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip" + ] + } +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix new file mode 100644 index 000000000000..5eb0926503c8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix @@ -0,0 +1,565 @@ +{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub +, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs +# this package (through the fixpoint glass) +, bazel_self +, lr, xe, zip, unzip, bash, writeCBin, coreutils +, which, gawk, gnused, gnutar, gnugrep, gzip, findutils +# updater +, python27, python3, writeScript +# Apple dependencies +, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation +# Allow to independently override the jdks used to build and run respectively +, buildJdk, runJdk +, buildJdkName +, runtimeShell +# Downstream packages for tests +, bazel-watcher +# Always assume all markers valid (this is needed because we remove markers; they are non-deterministic). +# Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers). +, enableNixHacks ? false +, gcc-unwrapped +, autoPatchelfHook +, file +, substituteAll +, writeTextFile +}: + +let + version = "1.2.1"; + + src = fetchurl { + url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; + sha256 = "1qfk14mgx1m454b4w4ldggljzqkqwpdwrlynq7rc8aq11yfs8p95"; + }; + + # Update with `eval $(nix-build -A bazel.updater)`, + # then add new dependencies from the dict in ./src-deps.json as required. + srcDeps = lib.attrsets.attrValues srcDepsSet; + srcDepsSet = + let + srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json)); + toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl { + urls = d.urls; + sha256 = d.sha256; + }); + in builtins.listToAttrs (map toFetchurl [ + srcs.desugar_jdk_libs + srcs.io_bazel_skydoc + srcs.bazel_skylib + srcs.io_bazel_rules_sass + srcs.platforms + (if stdenv.hostPlatform.isDarwin + then srcs."java_tools_javac11_darwin-v6.1.zip" + else srcs."java_tools_javac11_linux-v6.1.zip") + srcs."coverage_output_generator-v2.0.zip" + srcs.build_bazel_rules_nodejs + srcs."android_tools_pkg-0.12.tar.gz" + srcs."0.28.3.tar.gz" + srcs.rules_pkg + srcs.rules_cc + srcs.rules_java + srcs.rules_proto + ]); + + distDir = runCommand "bazel-deps" {} '' + mkdir -p $out + for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done + ''; + + defaultShellPath = lib.makeBinPath + # Keep this list conservative. For more exotic tools, prefer to use + # @rules_nixpkgs to pull in tools from the nix repository. Example: + # + # WORKSPACE: + # + # nixpkgs_git_repository( + # name = "nixpkgs", + # revision = "def5124ec8367efdba95a99523dd06d918cb0ae8", + # ) + # + # # This defines an external Bazel workspace. + # nixpkgs_package( + # name = "bison", + # repositories = { "nixpkgs": "@nixpkgs//:default.nix" }, + # ) + # + # some/BUILD.bazel: + # + # genrule( + # ... + # cmd = "$(location @bison//:bin/bison) -other -args", + # tools = [ + # ... + # "@bison//:bin/bison", + # ], + # ) + # + [ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip ]; + + # Java toolchain used for the build and tests + javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}"; + + platforms = lib.platforms.linux ++ lib.platforms.darwin; + + # This repository is fetched by bazel at runtime + # however it contains prebuilt java binaries, with wrong interpreter + # and libraries path. + # We prefetch it, patch it, and override it in a global bazelrc. + system = if stdenv.hostPlatform.isDarwin then "darwin" else "linux"; + + remote_java_tools = stdenv.mkDerivation { + name = "remote_java_tools_${system}"; + + src = srcDepsSet."java_tools_javac11_${system}-v6.1.zip"; + + nativeBuildInputs = [ autoPatchelfHook unzip ]; + buildInputs = [ gcc-unwrapped ]; + + sourceRoot = "."; + + buildPhase = '' + mkdir $out; + ''; + + installPhase = '' + cp -Ra * $out/ + touch $out/WORKSPACE + ''; + }; + + bazelRC = writeTextFile { + name = "bazel-rc"; + text = '' + build --override_repository=${remote_java_tools.name}=${remote_java_tools} + build --distdir=${distDir} + startup --server_javabase=${runJdk} + + # load default location for the system wide configuration + try-import /etc/bazel.bazelrc + ''; + }; + + stdenv' = if stdenv.isDarwin then llvmPackages_8.libcxxStdenv else stdenv; + +in +stdenv'.mkDerivation rec { + pname = "bazel"; + inherit version; + + meta = with lib; { + homepage = "https://github.com/bazelbuild/bazel/"; + description = "Build tool that builds code quickly and reliably"; + license = licenses.asl20; + maintainers = [ maintainers.mboes ]; + inherit platforms; + }; + + inherit src; + sourceRoot = "."; + + patches = [ + # On Darwin, the last argument to gcc is coming up as an empty string. i.e: '' + # This is breaking the build of any C target. This patch removes the last + # argument if it's found to be an empty string. + ../trim-last-argument-to-gcc-if-empty.patch + ./glibc.patch + + # --experimental_strict_action_env (which may one day become the default + # see bazelbuild/bazel#2574) hardcodes the default + # action environment to a non hermetic value (e.g. "/usr/local/bin"). + # This is non hermetic on non-nixos systems. On NixOS, bazel cannot find the required binaries. + # So we are replacing this bazel paths by defaultShellPath, + # improving hermeticity and making it work in nixos. + (substituteAll { + src = ../strict_action_env.patch; + strictActionEnvPatch = defaultShellPath; + }) + + # bazel reads its system bazelrc in /etc + # override this path to a builtin one + (substituteAll { + src = ../bazel_rc.patch; + bazelSystemBazelRCPath = bazelRC; + }) + ] ++ lib.optional enableNixHacks ../nix-hacks.patch; + + + # Additional tests that check bazel’s functionality. Execute + # + # nix-build . -A bazel.tests + # + # in the nixpkgs checkout root to exercise them locally. + passthru.tests = + let + runLocal = name: attrs: script: + let + attrs' = removeAttrs attrs [ "buildInputs" ]; + buildInputs = [ python3 ] ++ (attrs.buildInputs or []); + in + runCommandCC name ({ + inherit buildInputs; + preferLocalBuild = true; + meta.platforms = platforms; + } // attrs') script; + + # bazel wants to extract itself into $install_dir/install every time it runs, + # so let’s do that only once. + extracted = bazelPkg: + let install_dir = + # `install_base` field printed by `bazel info`, minus the hash. + # yes, this path is kinda magic. Sorry. + "$HOME/.cache/bazel/_bazel_nixbld"; + in runLocal "bazel-extracted-homedir" { passthru.install_dir = install_dir; } '' + export HOME=$(mktemp -d) + touch WORKSPACE # yeah, everything sucks + install_base="$(${bazelPkg}/bin/bazel info | grep install_base)" + # assert it’s actually below install_dir + [[ "$install_base" =~ ${install_dir} ]] \ + || (echo "oh no! $install_base but we are \ + trying to copy ${install_dir} to $out instead!"; exit 1) + cp -R ${install_dir} $out + ''; + + bazelTest = { name, bazelScript, workspaceDir, bazelPkg, buildInputs ? [] }: + let + be = extracted bazelPkg; + in runLocal name { inherit buildInputs; } ( + # skip extraction caching on Darwin, because nobody knows how Darwin works + (lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + # set up home with pre-unpacked bazel + export HOME=$(mktemp -d) + mkdir -p ${be.install_dir} + cp -R ${be}/install ${be.install_dir} + + # https://stackoverflow.com/questions/47775668/bazel-how-to-skip-corrupt-installation-on-centos6 + # Bazel checks whether the mtime of the install dir files + # is >9 years in the future, otherwise it extracts itself again. + # see PosixFileMTime::IsUntampered in src/main/cpp/util + # What the hell bazel. + ${lr}/bin/lr -0 -U ${be.install_dir} | ${xe}/bin/xe -N0 -0 touch --date="9 years 6 months" {} + '') + + + '' + # Note https://github.com/bazelbuild/bazel/issues/5763#issuecomment-456374609 + # about why to create a subdir for the workspace. + cp -r ${workspaceDir} wd && chmod u+w wd && cd wd + + ${bazelScript} + + touch $out + ''); + + bazelWithNixHacks = bazel_self.override { enableNixHacks = true; }; + + bazel-examples = fetchFromGitHub { + owner = "bazelbuild"; + repo = "examples"; + rev = "5d8c8961a2516ebf875787df35e98cadd08d43dc"; + sha256 = "03c1bwlq5bs3hg96v4g4pg2vqwhqq6w538h66rcpw02f83yy7fs8"; + }; + + in (if !stdenv.hostPlatform.isDarwin then { + # `extracted` doesn’t work on darwin + shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; }; + } else {}) // { + bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; }; + cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; + java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; + protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; }; + pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; }; + + bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + + cppWithNixHacks = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; }; + javaWithNixHacks = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; }; + protobufWithNixHacks = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + pythonBinPathWithNixHacks = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + + # downstream packages using buildBazelPackage + # fixed-output hashes of the fetch phase need to be spot-checked manually + downstream = recurseIntoAttrs ({ + inherit bazel-watcher; + } + # dm-sonnet is only packaged for linux + // (lib.optionalAttrs stdenv.isLinux { + # TODO(timokau) dm-sonnet is broken currently + # dm-sonnet-linux = python3.pkgs.dm-sonnet; + })); + }; + + # update the list of workspace dependencies + passthru.updater = writeScript "update-bazel-deps.sh" '' + #!${runtimeShell} + cat ${runCommand "bazel-deps.json" {} '' + ${unzip}/bin/unzip ${src} WORKSPACE + ${python3}/bin/python3 ${../update-srcDeps.py} ./WORKSPACE > $out + ''} > ${builtins.toString ./src-deps.json} + ''; + + # Necessary for the tests to pass on Darwin with sandbox enabled. + # Bazel starts a local server and needs to bind a local address. + __darwinAllowLocalNetworking = true; + + # Bazel expects several utils to be available in Bash even without PATH. Hence this hack. + customBash = writeCBin "bash" '' + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <unistd.h> + + extern char **environ; + + int main(int argc, char *argv[]) { + char *path = getenv("PATH"); + char *pathToAppend = "${defaultShellPath}"; + char *newPath; + if (path != NULL) { + int length = strlen(path) + 1 + strlen(pathToAppend) + 1; + newPath = malloc(length * sizeof(char)); + snprintf(newPath, length, "%s:%s", path, pathToAppend); + } else { + newPath = pathToAppend; + } + setenv("PATH", newPath, 1); + execve("${bash}/bin/bash", argv, environ); + return 0; + } + ''; + + postPatch = let + + darwinPatches = '' + bazelLinkFlags () { + eval set -- "$NIX_LDFLAGS" + local flag + for flag in "$@"; do + printf ' -Wl,%s' "$flag" + done + } + + # Disable Bazel's Xcode toolchain detection which would configure compilers + # 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+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" + + # libcxx includes aren't added by libcxx hook + # https://github.com/NixOS/nixpkgs/pull/41589 + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${llvmPackages_8.libcxx}/include/c++/v1" + + # don't use system installed Xcode to run clang, use Nix clang instead + sed -i -E "s;/usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9;${stdenv'.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \ + scripts/bootstrap/compile.sh \ + src/tools/xcode/realpath/BUILD \ + src/tools/xcode/stdredirect/BUILD \ + tools/osx/BUILD + + # nixpkgs's libSystem cannot use pthread headers directly, must import GCD headers instead + sed -i -e "/#include <pthread\/spawn.h>/i #include <dispatch/dispatch.h>" src/main/cpp/blaze_util_darwin.cc + + # clang installed from Xcode has a compatibility wrapper that forwards + # invocations of gcc to clang, but vanilla clang doesn't + sed -i -e 's;_find_generic(repository_ctx, "gcc", "CC", overriden_tools);_find_generic(repository_ctx, "clang", "CC", overriden_tools);g' tools/cpp/unix_cc_configure.bzl + + sed -i -e 's;/usr/bin/libtool;${cctools}/bin/libtool;g' tools/cpp/unix_cc_configure.bzl + wrappers=( tools/cpp/osx_cc_wrapper.sh tools/cpp/osx_cc_wrapper.sh.tpl ) + for wrapper in "''${wrappers[@]}"; do + sed -i -e "s,/usr/bin/install_name_tool,${cctools}/bin/install_name_tool,g" $wrapper + done + ''; + + genericPatches = '' + # Substitute j2objc and objc wrapper's python shebang to plain python path. + # These scripts explicitly depend on Python 2.7, hence we use python27. + # See also `postFixup` where python27 is added to $out/nix-support + substituteInPlace tools/j2objc/j2objc_header_map.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + substituteInPlace tools/j2objc/j2objc_wrapper.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + substituteInPlace tools/objc/j2objc_dead_code_pruner.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + + # md5sum is part of coreutils + sed -i 's|/sbin/md5|md5sum|g' \ + src/BUILD + + # substituteInPlace is rather slow, so prefilter the files with grep + grep -rlZ /bin src/main/java/com/google/devtools | while IFS="" read -r -d "" path; do + # If you add more replacements here, you must change the grep above! + # Only files containing /bin are taken into account. + # We default to python3 where possible. See also `postFixup` where + # python3 is added to $out/nix-support + substituteInPlace "$path" \ + --replace /bin/bash ${customBash}/bin/bash \ + --replace "/usr/bin/env bash" ${customBash}/bin/bash \ + --replace "/usr/bin/env python" ${python3}/bin/python \ + --replace /usr/bin/env ${coreutils}/bin/env \ + --replace /bin/true ${coreutils}/bin/true + done + + # bazel test runner include references to /bin/bash + substituteInPlace tools/build_rules/test_rules.bzl \ + --replace /bin/bash ${customBash}/bin/bash + + for i in $(find tools/cpp/ -type f) + do + substituteInPlace $i \ + --replace /bin/bash ${customBash}/bin/bash + done + + # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. + substituteInPlace scripts/bootstrap/compile.sh \ + --replace /bin/bash ${customBash}/bin/bash + + # add nix environment vars to .bazelrc + cat >> .bazelrc <<EOF + build --distdir=${distDir} + fetch --distdir=${distDir} + build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')" + build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')" + build --linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')" + build --host_linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')" + build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')" + build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')" + build --host_javabase='@local_jdk//:jdk' + build --host_java_toolchain='${javaToolchain}' + EOF + + # add the same environment vars to compile.sh + sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \ + -e "/\$command \\\\$/a --host_java_toolchain='${javaToolchain}' \\\\" \ + -i scripts/bootstrap/compile.sh + + # This is necessary to avoid: + # "error: no visible @interface for 'NSDictionary' declares the selector + # 'initWithContentsOfURL:error:'" + # This can be removed when the apple_sdk is upgraded beyond 10.13+ + sed -i '/initWithContentsOfURL:versionPlistUrl/ { + N + s/error:nil\];/\];/ + }' tools/osx/xcode_locator.m + + # append the PATH with defaultShellPath in tools/bash/runfiles/runfiles.bash + echo "PATH=\$PATH:${defaultShellPath}" >> runfiles.bash.tmp + cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp + mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash + + patchShebangs . + ''; + in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches + + genericPatches; + + buildInputs = [ + buildJdk + python3 + ]; + + # when a command can’t be found in a bazel build, you might also + # need to add it to `defaultShellPath`. + nativeBuildInputs = [ + zip + python3 + unzip + makeWrapper + which + customBash + ] ++ lib.optionals (stdenv.isDarwin) [ cctools CoreFoundation CoreServices Foundation ]; + + # Bazel makes extensive use of symlinks in the WORKSPACE. + # This causes problems with infinite symlinks if the build output is in the same location as the + # Bazel WORKSPACE. This is why before executing the build, the source code is moved into a + # subdirectory. + # Failing to do this causes "infinite symlink expansion detected" + preBuildPhases = ["preBuildPhase"]; + preBuildPhase = '' + mkdir bazel_src + shopt -s dotglob extglob + mv !(bazel_src) bazel_src + ''; + + buildPhase = '' + # Increasing memory during compilation might be necessary. + # export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m" + ./bazel_src/compile.sh + ./bazel_src/scripts/generate_bash_completion.sh \ + --bazel=./bazel_src/output/bazel \ + --output=./bazel_src/output/bazel-complete.bash \ + --prepend=./bazel_src/scripts/bazel-complete-header.bash \ + --prepend=./bazel_src/scripts/bazel-complete-template.bash + ''; + + installPhase = '' + mkdir -p $out/bin + + # official wrapper scripts that searches for $WORKSPACE_ROOT/tools/bazel + # if it can’t find something in tools, it calls $out/bin/bazel-real + cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel + mv ./bazel_src/output/bazel $out/bin/bazel-real + + # shell completion files + mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions + mv ./bazel_src/output/bazel-complete.bash $out/share/bash-completion/completions/bazel + cp ./bazel_src/scripts/zsh_completion/_bazel $out/share/zsh/site-functions/ + ''; + + doInstallCheck = true; + installCheckPhase = '' + export TEST_TMPDIR=$(pwd) + + hello_test () { + $out/bin/bazel test --distdir=${distDir} \ + --test_output=errors \ + --java_toolchain='${javaToolchain}' \ + examples/cpp:hello-success_test \ + examples/java-native/src/test/java/com/example/myproject:hello + } + + cd ./bazel_src + + # test whether $WORKSPACE_ROOT/tools/bazel works + + mkdir -p tools + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exit 1 + EOF + chmod +x tools/bazel + + # first call should fail if tools/bazel is used + ! hello_test + + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exec "$BAZEL_REAL" "$@" + EOF + + # second call succeeds because it defers to $out/bin/bazel-real + hello_test + ''; + + # Save paths to hardcoded dependencies so Nix can detect them. + postFixup = '' + mkdir -p $out/nix-support + echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends + # The templates get tar’d up into a .jar, + # so nix can’t detect python is needed in the runtime closure + # Some of the scripts explicitly depend on Python 2.7. Otherwise, we + # default to using python3. Therefore, both python27 and python3 are + # runtime dependencies. + echo "${python27}" >> $out/nix-support/depends + echo "${python3}" >> $out/nix-support/depends + '' + lib.optionalString stdenv.isDarwin '' + echo "${cctools}" >> $out/nix-support/depends + ''; + + dontStrip = true; + dontPatchELF = true; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/glibc.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/glibc.patch new file mode 100644 index 000000000000..c4de48068f11 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/glibc.patch @@ -0,0 +1,78 @@ +From https://github.com/grpc/grpc/commit/57586a1ca7f17b1916aed3dea4ff8de872dbf853 +From: Benjamin Peterson <benjamin@dropbox.com> +Date: Fri, 3 May 2019 08:11:00 -0700 +Subject: [PATCH] Rename gettid() functions. + +glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts. +--- + src/core/lib/gpr/log_linux.cc | 6 ++---- + src/core/lib/gpr/log_posix.cc | 4 ++-- + src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- + 3 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/third_party/grpc/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc +index 81026e5689b..8b597b4cf2f 100644 +--- a/third_party/grpc/src/core/lib/gpr/log_linux.cc ++++ b/third_party/grpc/src/core/lib/gpr/log_linux.cc +@@ -40,7 +40,7 @@ + #include <time.h> + #include <unistd.h> + +-static long gettid(void) { return syscall(__NR_gettid); } ++static long sys_gettid(void) { return syscall(__NR_gettid); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) { + gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); + struct tm tm; + static __thread long tid = 0; +- if (tid == 0) tid = gettid(); ++ if (tid == 0) tid = sys_gettid(); + + timer = static_cast<time_t>(now.tv_sec); + final_slash = strrchr(args->file, '/'); +diff --git a/third_party/grpc/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc +index b6edc14ab6b..2f7c6ce3760 100644 +--- a/third_party/grpc/src/core/lib/gpr/log_posix.cc ++++ b/third_party/grpc/src/core/lib/gpr/log_posix.cc +@@ -31,7 +31,7 @@ + #include <string.h> + #include <time.h> + +-static intptr_t gettid(void) { return (intptr_t)pthread_self(); } ++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) { + char* prefix; + gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]", + gpr_log_severity_string(args->severity), time_buffer, +- (int)(now.tv_nsec), gettid(), display_file, args->line); ++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line); + + fprintf(stderr, "%-70s %s\n", prefix, args->message); + gpr_free(prefix); +diff --git a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc +index c2d80c08ddb..4a83cb6c215 100644 +--- a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc ++++ b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc +@@ -1077,7 +1077,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, + } + + #ifndef NDEBUG +-static long gettid(void) { return syscall(__NR_gettid); } ++static long sys_gettid(void) { return syscall(__NR_gettid); } + #endif + + /* pollset->mu lock must be held by the caller before calling this. +@@ -1097,7 +1097,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset, + #define WORKER_PTR (&worker) + #endif + #ifndef NDEBUG +- WORKER_PTR->originator = gettid(); ++ WORKER_PTR->originator = sys_gettid(); + #endif + if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { + gpr_log(GPR_INFO, diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/src-deps.json b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/src-deps.json new file mode 100644 index 000000000000..7cf939daa72b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_1/src-deps.json @@ -0,0 +1,506 @@ +{ + "0.16.2.zip": { + "name": "0.16.2.zip", + "sha256": "9b72bb0aea72d7cbcfc82a01b1e25bf3d85f791e790ddec16c65e2d906382ee0", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip", + "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip" + ] + }, + "0.28.3.tar.gz": { + "name": "0.28.3.tar.gz", + "sha256": "d8c2f20deb2f6143bac792d210db1a4872102d81529fe0ea3476c1696addd7ff", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.28.3.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.3.tar.gz" + ] + }, + "0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip": { + "name": "0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip", + "sha256": "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip", + "https://github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip" + ] + }, + "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip": { + "name": "441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip", + "sha256": "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip", + "https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip" + ] + }, + "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": { + "name": "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ] + }, + "8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz": { + "name": "8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz", + "sha256": "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz", + "https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz" + ] + }, + "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": { + "name": "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz" + ] + }, + "android_tools_pkg-0.12.tar.gz": { + "name": "android_tools_pkg-0.12.tar.gz", + "sha256": "96c4eef4d195dd95e43a4259cf5b82a1e34f67333439e91955bbdc0e1c8e7a31", + "urls": [ + "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.12.tar.gz" + ] + }, + "bazel_j2objc": { + "name": "bazel_j2objc", + "sha256": "8d3403b5b7db57e347c943d214577f6879e5b175c2b59b7e075c0b6453330e9b", + "strip_prefix": "j2objc-2.5", + "urls": [ + "https://mirror.bazel.build/github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip", + "https://github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip" + ] + }, + "bazel_skylib": { + "name": "bazel_skylib", + "sha256": "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52", + "strip_prefix": "bazel-skylib-f83cb8dd6f5658bc574ccd873e25197055265d1c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz" + ] + }, + "bazel_toolchains": { + "name": "bazel_toolchains", + "sha256": "d8c2f20deb2f6143bac792d210db1a4872102d81529fe0ea3476c1696addd7ff", + "strip_prefix": "bazel-toolchains-0.28.3", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.28.3.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.3.tar.gz" + ] + }, + "build_bazel_rules_nodejs": { + "name": "build_bazel_rules_nodejs", + "sha256": "9b72bb0aea72d7cbcfc82a01b1e25bf3d85f791e790ddec16c65e2d906382ee0", + "strip_prefix": "rules_nodejs-0.16.2", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip", + "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip" + ] + }, + "c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz": { + "name": "c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz", + "sha256": "e6a76586b264f30679688f65f7e71ac112d1446681010a13bf22d9ca071f34b7", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz", + "https://github.com/bazelbuild/skydoc/archive/c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz" + ] + }, + "com_google_googletest": { + "name": "com_google_googletest", + "sha256": "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb", + "strip_prefix": "googletest-release-1.10.0", + "urls": [ + "https://mirror.bazel.build/github.com/google/googletest/archive/release-1.10.0.tar.gz", + "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" + ] + }, + "coverage_output_generator-v2.0.zip": { + "name": "coverage_output_generator-v2.0.zip", + "sha256": "3a6951051272d51613ac4c77af6ce238a3db321bf06506fde1b8866eb18a89dd", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.0.zip" + ] + }, + "desugar_jdk_libs": { + "name": "desugar_jdk_libs", + "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d", + "strip_prefix": "desugar_jdk_libs-e0b0291b2c51fbe5a7cfa14473a1ae850f94f021", + "urls": [ + "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip" + ] + }, + "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip": { + "name": "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d", + "urls": [ + "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip" + ] + }, + "f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz": { + "name": "f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", + "sha256": "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz" + ] + }, + "io_bazel_rules_sass": { + "name": "io_bazel_rules_sass", + "sha256": "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898", + "strip_prefix": "rules_sass-8ccf4f1c351928b55d5dddf3672e3667f6978d60", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz", + "https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz" + ] + }, + "io_bazel_skydoc": { + "name": "io_bazel_skydoc", + "sha256": "e6a76586b264f30679688f65f7e71ac112d1446681010a13bf22d9ca071f34b7", + "strip_prefix": "skydoc-c7bbde2950769aac9a99364b0926230060a3ce04", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/skydoc/archive/c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz", + "https://github.com/bazelbuild/skydoc/archive/c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz" + ] + }, + "java_tools_javac11_darwin-v6.1.zip": { + "name": "java_tools_javac11_darwin-v6.1.zip", + "sha256": "f0c488dac18f18ab1a0d18bbd65288c7a128e90a24d9c16f65bd8243f79483a0", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_darwin-v6.1.zip" + ] + }, + "java_tools_javac11_linux-v6.1.zip": { + "name": "java_tools_javac11_linux-v6.1.zip", + "sha256": "12f7940ed0bc4c2e82238951cdf19b4179c7dcc361d16fe40fe4266538fb4ac6", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_linux-v6.1.zip" + ] + }, + "java_tools_javac11_windows-v6.1.zip": { + "name": "java_tools_javac11_windows-v6.1.zip", + "sha256": "e2deb2efff684de78787e0bdc7620f9672d13f04a12856d8e7f677369a8e286b", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v6.1/java_tools_javac11_windows-v6.1.zip" + ] + }, + "java_tools_langtools_javac10": { + "name": "java_tools_langtools_javac10", + "sha256": "0e9c9ac5ef17869de3cb8c3497c4c0d31836ef7b63efe1690506f53783adb212", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk10_v2.zip" + ] + }, + "java_tools_langtools_javac11": { + "name": "java_tools_langtools_javac11", + "sha256": "cf0814fa002ef3d794582bb086516d8c9ed0958f83f19799cdb08949019fe4c7", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11_v2.zip" + ] + }, + "java_tools_langtools_javac12": { + "name": "java_tools_langtools_javac12", + "sha256": "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip" + ] + }, + "java_tools_langtools_javac9": { + "name": "java_tools_langtools_javac9", + "sha256": "d94befcfb325a9a62aebc2052e631fde2322b4df5c82a19ed260b38ba12a0ad1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk9_v2.zip" + ] + }, + "jdk10-server-release-1804.tar.xz": { + "name": "jdk10-server-release-1804.tar.xz", + "sha256": "b7098b7aaf6ee1ffd4a2d0371a0be26c5a5c87f6aebbe46fe9a92c90583a84be", + "urls": [ + "https://mirror.bazel.build/openjdk.linaro.org/releases/jdk10-server-release-1804.tar.xz" + ] + }, + "jdk9-server-release-1708.tar.xz": { + "name": "jdk9-server-release-1708.tar.xz", + "sha256": "72e7843902b0395e2d30e1e9ad2a5f05f36a4bc62529828bcbc698d54aec6022", + "urls": [ + "https://mirror.bazel.build/openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz" + ] + }, + "openjdk10_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk10_linux_archive", + "sha256": "b3c2d762091a615b0c1424ebbd05d75cc114da3bf4f25a0dec5c51ea7e84146f", + "strip_prefix": "zulu10.2+3-jdk10.0.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-linux_x64.tar.gz" + ] + }, + "openjdk11_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk11_linux_archive", + "sha256": "ddb0fd4526089cf1ce2db36282c282263f587a9e8be373fa02f511a12923cc48", + "strip_prefix": "zulu11.31.11-ca-jdk11.0.3-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.11-ca-jdk11.0.3/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz" + ] + }, + "openjdk12_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk12_linux_archive", + "sha256": "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13", + "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz" + ] + }, + "openjdk9_linux_archive": { + "build_file_content": "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])", + "name": "openjdk9_linux_archive", + "sha256": "45f2dfbee93b91b1468cf81d843fc6d9a47fef1f831c0b7ceff4f1eb6e6851c8", + "strip_prefix": "zulu9.0.7.1-jdk9.0.7-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz" + ] + }, + "openjdk_linux": { + "downloaded_file_path": "zulu-linux.tar.gz", + "name": "openjdk_linux", + "sha256": "460d8a4f0c0204160b48086e341b22943c9cca471b195340e75b38ae9eb33c1c", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64-allmodules-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209950.tar.gz" + ] + }, + "openjdk_linux_aarch64": { + "downloaded_file_path": "zulu-linux-aarch64.tar.gz", + "name": "openjdk_linux_aarch64", + "sha256": "23c37c0c3a8fdcbc68e96e70ff5c5c020c14db76deaae9b547849afda4586e5e", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64-allmodules-c82eb4878c7dc829455caeb915affe36c89df06f-1561630858.tar.gz" + ] + }, + "openjdk_linux_aarch64_minimal": { + "downloaded_file_path": "zulu-linux-aarch64-minimal.tar.gz", + "name": "openjdk_linux_aarch64_minimal", + "sha256": "7af2583fe5ef0a781d4a9dca0c0160d42e7db1305ec1b66f98aa44c91cc875df", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64-minimal-c82eb4878c7dc829455caeb915affe36c89df06f-1561630858.tar.gz" + ] + }, + "openjdk_linux_aarch64_vanilla": { + "downloaded_file_path": "zulu-linux-aarch64-vanilla.tar.gz", + "name": "openjdk_linux_aarch64_vanilla", + "sha256": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz" + ] + }, + "openjdk_linux_minimal": { + "downloaded_file_path": "zulu-linux-minimal.tar.gz", + "name": "openjdk_linux_minimal", + "sha256": "5123bc8dd21886761d1fd9ca0fb1898b3372d7243064a070ec81ca9c9d1a6791", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64-minimal-524ae2ca2a782c9f15e00f08bd35b3f8ceacbd7f-1556011926.tar.gz" + ] + }, + "openjdk_linux_vanilla": { + "downloaded_file_path": "zulu-linux-vanilla.tar.gz", + "name": "openjdk_linux_vanilla", + "sha256": "f3f44b6235508e87b760bf37a49e186cc1fa4e9cd28384c4dbf5a33991921e08", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz" + ] + }, + "openjdk_macos": { + "downloaded_file_path": "zulu-macos.tar.gz", + "name": "openjdk_macos", + "sha256": "8fa61d85ca6f657d646fdb50cfc8634987f8f7d8a3250ed39fb7364647633252", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64-allmodules-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209951.tar.gz" + ] + }, + "openjdk_macos_minimal": { + "downloaded_file_path": "zulu-macos-minimal.tar.gz", + "name": "openjdk_macos_minimal", + "sha256": "ac56e44db46fd56ac78b39b6823daed4faa74a2677ac340c7d217f863884ec0f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64-minimal-524ae2ca2a782c9f15e00f08bd35b3f8ceacbd7f-1556003114.tar.gz" + ] + }, + "openjdk_macos_vanilla": { + "downloaded_file_path": "zulu-macos-vanilla.tar.gz", + "name": "openjdk_macos_vanilla", + "sha256": "059f8e3484bf07b63a8f2820d5f528f473eff1befdb1896ee4f8ff06be3b8d8f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip" + ] + }, + "openjdk_win": { + "downloaded_file_path": "zulu-win.zip", + "name": "openjdk_win", + "sha256": "e6ddb361309f8e84eb5fb5ad8b0f5cc031ba3679910139262c31efd8f7579d05", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64-allmodules-90755145cb6e6418584d8603cd5fa9afbb30aecc-1549209972.zip" + ] + }, + "openjdk_win_minimal": { + "downloaded_file_path": "zulu-win-minimal.zip", + "name": "openjdk_win_minimal", + "sha256": "8e5dada6e9ebcc9ce29b4d051449bb95d3ee1e620e166da862224bbf15211f8b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64-minimal-524ae2ca2a782c9f15e00f08bd35b3f8ceacbd7f-1556003136.zip" + ] + }, + "openjdk_win_vanilla": { + "downloaded_file_path": "zulu-win-vanilla.zip", + "name": "openjdk_win_vanilla", + "sha256": "e1f5b4ce1b9148140fae2fcfb8a96d1c9b7eac5b8df0e13fbcad9b8561284880", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64.zip" + ] + }, + "platforms": { + "name": "platforms", + "sha256": "a07fe5e75964361885db725039c2ba673f0ee0313d971ae4f50c9b18cd28b0b5", + "strip_prefix": "platforms-441afe1bfdadd6236988e9cac159df6b5a9f5a98", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip", + "https://github.com/bazelbuild/platforms/archive/441afe1bfdadd6236988e9cac159df6b5a9f5a98.zip" + ] + }, + "rules_cc": { + "name": "rules_cc", + "sha256": "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89", + "strip_prefix": "rules_cc-0d5f3f2768c6ca2faca0079a997a97ce22997a0c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip", + "https://github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip" + ] + }, + "rules_java": { + "name": "rules_java", + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ] + }, + "rules_pkg": { + "name": "rules_pkg", + "sha256": "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/rules_pkg-0.2.0.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz" + ] + }, + "rules_pkg-0.2.0.tar.gz": { + "name": "rules_pkg-0.2.0.tar.gz", + "sha256": "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/rules_pkg-0.2.0.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz" + ] + }, + "rules_proto": { + "name": "rules_proto", + "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "strip_prefix": "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz" + ] + }, + "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz": { + "name": "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz", + "sha256": "57fad3602e74c79587901d6966d3b54ef32cb811829a2552163185d5064fe9b5", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz" + ] + }, + "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz": { + "name": "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz", + "sha256": "e669c9a897413d855b550b4e39d79614392e6fb96f494e8ef99a34297d9d85d3", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz" + ] + }, + "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip": { + "name": "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip", + "sha256": "c39e7700a8d41794d60985df5a20352435196e78ecbc6a2b30df7be8637bffd5", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" + ] + }, + "zulu11.2.3-jdk11.0.1-linux_x64.tar.gz": { + "name": "zulu11.2.3-jdk11.0.1-linux_x64.tar.gz", + "sha256": "232b1c3511f0d26e92582b7c3cc363be7ac633e371854ca2f2e9f2b50eb72a75", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz" + ] + }, + "zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz": { + "name": "zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz", + "sha256": "1edf366ee821e5db8e348152fcb337b28dfd6bf0f97943c270dcc6747cedb6cb", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz" + ] + }, + "zulu11.2.3-jdk11.0.1-win_x64.zip": { + "name": "zulu11.2.3-jdk11.0.1-win_x64.zip", + "sha256": "8e1e2b8347de6746f3fd1538840dd643201533ab113abc4ed93678e342d28aa3", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-win_x64.zip" + ] + }, + "zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz": { + "name": "zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz", + "sha256": "f3f44b6235508e87b760bf37a49e186cc1fa4e9cd28384c4dbf5a33991921e08", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-linux_x64.tar.gz" + ] + }, + "zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip": { + "name": "zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip", + "sha256": "059f8e3484bf07b63a8f2820d5f528f473eff1befdb1896ee4f8ff06be3b8d8f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-macosx_x64.zip" + ] + }, + "zulu11.29.3-ca-jdk11.0.2-win_x64.zip": { + "name": "zulu11.29.3-ca-jdk11.0.2-win_x64.zip", + "sha256": "e1f5b4ce1b9148140fae2fcfb8a96d1c9b7eac5b8df0e13fbcad9b8561284880", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.29.3-ca-jdk11.0.2/zulu11.29.3-ca-jdk11.0.2-win_x64.zip" + ] + }, + "zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz": { + "name": "zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz", + "sha256": "3b0d91611b1bdc4d409afcf9eab4f0e7f4ae09f88fc01bd9f2b48954882ae69b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.31.15-ca-jdk11.0.3/zulu11.31.15-ca-jdk11.0.3-linux_aarch64.tar.gz" + ] + }, + "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz": { + "name": "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz", + "sha256": "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz" + ] + }, + "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz": { + "name": "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz", + "sha256": "404e7058ff91f956612f47705efbee8e175a38b505fb1b52d8c1ea98718683de", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz" + ] + }, + "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip": { + "name": "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip", + "sha256": "e738829017f107e7a7cd5069db979398ec3c3f03ef56122f89ba38e7374f63ed", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip" + ] + } +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix new file mode 100644 index 000000000000..0bfc9071d7e6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix @@ -0,0 +1,584 @@ +{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub, installShellFiles +, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs +# this package (through the fixpoint glass) +, bazel_self +, lr, xe, zip, unzip, bash, writeCBin, coreutils +, which, gawk, gnused, gnutar, gnugrep, gzip, findutils +# updater +, python27, python3, writeScript +# Apple dependencies +, cctools, libcxx, CoreFoundation, CoreServices, Foundation +# Allow to independently override the jdks used to build and run respectively +, buildJdk, runJdk +, buildJdkName +, runtimeShell +# Downstream packages for tests +, bazel-watcher +# Always assume all markers valid (this is needed because we remove markers; they are non-deterministic). +# Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers). +, enableNixHacks ? false +, gcc-unwrapped +, autoPatchelfHook +, file +, substituteAll +, writeTextFile +}: + +let + version = "3.3.1"; + + src = fetchurl { + url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; + sha256 = "0ir796kl8r9hpr3li26qsdy1z2lx2bv82zmk4a2s7q64clyg9wg0"; + }; + + # Update with `eval $(nix-build -A bazel.updater)`, + # then add new dependencies from the dict in ./src-deps.json as required. + srcDeps = lib.attrsets.attrValues srcDepsSet; + srcDepsSet = + let + srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json)); + toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl { + urls = d.urls; + sha256 = d.sha256; + }); + in builtins.listToAttrs (map toFetchurl [ + srcs.desugar_jdk_libs + srcs.io_bazel_skydoc + srcs.bazel_skylib + srcs.io_bazel_rules_sass + srcs.platforms + (if stdenv.hostPlatform.isDarwin + then srcs."java_tools_javac11_darwin-v8.0.zip" + else srcs."java_tools_javac11_linux-v8.0.zip") + srcs."coverage_output_generator-v2.1.zip" + srcs.build_bazel_rules_nodejs + srcs."android_tools_pkg-0.19.0rc1.tar.gz" + srcs."bazel-toolchains-3.1.0.tar.gz" + srcs.rules_pkg + srcs.rules_cc + srcs.rules_java + srcs.rules_proto + ]); + + distDir = runCommand "bazel-deps" {} '' + mkdir -p $out + for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done + ''; + + defaultShellPath = lib.makeBinPath + # Keep this list conservative. For more exotic tools, prefer to use + # @rules_nixpkgs to pull in tools from the nix repository. Example: + # + # WORKSPACE: + # + # nixpkgs_git_repository( + # name = "nixpkgs", + # revision = "def5124ec8367efdba95a99523dd06d918cb0ae8", + # ) + # + # # This defines an external Bazel workspace. + # nixpkgs_package( + # name = "bison", + # repositories = { "nixpkgs": "@nixpkgs//:default.nix" }, + # ) + # + # some/BUILD.bazel: + # + # genrule( + # ... + # cmd = "$(location @bison//:bin/bison) -other -args", + # tools = [ + # ... + # "@bison//:bin/bison", + # ], + # ) + # + [ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip ]; + + # Java toolchain used for the build and tests + javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}"; + + platforms = lib.platforms.linux ++ lib.platforms.darwin; + + # This repository is fetched by bazel at runtime + # however it contains prebuilt java binaries, with wrong interpreter + # and libraries path. + # We prefetch it, patch it, and override it in a global bazelrc. + system = if stdenv.hostPlatform.isDarwin then "darwin" else "linux"; + arch = stdenv.hostPlatform.parsed.cpu.name; + + remote_java_tools = stdenv.mkDerivation { + name = "remote_java_tools_${system}"; + + src = srcDepsSet."java_tools_javac11_${system}-v8.0.zip"; + + nativeBuildInputs = [ autoPatchelfHook unzip ]; + buildInputs = [ gcc-unwrapped ]; + + sourceRoot = "."; + + buildPhase = '' + mkdir $out; + ''; + + installPhase = '' + cp -Ra * $out/ + touch $out/WORKSPACE + ''; + }; + + bazelRC = writeTextFile { + name = "bazel-rc"; + text = '' + build --override_repository=${remote_java_tools.name}=${remote_java_tools} + build --distdir=${distDir} + startup --server_javabase=${runJdk} + + # load default location for the system wide configuration + try-import /etc/bazel.bazelrc + ''; + }; + +in +stdenv.mkDerivation rec { + pname = "bazel"; + inherit version; + + meta = with lib; { + homepage = "https://github.com/bazelbuild/bazel/"; + description = "Build tool that builds code quickly and reliably"; + license = licenses.asl20; + maintainers = [ maintainers.mboes ]; + inherit platforms; + }; + + inherit src; + sourceRoot = "."; + + patches = [ + ./python-shebang.patch + + # On Darwin, the last argument to gcc is coming up as an empty string. i.e: '' + # This is breaking the build of any C target. This patch removes the last + # argument if it's found to be an empty string. + ../trim-last-argument-to-gcc-if-empty.patch + + # --experimental_strict_action_env (which may one day become the default + # see bazelbuild/bazel#2574) hardcodes the default + # action environment to a non hermetic value (e.g. "/usr/local/bin"). + # This is non hermetic on non-nixos systems. On NixOS, bazel cannot find the required binaries. + # So we are replacing this bazel paths by defaultShellPath, + # improving hermeticity and making it work in nixos. + (substituteAll { + src = ../strict_action_env.patch; + strictActionEnvPatch = defaultShellPath; + }) + + # bazel reads its system bazelrc in /etc + # override this path to a builtin one + (substituteAll { + src = ../bazel_rc.patch; + bazelSystemBazelRCPath = bazelRC; + }) + ] ++ lib.optional enableNixHacks ../nix-hacks.patch; + + + # Additional tests that check bazel’s functionality. Execute + # + # nix-build . -A bazel.tests + # + # in the nixpkgs checkout root to exercise them locally. + passthru.tests = + let + runLocal = name: attrs: script: + let + attrs' = removeAttrs attrs [ "buildInputs" ]; + buildInputs = [ python3 ] ++ (attrs.buildInputs or []); + in + runCommandCC name ({ + inherit buildInputs; + preferLocalBuild = true; + meta.platforms = platforms; + } // attrs') script; + + # bazel wants to extract itself into $install_dir/install every time it runs, + # so let’s do that only once. + extracted = bazelPkg: + let install_dir = + # `install_base` field printed by `bazel info`, minus the hash. + # yes, this path is kinda magic. Sorry. + "$HOME/.cache/bazel/_bazel_nixbld"; + in runLocal "bazel-extracted-homedir" { passthru.install_dir = install_dir; } '' + export HOME=$(mktemp -d) + touch WORKSPACE # yeah, everything sucks + install_base="$(${bazelPkg}/bin/bazel info | grep install_base)" + # assert it’s actually below install_dir + [[ "$install_base" =~ ${install_dir} ]] \ + || (echo "oh no! $install_base but we are \ + trying to copy ${install_dir} to $out instead!"; exit 1) + cp -R ${install_dir} $out + ''; + + bazelTest = { name, bazelScript, workspaceDir, bazelPkg, buildInputs ? [] }: + let + be = extracted bazelPkg; + in runLocal name { inherit buildInputs; } ( + # skip extraction caching on Darwin, because nobody knows how Darwin works + (lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + # set up home with pre-unpacked bazel + export HOME=$(mktemp -d) + mkdir -p ${be.install_dir} + cp -R ${be}/install ${be.install_dir} + + # https://stackoverflow.com/questions/47775668/bazel-how-to-skip-corrupt-installation-on-centos6 + # Bazel checks whether the mtime of the install dir files + # is >9 years in the future, otherwise it extracts itself again. + # see PosixFileMTime::IsUntampered in src/main/cpp/util + # What the hell bazel. + ${lr}/bin/lr -0 -U ${be.install_dir} | ${xe}/bin/xe -N0 -0 touch --date="9 years 6 months" {} + '') + + + '' + # Note https://github.com/bazelbuild/bazel/issues/5763#issuecomment-456374609 + # about why to create a subdir for the workspace. + cp -r ${workspaceDir} wd && chmod u+w wd && cd wd + + ${bazelScript} + + touch $out + ''); + + bazelWithNixHacks = bazel_self.override { enableNixHacks = true; }; + + bazel-examples = fetchFromGitHub { + owner = "bazelbuild"; + repo = "examples"; + rev = "5d8c8961a2516ebf875787df35e98cadd08d43dc"; + sha256 = "03c1bwlq5bs3hg96v4g4pg2vqwhqq6w538h66rcpw02f83yy7fs8"; + }; + + in (if !stdenv.hostPlatform.isDarwin then { + # `extracted` doesn’t work on darwin + shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; }; + } else {}) // { + bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; }; + cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; + java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; + protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; }; + pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; }; + + bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + + cppWithNixHacks = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; }; + javaWithNixHacks = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; }; + protobufWithNixHacks = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + pythonBinPathWithNixHacks = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; + + # downstream packages using buildBazelPackage + # fixed-output hashes of the fetch phase need to be spot-checked manually + downstream = recurseIntoAttrs ({ + inherit bazel-watcher; + } + # dm-sonnet is only packaged for linux + // (lib.optionalAttrs stdenv.isLinux { + # TODO(timokau) dm-sonnet is broken currently + # dm-sonnet-linux = python3.pkgs.dm-sonnet; + })); + }; + + # update the list of workspace dependencies + passthru.updater = writeScript "update-bazel-deps.sh" '' + #!${runtimeShell} + cat ${runCommand "bazel-deps.json" {} '' + ${unzip}/bin/unzip ${src} WORKSPACE + ${python3}/bin/python3 ${../update-srcDeps.py} ./WORKSPACE > $out + ''} > ${builtins.toString ./src-deps.json} + ''; + + # Necessary for the tests to pass on Darwin with sandbox enabled. + # Bazel starts a local server and needs to bind a local address. + __darwinAllowLocalNetworking = true; + + # Bazel expects several utils to be available in Bash even without PATH. Hence this hack. + customBash = writeCBin "bash" '' + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <unistd.h> + + extern char **environ; + + int main(int argc, char *argv[]) { + char *path = getenv("PATH"); + char *pathToAppend = "${defaultShellPath}"; + char *newPath; + if (path != NULL) { + int length = strlen(path) + 1 + strlen(pathToAppend) + 1; + newPath = malloc(length * sizeof(char)); + snprintf(newPath, length, "%s:%s", path, pathToAppend); + } else { + newPath = pathToAppend; + } + setenv("PATH", newPath, 1); + execve("${bash}/bin/bash", argv, environ); + return 0; + } + ''; + + postPatch = let + + darwinPatches = '' + bazelLinkFlags () { + eval set -- "$NIX_LDFLAGS" + local flag + for flag in "$@"; do + printf ' -Wl,%s' "$flag" + done + } + + # Disable Bazel's Xcode toolchain detection which would configure compilers + # 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+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" + + # libcxx includes aren't added by libcxx hook + # https://github.com/NixOS/nixpkgs/pull/41589 + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1" + + # don't use system installed Xcode to run clang, use Nix clang instead + sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \ + scripts/bootstrap/compile.sh \ + src/tools/xcode/realpath/BUILD \ + src/tools/xcode/stdredirect/BUILD \ + tools/osx/BUILD + + # nixpkgs's libSystem cannot use pthread headers directly, must import GCD headers instead + sed -i -e "/#include <pthread\/spawn.h>/i #include <dispatch/dispatch.h>" src/main/cpp/blaze_util_darwin.cc + + # clang installed from Xcode has a compatibility wrapper that forwards + # invocations of gcc to clang, but vanilla clang doesn't + sed -i -e 's;_find_generic(repository_ctx, "gcc", "CC", overriden_tools);_find_generic(repository_ctx, "clang", "CC", overriden_tools);g' tools/cpp/unix_cc_configure.bzl + + sed -i -e 's;/usr/bin/libtool;${cctools}/bin/libtool;g' tools/cpp/unix_cc_configure.bzl + wrappers=( tools/cpp/osx_cc_wrapper.sh tools/cpp/osx_cc_wrapper.sh.tpl ) + for wrapper in "''${wrappers[@]}"; do + sed -i -e "s,/usr/bin/install_name_tool,${cctools}/bin/install_name_tool,g" $wrapper + done + ''; + + genericPatches = '' + # Substitute j2objc and objc wrapper's python shebang to plain python path. + # These scripts explicitly depend on Python 2.7, hence we use python27. + # See also `postFixup` where python27 is added to $out/nix-support + substituteInPlace tools/j2objc/j2objc_header_map.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + substituteInPlace tools/j2objc/j2objc_wrapper.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + substituteInPlace tools/objc/j2objc_dead_code_pruner.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python" + + # md5sum is part of coreutils + sed -i 's|/sbin/md5|md5sum|' \ + src/BUILD + + # replace initial value of pythonShebang variable in BazelPythonSemantics.java + substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java \ + --replace '"#!/usr/bin/env " + pythonExecutableName' "\"#!${python3}/bin/python\"" + + # substituteInPlace is rather slow, so prefilter the files with grep + grep -rlZ /bin src/main/java/com/google/devtools | while IFS="" read -r -d "" path; do + # If you add more replacements here, you must change the grep above! + # Only files containing /bin are taken into account. + # We default to python3 where possible. See also `postFixup` where + # python3 is added to $out/nix-support + substituteInPlace "$path" \ + --replace /bin/bash ${customBash}/bin/bash \ + --replace "/usr/bin/env bash" ${customBash}/bin/bash \ + --replace "/usr/bin/env python" ${python3}/bin/python \ + --replace /usr/bin/env ${coreutils}/bin/env \ + --replace /bin/true ${coreutils}/bin/true + done + + # bazel test runner include references to /bin/bash + substituteInPlace tools/build_rules/test_rules.bzl \ + --replace /bin/bash ${customBash}/bin/bash + + for i in $(find tools/cpp/ -type f) + do + substituteInPlace $i \ + --replace /bin/bash ${customBash}/bin/bash + done + + # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. + substituteInPlace scripts/bootstrap/compile.sh \ + --replace /bin/bash ${customBash}/bin/bash + + # add nix environment vars to .bazelrc + cat >> .bazelrc <<EOF + # Limit the resources Bazel is allowed to use during the build to 1/2 the + # available RAM and 3/4 the available CPU cores. This should help avoid + # overwhelming the build machine. + build --local_ram_resources=HOST_RAM*.5 + build --local_cpu_resources=HOST_CPUS*.75 + + build --distdir=${distDir} + fetch --distdir=${distDir} + build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')" + build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')" + build --linkopt="$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')" + build --host_linkopt="$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')" + build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')" + build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')" + build --host_javabase='@local_jdk//:jdk' + build --host_java_toolchain='${javaToolchain}' + EOF + + # add the same environment vars to compile.sh + sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \ + -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \ + -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \ + -e "/\$command \\\\$/a --host_java_toolchain='${javaToolchain}' \\\\" \ + -i scripts/bootstrap/compile.sh + + # This is necessary to avoid: + # "error: no visible @interface for 'NSDictionary' declares the selector + # 'initWithContentsOfURL:error:'" + # This can be removed when the apple_sdk is upgraded beyond 10.13+ + sed -i '/initWithContentsOfURL:versionPlistUrl/ { + N + s/error:nil\];/\];/ + }' tools/osx/xcode_locator.m + + # append the PATH with defaultShellPath in tools/bash/runfiles/runfiles.bash + echo "PATH=\$PATH:${defaultShellPath}" >> runfiles.bash.tmp + cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp + mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash + + patchShebangs . + ''; + in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches + + genericPatches; + + buildInputs = [ + buildJdk + python3 + ]; + + # when a command can’t be found in a bazel build, you might also + # need to add it to `defaultShellPath`. + nativeBuildInputs = [ + installShellFiles + zip + python3 + unzip + makeWrapper + which + customBash + ] ++ lib.optionals (stdenv.isDarwin) [ cctools libcxx CoreFoundation CoreServices Foundation ]; + + # Bazel makes extensive use of symlinks in the WORKSPACE. + # This causes problems with infinite symlinks if the build output is in the same location as the + # Bazel WORKSPACE. This is why before executing the build, the source code is moved into a + # subdirectory. + # Failing to do this causes "infinite symlink expansion detected" + preBuildPhases = ["preBuildPhase"]; + preBuildPhase = '' + mkdir bazel_src + shopt -s dotglob extglob + mv !(bazel_src) bazel_src + ''; + + buildPhase = '' + # Increasing memory during compilation might be necessary. + # export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m" + ./bazel_src/compile.sh + ./bazel_src/scripts/generate_bash_completion.sh \ + --bazel=./bazel_src/output/bazel \ + --output=./bazel_src/output/bazel-complete.bash \ + --prepend=./bazel_src/scripts/bazel-complete-header.bash \ + --prepend=./bazel_src/scripts/bazel-complete-template.bash + ''; + + installPhase = '' + mkdir -p $out/bin + + # official wrapper scripts that searches for $WORKSPACE_ROOT/tools/bazel + # if it can’t find something in tools, it calls $out/bin/bazel-{version}-{os_arch} + # The binary _must_ exist with this naming if your project contains a .bazelversion + # file. + cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel + mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch} + + # shell completion files + installShellCompletion --bash \ + --name bazel.bash \ + ./bazel_src/output/bazel-complete.bash + installShellCompletion --zsh \ + --name _bazel \ + ./bazel_src/scripts/zsh_completion/_bazel + installShellCompletion --fish \ + --name bazel.fish \ + ./bazel_src/scripts/fish/completions/bazel.fish + ''; + + doInstallCheck = true; + installCheckPhase = '' + export TEST_TMPDIR=$(pwd) + + hello_test () { + $out/bin/bazel test --distdir=${distDir} \ + --test_output=errors \ + --java_toolchain='${javaToolchain}' \ + examples/cpp:hello-success_test \ + examples/java-native/src/test/java/com/example/myproject:hello + } + + cd ./bazel_src + + # test whether $WORKSPACE_ROOT/tools/bazel works + + mkdir -p tools + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exit 1 + EOF + chmod +x tools/bazel + + # first call should fail if tools/bazel is used + ! hello_test + + cat > tools/bazel <<"EOF" + #!${runtimeShell} -e + exec "$BAZEL_REAL" "$@" + EOF + + # second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch} + hello_test + ''; + + # Save paths to hardcoded dependencies so Nix can detect them. + postFixup = '' + mkdir -p $out/nix-support + echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends + # The templates get tar’d up into a .jar, + # so nix can’t detect python is needed in the runtime closure + # Some of the scripts explicitly depend on Python 2.7. Otherwise, we + # default to using python3. Therefore, both python27 and python3 are + # runtime dependencies. + echo "${python27}" >> $out/nix-support/depends + echo "${python3}" >> $out/nix-support/depends + '' + lib.optionalString stdenv.isDarwin '' + echo "${cctools}" >> $out/nix-support/depends + ''; + + dontStrip = true; + dontPatchELF = true; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch new file mode 100644 index 000000000000..75547264fcc8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch @@ -0,0 +1,20 @@ +--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java 2020-05-25 14:46:01.608403087 +0200 ++++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java 2020-05-25 14:50:52.881398320 +0200 +@@ -238,14 +238,15 @@ + // TODO(#8685): Remove this special-case handling as part of making the proper shebang a + // property of the Python toolchain configuration. + String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? "python3" : "python"; ++ String pythonShebang = "#!/usr/bin/env " + pythonExecutableName; + ruleContext.registerAction( + new SpawnAction.Builder() + .addInput(zipFile) + .addOutput(executable) + .setShellCommand( + shExecutable, +- "echo '#!/usr/bin/env " +- + pythonExecutableName ++ "echo '" ++ + pythonShebang + + "' | cat - " + + zipFile.getExecPathString() + + " > " diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json new file mode 100644 index 000000000000..4007a77b0652 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json @@ -0,0 +1,781 @@ +{ + "1.25.0.zip": { + "name": "1.25.0.zip", + "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.25.0.zip", + "https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip" + ] + }, + "1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz": { + "name": "1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz", + "sha256": "5a725b777976b77aa122b707d1b6f0f39b6020f66cd427bb111a585599c857b1", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz", + "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz" + ] + }, + "2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": { + "name": "2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz", + "sha256": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz" + ] + }, + "46993efdd33b73649796c5fc5c9efb193ae19d51.zip": { + "name": "46993efdd33b73649796c5fc5c9efb193ae19d51.zip", + "sha256": "66184688debeeefcc2a16a2f80b03f514deac8346fe888fb7e691a52c023dd88", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/46993efdd33b73649796c5fc5c9efb193ae19d51.zip", + "https://github.com/bazelbuild/platforms/archive/46993efdd33b73649796c5fc5c9efb193ae19d51.zip" + ] + }, + "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": { + "name": "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ] + }, + "8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip": { + "name": "8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip", + "sha256": "1d4dbbd1e1e9b57d40bb0ade51c9e882da7658d5bfbf22bbd15b68e7879d761f", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip", + "https://github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip" + ] + }, + "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": { + "name": "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz" + ] + }, + "android_tools_for_testing": { + "name": "android_tools_for_testing", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "761e997a9055fe5e2b70aba8d64e78d4c2113feafaa8ac81909cb63e403f3087", + "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc1.tar.gz" + }, + "android_tools_pkg-0.19.0rc1.tar.gz": { + "name": "android_tools_pkg-0.19.0rc1.tar.gz", + "sha256": "761e997a9055fe5e2b70aba8d64e78d4c2113feafaa8ac81909cb63e403f3087", + "urls": [ + "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc1.tar.gz" + ] + }, + "bazel-toolchains-3.1.0.tar.gz": { + "name": "bazel-toolchains-3.1.0.tar.gz", + "sha256": "726b5423e1c7a3866a3a6d68e7123b4a955e9fcbe912a51e0f737e6dab1d0af2", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz" + ] + }, + "bazel_j2objc": { + "name": "bazel_j2objc", + "sha256": "8d3403b5b7db57e347c943d214577f6879e5b175c2b59b7e075c0b6453330e9b", + "strip_prefix": "j2objc-2.5", + "urls": [ + "https://mirror.bazel.build/github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip", + "https://github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip" + ] + }, + "bazel_skylib": { + "name": "bazel_skylib", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96", + "strip_prefix": "bazel-skylib-2d4c9528e0f453b5950eeaeac11d8d09f5a504d4", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz" + ] + }, + "bazel_toolchains": { + "name": "bazel_toolchains", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "726b5423e1c7a3866a3a6d68e7123b4a955e9fcbe912a51e0f737e6dab1d0af2", + "strip_prefix": "bazel-toolchains-3.1.0", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz" + ] + }, + "bazel_website": { + "build_file_content": "\nexports_files([\"_sass/style.scss\"])\n", + "name": "bazel_website", + "sha256": "a5f531dd1d62e6947dcfc279656ffc2fdf6f447c163914c5eabf7961b4cb6eb4", + "strip_prefix": "bazel-website-c174fa288aa079b68416d2ce2cc97268fa172f42", + "urls": [ + "https://github.com/bazelbuild/bazel-website/archive/c174fa288aa079b68416d2ce2cc97268fa172f42.tar.gz" + ] + }, + "build_bazel_rules_nodejs": { + "name": "build_bazel_rules_nodejs", + "sha256": "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz", + "https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz" + ] + }, + "com_google_googletest": { + "name": "com_google_googletest", + "sha256": "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb", + "strip_prefix": "googletest-release-1.10.0", + "urls": [ + "https://mirror.bazel.build/github.com/google/googletest/archive/release-1.10.0.tar.gz", + "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" + ] + }, + "com_google_protobuf": { + "name": "com_google_protobuf", + "patch_args": [ + "-p1" + ], + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "patches": [ + "//third_party/protobuf:3.11.3.patch" + ], + "sha256": "cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852", + "strip_prefix": "protobuf-3.11.3", + "urls": [ + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz" + ] + }, + "coverage_output_generator-v2.1.zip": { + "name": "coverage_output_generator-v2.1.zip", + "sha256": "96ac6bc9b9fbc67b532bcae562da1642409791e6a4b8e522f04946ee5cc3ff8e", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.1.zip" + ] + }, + "desugar_jdk_libs": { + "name": "desugar_jdk_libs", + "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d", + "strip_prefix": "desugar_jdk_libs-e0b0291b2c51fbe5a7cfa14473a1ae850f94f021", + "urls": [ + "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip" + ] + }, + "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip": { + "name": "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d", + "urls": [ + "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip", + "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip" + ] + }, + "io_bazel_rules_sass": { + "name": "io_bazel_rules_sass", + "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647", + "strip_prefix": "rules_sass-1.25.0", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.25.0.zip", + "https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip" + ] + }, + "io_bazel_skydoc": { + "name": "io_bazel_skydoc", + "sha256": "5a725b777976b77aa122b707d1b6f0f39b6020f66cd427bb111a585599c857b1", + "strip_prefix": "stardoc-1ef781ced3b1443dca3ed05dec1989eca1a4e1cd", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz", + "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz" + ] + }, + "java_tools_javac11_darwin-v8.0.zip": { + "name": "java_tools_javac11_darwin-v8.0.zip", + "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip" + ] + }, + "java_tools_javac11_linux-v8.0.zip": { + "name": "java_tools_javac11_linux-v8.0.zip", + "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip" + ] + }, + "java_tools_javac11_windows-v8.0.zip": { + "name": "java_tools_javac11_windows-v8.0.zip", + "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip" + ] + }, + "java_tools_langtools_javac11": { + "name": "java_tools_langtools_javac11", + "sha256": "cf0814fa002ef3d794582bb086516d8c9ed0958f83f19799cdb08949019fe4c7", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11_v2.zip" + ] + }, + "java_tools_langtools_javac12": { + "name": "java_tools_langtools_javac12", + "sha256": "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip" + ] + }, + "openjdk11_darwin_archive": { + "build_file_content": "\njava_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n", + "name": "openjdk11_darwin_archive", + "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz" + ] + }, + "openjdk11_linux_archive": { + "build_file_content": "\njava_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n", + "name": "openjdk11_linux_archive", + "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" + ] + }, + "openjdk11_windows_archive": { + "build_file_content": "\njava_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n", + "name": "openjdk11_windows_archive", + "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip" + ] + }, + "openjdk12_darwin_archive": { + "build_file_content": "\njava_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n", + "name": "openjdk12_darwin_archive", + "sha256": "67ca9d285056132ebb19fa237a14affda52132142e1171fe1c20e18974b3b8a5", + "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-macosx_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz" + ] + }, + "openjdk12_linux_archive": { + "build_file_content": "\njava_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n", + "name": "openjdk12_linux_archive", + "sha256": "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13", + "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz" + ] + }, + "openjdk12_windows_archive": { + "build_file_content": "\njava_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n", + "name": "openjdk12_windows_archive", + "sha256": "cf28404c23c3aa1115363ba6e796c30580a768e1d7d6681a7d053e516008e00d", + "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-win_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-win_x64.zip" + ] + }, + "openjdk_linux": { + "downloaded_file_path": "zulu-linux.tar.gz", + "name": "openjdk_linux", + "sha256": "65bfe4e0ffa74a680ee4410db46b17e30cd9397b664a92a886599fe1f3530969", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-linux_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689070.tar.gz" + ] + }, + "openjdk_linux_aarch64": { + "downloaded_file_path": "zulu-linux-aarch64.tar.gz", + "name": "openjdk_linux_aarch64", + "sha256": "6b245793087300db3ee82ab0d165614f193a73a60f2f011e347756c1e6ca5bac", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz" + ] + }, + "openjdk_linux_aarch64_minimal": { + "downloaded_file_path": "zulu-linux-aarch64-minimal.tar.gz", + "name": "openjdk_linux_aarch64_minimal", + "sha256": "06f6520a877704c77614bcfc4f846cc7cbcbf5eaad149bf7f19f4f16e285c9de", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz" + ] + }, + "openjdk_linux_aarch64_vanilla": { + "downloaded_file_path": "zulu-linux-aarch64-vanilla.tar.gz", + "name": "openjdk_linux_aarch64_vanilla", + "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" + ] + }, + "openjdk_linux_minimal": { + "downloaded_file_path": "zulu-linux-minimal.tar.gz", + "name": "openjdk_linux_minimal", + "sha256": "91f7d52f695c681d4e21499b4319d548aadef249a6b3053e306308992e1e29ae", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689068.tar.gz" + ] + }, + "openjdk_linux_ppc64le_vanilla": { + "downloaded_file_path": "adoptopenjdk-ppc64le-vanilla.tar.gz", + "name": "openjdk_linux_ppc64le_vanilla", + "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a", + "urls": [ + "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz", + "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz" + ] + }, + "openjdk_linux_vanilla": { + "downloaded_file_path": "zulu-linux-vanilla.tar.gz", + "name": "openjdk_linux_vanilla", + "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" + ] + }, + "openjdk_macos": { + "downloaded_file_path": "zulu-macos.tar.gz", + "name": "openjdk_macos", + "sha256": "8e283cfd23c7555be8e17295ed76eb8f00324c88ab904b8de37bbe08f90e569b", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689066.tar.gz" + ] + }, + "openjdk_macos_minimal": { + "downloaded_file_path": "zulu-macos-minimal.tar.gz", + "name": "openjdk_macos_minimal", + "sha256": "1bacb1c07035d4066d79f0b65b4ea0ebd1954f3662bdfe3618da382ac8fd23a6", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689063.tar.gz" + ] + }, + "openjdk_macos_vanilla": { + "downloaded_file_path": "zulu-macos-vanilla.tar.gz", + "name": "openjdk_macos_vanilla", + "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz" + ] + }, + "openjdk_win": { + "downloaded_file_path": "zulu-win.zip", + "name": "openjdk_win", + "sha256": "8e1604b3a27dcf639bc6d1a73103f1211848139e4cceb081d0a74a99e1e6f995", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip" + ] + }, + "openjdk_win_minimal": { + "downloaded_file_path": "zulu-win-minimal.zip", + "name": "openjdk_win_minimal", + "sha256": "b90a713c9c2d9ea23cad44d2c2dfcc9af22faba9bde55dedc1c3bb9f556ac1ae", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip" + ] + }, + "openjdk_win_vanilla": { + "downloaded_file_path": "zulu-win-vanilla.zip", + "name": "openjdk_win_vanilla", + "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip" + ] + }, + "platforms": { + "name": "platforms", + "sha256": "66184688debeeefcc2a16a2f80b03f514deac8346fe888fb7e691a52c023dd88", + "strip_prefix": "platforms-46993efdd33b73649796c5fc5c9efb193ae19d51", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/archive/46993efdd33b73649796c5fc5c9efb193ae19d51.zip", + "https://github.com/bazelbuild/platforms/archive/46993efdd33b73649796c5fc5c9efb193ae19d51.zip" + ] + }, + "remote_coverage_tools_for_testing": { + "name": "remote_coverage_tools_for_testing", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "96ac6bc9b9fbc67b532bcae562da1642409791e6a4b8e522f04946ee5cc3ff8e", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.1.zip" + ] + }, + "remote_java_tools_darwin_for_testing": { + "name": "remote_java_tools_darwin_for_testing", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_darwin-v8.0.zip" + ] + }, + "remote_java_tools_javac11_test_darwin": { + "name": "remote_java_tools_javac11_test_darwin", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip" + ] + }, + "remote_java_tools_javac11_test_linux": { + "name": "remote_java_tools_javac11_test_linux", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip" + ] + }, + "remote_java_tools_javac11_test_windows": { + "name": "remote_java_tools_javac11_test_windows", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip" + ] + }, + "remote_java_tools_javac12_test_darwin": { + "name": "remote_java_tools_javac12_test_darwin", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "54df966e7583bafe659e39b4103a4ce934201d969de638d071ada07d8e0c1a3a", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_darwin-v3.0.zip" + ] + }, + "remote_java_tools_javac12_test_linux": { + "name": "remote_java_tools_javac12_test_linux", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "3997ee9a57b095748f1c0d084839fab2fbc72504aeb7b37b1f71c31738d330e3", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_linux-v3.0.zip" + ] + }, + "remote_java_tools_javac12_test_windows": { + "name": "remote_java_tools_javac12_test_windows", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "cfad1718dad1fed12816748eed27ab30b9ea1268c8ce9940acf3b5b7d82d483d", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_windows-v3.0.zip" + ] + }, + "remote_java_tools_linux_for_testing": { + "name": "remote_java_tools_linux_for_testing", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_linux-v8.0.zip" + ] + }, + "remote_java_tools_windows_for_testing": { + "name": "remote_java_tools_windows_for_testing", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_windows-v8.0.zip" + ] + }, + "remotejdk11_linux_aarch64_for_testing": { + "build_file": "@local_jdk//:BUILD.bazel", + "name": "remotejdk11_linux_aarch64_for_testing", + "patch_cmds": [ + "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", + "echo >> BUILD.bazel", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4", + "strip_prefix": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" + ] + }, + "remotejdk11_linux_for_testing": { + "build_file": "@local_jdk//:BUILD.bazel", + "name": "remotejdk11_linux_for_testing", + "patch_cmds": [ + "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", + "echo >> BUILD.bazel", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" + ] + }, + "remotejdk11_linux_ppc64le_for_testing": { + "build_file": "@local_jdk//:BUILD.bazel", + "name": "remotejdk11_linux_ppc64le_for_testing", + "patch_cmds": [ + "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", + "echo >> BUILD.bazel", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a", + "strip_prefix": "jdk-11.0.7+10", + "urls": [ + "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz", + "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz" + ] + }, + "remotejdk11_macos_for_testing": { + "build_file": "@local_jdk//:BUILD.bazel", + "name": "remotejdk11_macos_for_testing", + "patch_cmds": [ + "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", + "echo >> BUILD.bazel", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz" + ] + }, + "remotejdk11_win_for_testing": { + "build_file": "@local_jdk//:BUILD.bazel", + "name": "remotejdk11_win_for_testing", + "patch_cmds": [ + "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", + "echo >> BUILD.bazel", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18", + "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip" + ] + }, + "rules_cc": { + "name": "rules_cc", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "1d4dbbd1e1e9b57d40bb0ade51c9e882da7658d5bfbf22bbd15b68e7879d761f", + "strip_prefix": "rules_cc-8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip", + "https://github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip" + ] + }, + "rules_java": { + "name": "rules_java", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", + "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", + "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + ] + }, + "rules_nodejs-1.3.0.tar.gz": { + "name": "rules_nodejs-1.3.0.tar.gz", + "sha256": "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz", + "https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz" + ] + }, + "rules_pkg": { + "name": "rules_pkg", + "patch_cmds": [ + "test -f BUILD && chmod u+w BUILD || true", + "echo >> BUILD", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz" + ] + }, + "rules_pkg-0.2.4.tar.gz": { + "name": "rules_pkg-0.2.4.tar.gz", + "sha256": "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz" + ] + }, + "rules_proto": { + "name": "rules_proto", + "patch_cmds": [ + "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", + "echo >> BUILD.bazel", + "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel" + ], + "patch_cmds_win": [ + "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force" + ], + "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "strip_prefix": "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + "urls": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz" + ] + }, + "v3.11.3.tar.gz": { + "name": "v3.11.3.tar.gz", + "sha256": "cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852", + "urls": [ + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz" + ] + }, + "zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz": { + "name": "zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz", + "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" + ] + }, + "zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": { + "name": "zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz", + "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz" + ] + }, + "zulu11.37.17-ca-jdk11.0.6-win_x64.zip": { + "name": "zulu11.37.17-ca-jdk11.0.6-win_x64.zip", + "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip" + ] + }, + "zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": { + "name": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz", + "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4", + "urls": [ + "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" + ] + } +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_rc.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_rc.patch new file mode 100644 index 000000000000..a599ac3ec723 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/bazel_rc.patch @@ -0,0 +1,13 @@ +diff --git a/src/main/cpp/option_processor.cc b/src/main/cpp/option_processor.cc +index 8f8f15685f..a7ae52d1e4 100644 +--- a/src/main/cpp/option_processor.cc ++++ b/src/main/cpp/option_processor.cc +@@ -56,7 +56,7 @@ OptionProcessor::OptionProcessor( + : workspace_layout_(workspace_layout), + startup_options_(std::move(default_startup_options)), + parse_options_called_(false), +- system_bazelrc_path_(BAZEL_SYSTEM_BAZELRC_PATH) {} ++ system_bazelrc_path_("@bazelSystemBazelRCPath@") {} + + OptionProcessor::OptionProcessor( + const WorkspaceLayout* workspace_layout, diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/buildtools/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/buildtools/default.nix new file mode 100644 index 000000000000..43a70c6a765d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/buildtools/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + pname = "bazel-buildtools"; + version = "3.3.0"; + + goPackagePath = "github.com/bazelbuild/buildtools"; + + src = fetchFromGitHub { + owner = "bazelbuild"; + repo = "buildtools"; + rev = version; + sha256 = "0g411gjbm02qd5b50iy6kk81kx2n5zw5x1m6i6g7nrmh38p3pn9k"; + }; + + goDeps = ./deps.nix; + + excludedPackages = [ "generatetables" ]; + + buildFlagsArray = [ "-ldflags=-s -w -X main.buildVersion=${version} -X main.buildScmRevision=${src.rev}" ]; + + meta = with stdenv.lib; { + description = "Tools for working with Google's bazel buildtool. Includes buildifier, buildozer, and unused_deps"; + homepage = "https://github.com/bazelbuild/buildtools"; + license = licenses.asl20; + maintainers = with maintainers; [ elasticdog uri-canva marsam ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/buildtools/deps.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/buildtools/deps.nix new file mode 100644 index 000000000000..a64f96d2c072 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/buildtools/deps.nix @@ -0,0 +1,20 @@ +[ + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "84668698ea25b64748563aa20726db66a6b8d299"; + sha256 = "1gkd1942vk9n8kfzdwy1iil6wgvlwjq7a3y5jc49ck4lz9rhmgkq"; + }; + } + { + goPackagePath = "go.starlark.net"; + fetch = { + type = "git"; + url = "https://github.com/google/starlark-go"; + rev = "6677ee5c7211380ec7e6a1b50dc45287e40ca9e1"; + sha256 = "1dl8q1lwvmm38w2lzfwray2djdcq40z89yy6vzy387w0xrax0jj0"; + }; + } +] diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/cpp-test.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/cpp-test.nix new file mode 100644 index 000000000000..f4e03abdbc94 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/cpp-test.nix @@ -0,0 +1,51 @@ +{ + bazel +, bazelTest +, bazel-examples +, gccStdenv +, lib +, runLocal +, runtimeShell +, writeScript +, writeText +, distDir +}: + +let + + toolsBazel = writeScript "bazel" '' + #! ${runtimeShell} + + export CXX='${gccStdenv.cc}/bin/g++' + export LD='${gccStdenv.cc}/bin/ld' + export CC='${gccStdenv.cc}/bin/gcc' + + # XXX: hack for macosX, this flags disable bazel usage of xcode + # See: https://github.com/bazelbuild/bazel/issues/4231 + export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 + + exec "$BAZEL_REAL" "$@" + ''; + + workspaceDir = runLocal "our_workspace" {} ('' + cp -r ${bazel-examples}/cpp-tutorial/stage3 $out + find $out -type d -exec chmod 755 {} \; + '' + + (lib.optionalString gccStdenv.isDarwin '' + mkdir $out/tools + cp ${toolsBazel} $out/tools/bazel + '')); + + testBazel = bazelTest { + name = "bazel-test-cpp"; + inherit workspaceDir; + bazelPkg = bazel; + bazelScript = '' + ${bazel}/bin/bazel \ + build --verbose_failures \ + --distdir=${distDir} \ + //... + ''; + }; + +in testBazel diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/java-test.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/java-test.nix new file mode 100644 index 000000000000..30b957eb5e30 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/java-test.nix @@ -0,0 +1,58 @@ +{ + bazel +, bazelTest +, bazel-examples +, gccStdenv +, lib +, openjdk8 +, runLocal +, runtimeShell +, writeScript +, writeText +, distDir +}: + +let + + toolsBazel = writeScript "bazel" '' + #! ${runtimeShell} + + export CXX='${gccStdenv.cc}/bin/g++' + export LD='${gccStdenv.cc}/bin/ld' + export CC='${gccStdenv.cc}/bin/gcc' + + # XXX: hack for macosX, this flags disable bazel usage of xcode + # See: https://github.com/bazelbuild/bazel/issues/4231 + export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 + + exec "$BAZEL_REAL" "$@" + ''; + + workspaceDir = runLocal "our_workspace" {} ('' + cp -r ${bazel-examples}/java-tutorial $out + find $out -type d -exec chmod 755 {} \; + '' + + (lib.optionalString gccStdenv.isDarwin '' + mkdir $out/tools + cp ${toolsBazel} $out/tools/bazel + '')); + + testBazel = bazelTest { + name = "bazel-test-cpp"; + inherit workspaceDir; + bazelPkg = bazel; + buildInputs = [ openjdk8 ]; + bazelScript = '' + ${bazel}/bin/bazel \ + run \ + --distdir=${distDir} \ + --host_javabase='@local_jdk//:jdk' \ + --java_toolchain='@bazel_tools//tools/jdk:toolchain_hostjdk8' \ + --javabase='@local_jdk//:jdk' \ + --verbose_failures \ + //:ProjectRunner + ''; + }; + +in testBazel + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/nix-hacks.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/nix-hacks.patch new file mode 100644 index 000000000000..95f07646802e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/nix-hacks.patch @@ -0,0 +1,43 @@ +diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java +index 8e772005cd..6ffa1c919c 100644 +--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java ++++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java +@@ -432,25 +432,7 @@ public final class RepositoryDelegatorFunction implements SkyFunction { + String content; + try { + content = FileSystemUtils.readContent(markerPath, StandardCharsets.UTF_8); +- String markerRuleKey = readMarkerFile(content, markerData); +- boolean verified = false; +- if (Preconditions.checkNotNull(ruleKey).equals(markerRuleKey) +- && Objects.equals( +- markerData.get(MANAGED_DIRECTORIES_MARKER), +- this.markerData.get(MANAGED_DIRECTORIES_MARKER))) { +- verified = handler.verifyMarkerData(rule, markerData, env); +- if (env.valuesMissing()) { +- return null; +- } +- } +- +- if (verified) { +- return new Fingerprint().addString(content).digestAndReset(); +- } else { +- // So that we are in a consistent state if something happens while fetching the repository +- markerPath.delete(); +- return null; +- } ++ return new Fingerprint().addString(content).digestAndReset(); + } catch (IOException e) { + throw new RepositoryFunctionException(e, Transience.TRANSIENT); + } +diff --git a/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java b/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java +index c282d57ab6..f9b0c08627 100644 +--- a/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java ++++ b/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java +@@ -146,7 +146,6 @@ public class JavaSubprocessFactory implements SubprocessFactory { + ProcessBuilder builder = new ProcessBuilder(); + builder.command(params.getArgv()); + if (params.getEnv() != null) { +- builder.environment().clear(); + builder.environment().putAll(params.getEnv()); + } + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/protobuf-test.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/protobuf-test.nix new file mode 100644 index 000000000000..0784de4cfd39 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/protobuf-test.nix @@ -0,0 +1,154 @@ +{ + bazel +, bazelTest +, fetchFromGitHub +, fetchurl +, gccStdenv +, lib +, openjdk8 +, runLocal +, runtimeShell +, writeScript +, writeText +, distDir +}: + +let + com_google_protobuf = fetchFromGitHub { + owner = "protocolbuffers"; + repo = "protobuf"; + rev = "v3.7.0"; + sha256 = "0nlxif4cajqllsj2vdh7zp14ag48fb8lsa64zmq8625q9m2lcmdh"; + }; + + bazel_skylib = fetchFromGitHub { + owner = "bazelbuild"; + repo = "bazel-skylib"; + rev = "f83cb8dd6f5658bc574ccd873e25197055265d1c"; + sha256 = "091fb0ky0956wgv8gghy9ay3yfx6497mb72qvibf0y9dllmxyn9l"; + }; + + net_zlib = fetchurl rec { + url = "https://zlib.net/zlib-1.2.11.tar.gz"; + sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"; + + passthru.sha256 = sha256; + }; + + WORKSPACE = writeText "WORKSPACE" '' + workspace(name = "our_workspace") + + load("//:proto-support.bzl", "protobuf_deps") + protobuf_deps() + ''; + + protoSupport = writeText "proto-support.bzl" '' + """Load dependencies needed to compile the protobuf library as a 3rd-party consumer.""" + + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + + def protobuf_deps(): + """Loads common dependencies needed to compile the protobuf library.""" + + if "zlib" not in native.existing_rules(): + # proto_library, cc_proto_library, and java_proto_library rules implicitly + # depend on @com_google_protobuf for protoc and proto runtimes. + # This statement defines the @com_google_protobuf repo. + native.local_repository( + name = "com_google_protobuf", + path = "${com_google_protobuf}", + ) + native.local_repository( + name = "bazel_skylib", + path = "${bazel_skylib}", + ) + + native.bind( + name = "zlib", + actual = "@net_zlib//:zlib", + ) + http_archive( + name = "net_zlib", + build_file = "@com_google_protobuf//:third_party/zlib.BUILD", + sha256 = "${net_zlib.sha256}", + strip_prefix = "zlib-1.2.11", + urls = ["file://${net_zlib}"], + ) + ''; + + personProto = writeText "person.proto" '' + syntax = "proto3"; + + package person; + + message Person { + string name = 1; + int32 id = 2; + string email = 3; + } + ''; + + personBUILD = writeText "BUILD" '' + proto_library( + name = "person_proto", + srcs = ["person.proto"], + visibility = ["//visibility:public"], + ) + + java_proto_library( + name = "person_java_proto", + deps = [":person_proto"], + ) + + cc_proto_library( + name = "person_cc_proto", + deps = [":person_proto"], + ) + ''; + + toolsBazel = writeScript "bazel" '' + #! ${runtimeShell} + + export CXX='${gccStdenv.cc}/bin/g++' + export LD='${gccStdenv.cc}/bin/ld' + export CC='${gccStdenv.cc}/bin/gcc' + + # XXX: hack for macosX, this flags disable bazel usage of xcode + # See: https://github.com/bazelbuild/bazel/issues/4231 + export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 + + exec "$BAZEL_REAL" "$@" + ''; + + workspaceDir = runLocal "our_workspace" {} ('' + mkdir $out + cp ${WORKSPACE} $out/WORKSPACE + touch $out/BUILD.bazel + cp ${protoSupport} $out/proto-support.bzl + mkdir $out/person + cp ${personProto} $out/person/person.proto + cp ${personBUILD} $out/person/BUILD.bazel + '' + + (lib.optionalString gccStdenv.isDarwin '' + mkdir $out/tools + cp ${toolsBazel} $out/tools/bazel + '')); + + testBazel = bazelTest { + name = "bazel-test-protocol-buffers"; + inherit workspaceDir; + bazelPkg = bazel; + buildInputs = [ openjdk8 ]; + bazelScript = '' + ${bazel}/bin/bazel \ + build \ + --distdir=${distDir} \ + --host_javabase='@local_jdk//:jdk' \ + --java_toolchain='@bazel_tools//tools/jdk:toolchain_hostjdk8' \ + --javabase='@local_jdk//:jdk' \ + --verbose_failures \ + //... + ''; + }; + +in testBazel diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix new file mode 100644 index 000000000000..c02547c08e06 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/python-bin-path-test.nix @@ -0,0 +1,53 @@ +{ writeText, bazel, bazelTest, runLocal, distDir }: + +let + WORKSPACE = writeText "WORKSPACE" '' + workspace(name = "our_workspace") + ''; + + pythonLib = writeText "lib.py" '' + def foo(): + return 43 + ''; + + pythonBin = writeText "bin.py" '' + from lib import foo + + assert foo() == 43 + ''; + + pythonBUILD = writeText "BUILD" '' + py_library( + name = "lib", + srcs = [ "lib.py" ], + ) + + py_binary( + name = "bin", + srcs = [ "bin.py" ], + deps = [ ":lib" ], + ) + ''; + + workspaceDir = runLocal "our_workspace" {} '' + mkdir $out + cp ${WORKSPACE} $out/WORKSPACE + mkdir $out/python + cp ${pythonLib} $out/python/lib.py + cp ${pythonBin} $out/python/bin.py + cp ${pythonBUILD} $out/python/BUILD.bazel + ''; + + testBazel = bazelTest { + name = "bazel-test-builtin-rules"; + inherit workspaceDir; + bazelPkg = bazel; + bazelScript = '' + ${bazel}/bin/bazel \ + run \ + --distdir=${distDir} \ + //python:bin + ''; + }; + +in testBazel diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/shebang-test.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/shebang-test.nix new file mode 100644 index 000000000000..fd94f97a7659 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/shebang-test.nix @@ -0,0 +1,49 @@ +{ + bazel +, bazelTest +, distDir +, extracted +, runLocal +, unzip +}: + +# Tests that all shebangs are patched appropriately. +# #!/usr/bin/... should be replaced by Nix store references. +# #!.../bin/env python should be replaced by Nix store reference to the python interpreter. + +let + + workspaceDir = runLocal "our_workspace" {} "mkdir $out"; + + testBazel = bazelTest { + name = "bazel-test-shebangs"; + inherit workspaceDir; + bazelPkg = bazel; + bazelScript = '' + set -ueo pipefail + FAIL= + check_shebangs() { + local dir="$1" + { grep -Re '#!/usr/bin' $dir && FAIL=1; } || true + { grep -Re '#![^[:space:]]*/bin/env' $dir && FAIL=1; } || true + } + BAZEL_EXTRACTED=${extracted bazel}/install + check_shebangs $BAZEL_EXTRACTED + while IFS= read -r -d "" zip; do + unzipped="./$zip/UNPACKED" + mkdir -p "$unzipped" + unzip -qq $zip -d "$unzipped" + check_shebangs "$unzipped" + rm -rf unzipped + done < <(find $BAZEL_EXTRACTED -type f -name '*.zip' -or -name '*.jar' -print0) + if [[ $FAIL = 1 ]]; then + echo "Found files in the bazel distribution with illegal shebangs." >&2 + echo "Replace those by explicit Nix store paths." >&2 + echo "Python scripts should not use \`bin/env python' but the Python interpreter's store path." >&2 + exit 1 + fi + ''; + buildInputs = [ unzip ]; + }; + +in testBazel diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/strict_action_env.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/strict_action_env.patch new file mode 100644 index 000000000000..1402c20f6bdb --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/strict_action_env.patch @@ -0,0 +1,13 @@ +diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java +index a70b5559bc..10bdffe961 100644 +--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java ++++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java +@@ -466,7 +466,7 @@ public class BazelRuleClassProvider { + // Note that --action_env does not propagate to the host config, so it is not a viable + // workaround when a genrule is itself built in the host config (e.g. nested genrules). See + // #8536. +- return "/bin:/usr/bin:/usr/local/bin"; ++ return "@strictActionEnvPatch@"; + } + + String newPath = ""; diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/trim-last-argument-to-gcc-if-empty.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/trim-last-argument-to-gcc-if-empty.patch new file mode 100644 index 000000000000..b93b252f3638 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/trim-last-argument-to-gcc-if-empty.patch @@ -0,0 +1,37 @@ +From 177b4720d6fbaa7fdd17e5e11b2c79ac8f246786 Mon Sep 17 00:00:00 2001 +From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com> +Date: Thu, 27 Jun 2019 21:08:51 -0700 +Subject: [PATCH] Trim last argument to gcc if empty, on Darwin + +On Darwin, the last argument to GCC is coming up as an empty string. +This is breaking the build of proto_library targets. However, I was not +able to reproduce with the example cpp project[0]. + +This commit removes the last argument if it's an empty string. This is +not a problem on Linux. + +[0]: https://github.com/bazelbuild/examples/tree/master/cpp-tutorial/stage3 +--- + tools/cpp/osx_cc_wrapper.sh.tpl | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tools/cpp/osx_cc_wrapper.sh.tpl b/tools/cpp/osx_cc_wrapper.sh.tpl +index 4c85cd9b6b..6c611e3d25 100644 +--- a/tools/cpp/osx_cc_wrapper.sh.tpl ++++ b/tools/cpp/osx_cc_wrapper.sh.tpl +@@ -53,7 +53,11 @@ done + %{env} + + # Call the C++ compiler +-%{cc} "$@" ++if [[ ${*: -1} = "" ]]; then ++ %{cc} "${@:0:$#}" ++else ++ %{cc} "$@" ++fi + + function get_library_path() { + for libdir in ${LIB_DIRS}; do +-- +2.19.2 + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/update-srcDeps.py b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/update-srcDeps.py new file mode 100755 index 000000000000..52d40e0f94e8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bazel/update-srcDeps.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +import sys +import json + +if len(sys.argv) == 1: + print("usage: ./this-script WORKSPACE", file=sys.stderr) + print("Takes the bazel WORKSPACE file and reads all archives into a json dict (by evaling it as python code)", file=sys.stderr) + print("Hail Eris.", file=sys.stderr) + sys.exit(1) + +http_archives = [] + +# just the kw args are the dict { name, sha256, urls … } +def http_archive(**kw): + http_archives.append(kw) +# like http_file +def http_file(**kw): + http_archives.append(kw) + +# this is inverted from http_archive/http_file and bundles multiple archives +def distdir_tar(**kw): + for archive_name in kw['archives']: + http_archives.append({ + "name": archive_name, + "sha256": kw['sha256'][archive_name], + "urls": kw['urls'][archive_name] + }) + +# stubs for symbols we are not interested in +# might need to be expanded if new bazel releases add symbols to the workspace +def workspace(name): pass +def load(*args): pass +def bind(**kw): pass +def list_source_repository(**kw): pass +def new_local_repository(**kw): pass +def local_repository(**kw): pass +DOC_VERSIONS = [] +def stardoc_repositories(**kw): pass +def skydoc_repositories(**kw): pass +def rules_sass_dependencies(**kw): pass +def node_repositories(**kw): pass +def sass_repositories(**kw): pass +def register_execution_platforms(*args): pass +def rbe_autoconfig(*args, **kw): pass +def rules_pkg_dependencies(*args, **kw): pass +def winsdk_configure(*args, **kw): pass +def register_local_rc_exe_toolchains(*args, **kw): pass +def register_toolchains(*args, **kw): pass +def debian_deps(): pass + +# execute the WORKSPACE like it was python code in this module, +# using all the function stubs from above. +with open(sys.argv[1]) as f: + exec(f.read()) + +# transform to a dict with the names as keys +d = { el['name']: el for el in http_archives } + +print(json.dumps(d, sort_keys=True, indent=4)) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/cmakepaths.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/cmakepaths.patch new file mode 100644 index 000000000000..d237267078e6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/cmakepaths.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 04c5c58..429ca47 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,7 +24,7 @@ set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Rogue") + + set(EAR_LIB_FILE ${CMAKE_SHARED_LIBRARY_PREFIX}ear${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(EAR_LIB_PATH "${CMAKE_INSTALL_LIBDIR}/bear") +-set(DEFAULT_PRELOAD_FILE ${CMAKE_INSTALL_PREFIX}/${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.") ++set(DEFAULT_PRELOAD_FILE ${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.") + + add_subdirectory(libear) + add_subdirectory(bear) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/default.nix new file mode 100644 index 000000000000..bc7bb46cd5b9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitHub, cmake, python3 }: + +stdenv.mkDerivation rec { + pname = "bear"; + version = "2.4.2"; + + src = fetchFromGitHub { + owner = "rizsotto"; + repo = pname; + rev = version; + sha256 = "1w1kyjzvvy5lj16kn3yyf7iil2cqlfkszi8kvagql7f5h5l6w9b1"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ python3 ]; # just for shebang of bin/bear + + doCheck = false; # all fail + + patches = [ ./ignore_wrapper.patch ./cmakepaths.patch ]; + + meta = with stdenv.lib; { + description = "Tool that generates a compilation database for clang tooling"; + longDescription = '' + Note: the bear command is very useful to generate compilation commands + e.g. for YouCompleteMe. You just enter your development nix-shell + and run `bear make`. It's not perfect, but it gets a long way. + ''; + homepage = "https://github.com/rizsotto/Bear"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = [ maintainers.babariviere ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch new file mode 100644 index 000000000000..8effc723bbab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch @@ -0,0 +1,27 @@ +--- a/bear/main.py.in ++++ b/bear/main.py.in +@@ -49,6 +49,7 @@ import tempfile + import shutil + import contextlib + import logging ++from distutils.spawn import find_executable + + # Map of ignored compiler option for the creation of a compilation database. + # This map is used in _split_command method, which classifies the parameters +@@ -569,7 +570,15 @@ class Compilation: + (compiler, language, rest of the command) otherwise """ + + if command: # not empty list will allow to index '0' and '1:' +- executable = os.path.basename(command[0]) # type: str ++ executable_file = find_executable(command[0]) ++ if executable_file: ++ absolute_executable = os.path.realpath(executable_file) ++ # Ignore Nix wrappers. ++ if 'wrapper' in absolute_executable: ++ return None ++ executable = os.path.basename(absolute_executable) ++ else: ++ executable = os.path.basename(command[0]) + parameters = command[1:] # type: List[str] + # 'wrapper' 'parameters' and + # 'wrapper' 'compiler' 'parameters' are valid.
\ No newline at end of file diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bloop/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bloop/default.nix new file mode 100644 index 000000000000..45612182ed96 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bloop/default.nix @@ -0,0 +1,92 @@ +{ stdenv +, fetchurl +, coursier +, autoPatchelfHook +, installShellFiles +, jre +, lib +, zlib +}: + +stdenv.mkDerivation rec { + pname = "bloop"; + version = "1.4.4"; + + bloop-coursier-channel = fetchurl { + url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-coursier.json"; + sha256 = "1pyf559bpnsmvca4kw36nb9lwkwa9q0ghrpa117s96dhvrp3i2bv"; + }; + + bloop-bash = fetchurl { + url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bash-completions"; + sha256 = "1ldxlqv353gvhdn4yq7z506ywvnjv6fjsi8wigwhzg89876pwsys"; + }; + + bloop-fish = fetchurl { + url = "https://github.com/scalacenter/bloop/releases/download/v${version}/fish-completions"; + sha256 = "1pa8h81l2498q8dbd83fzipr99myjwxpy8xdgzhvqzdmfv6aa4m0"; + }; + + bloop-zsh = fetchurl { + url = "https://github.com/scalacenter/bloop/releases/download/v${version}/zsh-completions"; + sha256 = "1xzg0qfkjdmzm3mvg82mc4iia8cl7b6vbl8ng4ir2xsz00zjrlsq"; + }; + + bloop-coursier = stdenv.mkDerivation rec { + name = "${pname}-coursier-${version}"; + + platform = if stdenv.isLinux && stdenv.isx86_64 then "x86_64-pc-linux" + else if stdenv.isDarwin && stdenv.isx86_64 then "x86_64-apple-darwin" + else throw "unsupported platform"; + + phases = [ "installPhase" ]; + installPhase = '' + export COURSIER_CACHE=$(pwd) + export COURSIER_JVM_CACHE=$(pwd) + + mkdir channel + ln -s ${bloop-coursier-channel} channel/bloop.json + ${coursier}/bin/coursier install --install-dir $out --install-platform ${platform} --default-channels=false --channel channel --only-prebuilt=true bloop + + # Remove binary part of the coursier launcher script to make derivation output hash stable + sed -i '5,$ d' $out/bloop + ''; + + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + outputHash = if stdenv.isLinux && stdenv.isx86_64 then "0hf0priy93zqba78a9nvbgl3mzwlc4jz43gz7cv2cdkj6x0lp0y1" + else if stdenv.isDarwin && stdenv.isx86_64 then "0g2rnmlfnqymji4f4rn0kaz7hipgv3bakdpn08600gg1f3s8gabw" + else throw "unsupported platform"; + }; + + dontUnpack = true; + nativeBuildInputs = [ autoPatchelfHook installShellFiles ]; + buildInputs = [ stdenv.cc.cc.lib zlib ]; + propagatedBuildInputs = [ jre ]; + + installPhase = '' + export COURSIER_CACHE=$(pwd) + export COURSIER_JVM_CACHE=$(pwd) + + mkdir -p $out/bin + cp ${bloop-coursier}/bloop $out/bloop + cp ${bloop-coursier}/.bloop.aux $out/.bloop.aux + ln -s $out/bloop $out/bin/bloop + + # patch the bloop launcher so that it works when symlinked + sed "s|\$(dirname \"\$0\")|$out|" -i $out/bloop + + #Install completions + installShellCompletion --name bloop --bash ${bloop-bash} + installShellCompletion --name _bloop --zsh ${bloop-zsh} + installShellCompletion --name bloop.fish --fish ${bloop-fish} + ''; + + meta = with stdenv.lib; { + homepage = "https://scalacenter.github.io/bloop/"; + license = licenses.asl20; + description = "Bloop is a Scala build server and command-line tool to make the compile and test developer workflows fast and productive in a build-tool-agnostic way"; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + maintainers = with maintainers; [ tomahna ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch new file mode 100644 index 000000000000..9b1267257ad1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/bootstrap-fix.patch @@ -0,0 +1,10 @@ +--- bmake/make-bootstrap.sh.in.orig 2019-02-19 10:55:21.733606117 -0800 ++++ bmake/make-bootstrap.sh.in 2019-02-19 10:56:02.150771541 -0800 +@@ -4,6 +4,7 @@ + + srcdir=@srcdir@ + ++prefix="@prefix@" + DEFAULT_SYS_PATH="@default_sys_path@" + + case "@use_meta@" in diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/default.nix new file mode 100644 index 000000000000..9bda4cde0449 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl +, getopt +}: + +stdenv.mkDerivation rec { + pname = "bmake"; + version = "20200902"; + + src = fetchurl { + url = "http://www.crufty.net/ftp/pub/sjg/${pname}-${version}.tar.gz"; + sha256 = "1v1v81llsiy8qbpy38nml1x08dhrihwh040pqgwbwb9zy1108b08"; + }; + + nativeBuildInputs = [ getopt ]; + + patches = [ + ./bootstrap-fix.patch + ./fix-unexport-env-test.patch + ]; + + meta = with stdenv.lib; { + description = "Portable version of NetBSD 'make'"; + homepage = "http://www.crufty.net/help/sjg/bmake.html"; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch new file mode 100644 index 000000000000..339348f37c32 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch @@ -0,0 +1,13 @@ +--- bmake/unit-tests/unexport-env.mk.orig 2019-02-19 10:24:14.356713136 -0800 ++++ bmake/unit-tests/unexport-env.mk 2019-02-19 10:25:43.838775388 -0800 +@@ -3,8 +3,8 @@ + # pick up a bunch of exported vars + .include "export.mk" + +-# an example of setting up a minimal environment. +-PATH = /bin:/usr/bin:/sbin:/usr/sbin ++# preserve PATH so commands used in the "all" target are still available ++PATH := ${PATH} + + # now clobber the environment to just PATH and UT_TEST + UT_TEST = unexport-env diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/boot/builder.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/boot/builder.sh new file mode 100644 index 000000000000..c1481dc6a144 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/boot/builder.sh @@ -0,0 +1,13 @@ +source $stdenv/setup + +boot_bin=$out/bin/boot + +mkdir -pv $(dirname $boot_bin) +cp -v $src $boot_bin +chmod -v 755 $boot_bin + +patchShebangs $boot_bin + +sed -i \ + -e "s;\${BOOT_JAVA_COMMAND:-java};\${BOOT_JAVA_COMMAND:-${jdk}/bin/java};g" \ + $boot_bin diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/boot/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/boot/default.nix new file mode 100644 index 000000000000..09c1eada54b5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/boot/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, jdk }: + +stdenv.mkDerivation rec { + version = "2.7.2"; + pname = "boot"; + + src = fetchurl { + url = "https://github.com/boot-clj/boot-bin/releases/download/${version}/boot.sh"; + sha256 = "1hqp3xxmsj5vkym0l3blhlaq9g3w0lhjgmp37g6y3rr741znkk8c"; + }; + + inherit jdk; + + builder = ./builder.sh; + + propagatedBuildInputs = [ jdk ]; + + meta = with stdenv.lib; { + description = "Build tooling for Clojure"; + homepage = "https://boot-clj.com/"; + license = licenses.epl10; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ ragge ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/buck/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/buck/default.nix new file mode 100644 index 000000000000..41fc0940b9d0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/buck/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "buck"; + version = "2019.10.17.01"; + + src = fetchFromGitHub { + owner = "facebook"; + repo = pname; + rev = "v${version}"; + sha256 = "1irgp8yq1z11bq3b83yxvj35wqqq7y7b8q4d4y0hc05ac19ja0vj"; + }; + + patches = [ ./pex-mtime.patch ]; + + postPatch = '' + grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g" + ''; + + buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ]; + nativeBuildInputs = [ makeWrapper ]; + + buildPhase = '' + ant + + PYTHONDONTWRITEBYTECODE=true ./bin/buck build -c buck.release_version=${version} buck + ''; + + installPhase = '' + install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck + wrapProgram $out/bin/buck \ + --prefix PYTHONPATH : $PYTHONPATH \ + --prefix PATH : "${stdenv.lib.makeBinPath [jdk watchman]}" + ''; + + meta = with stdenv.lib; { + homepage = "https://buck.build/"; + description = "A high-performance build tool"; + maintainers = [ maintainers.jgertm maintainers.marsam ]; + license = licenses.asl20; + platforms = platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch new file mode 100644 index 000000000000..b8726e64a604 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/buck/pex-mtime.patch @@ -0,0 +1,13 @@ +diff --git a/third-party/py/pex/pex/common.py b/third-party/py/pex/pex/common.py +index 76459ce23..eff411b20 100644 +--- a/third-party/py/pex/pex/common.py ++++ b/third-party/py/pex/pex/common.py +@@ -328,4 +328,7 @@ class Chroot(object): + def zip(self, filename, mode='wb'): + with contextlib.closing(zipfile.ZipFile(filename, mode)) as zf: + for f in sorted(self.files()): +- zf.write(os.path.join(self.chroot, f), arcname=f, compress_type=zipfile.ZIP_DEFLATED) ++ path = os.path.join(self.chroot, f) ++ instant = 615532801 ++ os.utime(path, (instant, instant)) ++ zf.write(path, arcname=f, compress_type=zipfile.ZIP_DEFLATED) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/2.8.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/2.8.nix new file mode 100644 index 000000000000..804bdd76f673 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/2.8.nix @@ -0,0 +1,87 @@ +{ stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2 +, useNcurses ? false, ncurses, useQt4 ? false, qt4, ps +}: + +with stdenv.lib; + +assert stdenv ? cc; +assert stdenv.cc ? libc; + +let + os = stdenv.lib.optionalString; + majorVersion = "2.8"; + minorVersion = "12.2"; + version = "${majorVersion}.${minorVersion}"; +in + +stdenv.mkDerivation rec { + name = "cmake-${os useNcurses "cursesUI-"}${os useQt4 "qt4UI-"}${version}"; + + inherit majorVersion; + + src = fetchurl { + url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; + sha256 = "0phf295a9cby0v7zqdswr238v5aiy3rb2fs6dz39zjxbmzlp8rcc"; + }; + + enableParallelBuilding = true; + + patches = + [(fetchpatch { # see https://www.cmake.org/Bug/view.php?id=13959 + name = "FindFreetype-2.5.patch"; + url = "https://public.kitware.com/Bug/file/4660/0001-Support-finding-freetype2-using-pkg-config.patch"; + sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj"; + })] ++ + # Don't search in non-Nix locations such as /usr, but do search in our libc. + [ ./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?" + + "file_id=4981&type=bug"; + sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv"; + }); + + postPatch = '' + substituteInPlace Utilities/cmlibarchive/CMakeLists.txt \ + --replace '"-framework CoreServices"' '""' + ''; + + buildInputs = [ setupHook curl expat zlib bzip2 ] + ++ optional useNcurses ncurses + ++ optional useQt4 qt4; + + propagatedBuildInputs = [ ps ]; + + CMAKE_PREFIX_PATH = concatStringsSep ":" + (concatMap (p: [ (p.dev or p) (p.out or p) ]) buildInputs); + + configureFlags = [ + "--docdir=/share/doc/${name}" + "--mandir=/share/man" + "--system-libs" + "--no-system-libarchive" + ] ++ stdenv.lib.optional useQt4 "--qt-gui"; + + setupHook = ./setup-hook.sh; + + dontUseCmakeConfigure = true; + + preConfigure = with stdenv; '' + fixCmakeFiles . + substituteInPlace Modules/Platform/UnixPaths.cmake \ + --subst-var-by libc_bin ${getBin cc.libc} \ + --subst-var-by libc_dev ${getDev cc.libc} \ + --subst-var-by libc_lib ${getLib cc.libc} + configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags" + ''; + + hardeningDisable = [ "format" ]; + + meta = { + homepage = "https://cmake.org"; + description = "Cross-Platform Makefile Generator"; + platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ xfix ]; + license = stdenv.lib.licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/3.2.2-cygwin.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/3.2.2-cygwin.patch new file mode 100644 index 000000000000..982aba17e874 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/3.2.2-cygwin.patch @@ -0,0 +1,274 @@ +--- cmake-3.2.2/Source/cmFileCommand.cxx 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Source/ccmFileCommand.cxx 2015-06-10 11:02:27.345598700 +0200 +@@ -1179,7 +1179,7 @@ + MatchProperties CollectMatchProperties(const char* file) + { + // Match rules are case-insensitive on some platforms. +-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__APPLE__) + std::string lower = cmSystemTools::LowerCase(file); + const char* file_to_match = lower.c_str(); + #else +--- cmake-3.2.2/Source/cmInstallCommand.cxx 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Source/cmInstallCommand.cxx 2015-06-10 11:04:19.257935200 +0200 +@@ -1138,7 +1138,7 @@ + { + literal_args += " REGEX \""; + // Match rules are case-insensitive on some platforms. +-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__APPLE__) + std::string regex = cmSystemTools::LowerCase(args[i]); + #else + std::string regex = args[i]; +--- cmake-3.2.2/Source/kwsys/Glob.cxx 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Source/kwsys/Glob.cxx 2015-06-10 11:05:51.602674000 +0200 +@@ -37,7 +37,7 @@ + #include <string.h> + namespace KWSYS_NAMESPACE + { +-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__APPLE__) + // On Windows and apple, no difference between lower and upper case + # define KWSYS_GLOB_CASE_INDEPENDENT + #endif +--- cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-06-10 11:13:00.308303500 +0200 +@@ -911,7 +911,7 @@ + // Hide implementation details in an anonymous namespace. + namespace { + // ***************************************************************************** +-#if defined(__linux) || defined(__APPLE__) ++#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__) + int LoadLines( + FILE *file, + kwsys_stl::vector<kwsys_stl::string> &lines) +@@ -947,7 +947,7 @@ + return nRead; + } + +-# if defined(__linux) ++# if defined(__linux) || defined(__CYGWIN__) + // ***************************************************************************** + int LoadLines( + const char *fileName, +@@ -986,7 +986,7 @@ + } + #endif + +-#if defined(__linux) ++#if defined(__linux) || defined(__CYGWIN__) + // **************************************************************************** + template<typename T> + int GetFieldsFromFile( +@@ -3132,7 +3132,6 @@ + pos = buffer.find("processor\t",pos+1); + } + +-#ifdef __linux + // Find the largest physical id. + int maxId = -1; + kwsys_stl::string idc = +@@ -3165,14 +3164,6 @@ + atoi(this->ExtractValueFromCpuInfoFile(buffer,"ncpus active").c_str()); + } + +-#else // __CYGWIN__ +- // does not have "physical id" entries, neither "cpu cores" +- // this has to be fixed for hyper-threading. +- kwsys_stl::string cpucount = +- this->ExtractValueFromCpuInfoFile(buffer,"cpu count"); +- this->NumberOfPhysicalCPU= +- this->NumberOfLogicalCPU = atoi(cpucount.c_str()); +-#endif + // gotta have one, and if this is 0 then we get a / by 0n + // better to have a bad answer than a crash + if(this->NumberOfPhysicalCPU <= 0) +@@ -3370,7 +3361,7 @@ + GlobalMemoryStatusEx(&statex); + return statex.ullTotalPhys/1024; + # endif +-#elif defined(__linux) ++#elif defined(__linux) || defined(__CYGWIN__) + SystemInformation::LongLong memTotal=0; + int ierr=GetFieldFromFile("/proc/meminfo","MemTotal:",memTotal); + if (ierr) +@@ -3501,7 +3492,7 @@ + GlobalMemoryStatusEx(&statex); + return (statex.ullTotalPhys - statex.ullAvailPhys)/1024; + # endif +-#elif defined(__linux) ++#elif defined(__linux) || defined(__CYGWIN__) + const char *names[3]={"MemTotal:","MemFree:",NULL}; + SystemInformation::LongLong values[2]={SystemInformation::LongLong(0)}; + int ierr=GetFieldsFromFile("/proc/meminfo",names,values); +@@ -3560,7 +3551,7 @@ + return -2; + } + return pmc.WorkingSetSize/1024; +-#elif defined(__linux) ++#elif defined(__linux) || defined(__CYGWIN__) + SystemInformation::LongLong memUsed=0; + int ierr=GetFieldFromFile("/proc/self/status","VmRSS:",memUsed); + if (ierr) +@@ -3612,7 +3603,7 @@ + { + #if defined(_WIN32) + return GetCurrentProcessId(); +-#elif defined(__linux) || defined(__APPLE__) ++#elif defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__) + return getpid(); + #else + return -1; +--- cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-06-10 11:21:58.980443200 +0200 +@@ -93,19 +93,12 @@ + # if defined(_MSC_VER) && _MSC_VER >= 1800 + # define KWSYS_WINDOWS_DEPRECATED_GetVersionEx + # endif +-#elif defined (__CYGWIN__) +-# include <windows.h> +-# undef _WIN32 + #endif + + #if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H + extern char **environ; + #endif + +-#ifdef __CYGWIN__ +-# include <sys/cygwin.h> +-#endif +- + // getpwnam doesn't exist on Windows and Cray Xt3/Catamount + // same for TIOCGWINSZ + #if defined(_WIN32) || defined (__LIBCATAMOUNT__) +@@ -1148,15 +1141,7 @@ + { + return false; + } +-#if defined(__CYGWIN__) +- // Convert filename to native windows path if possible. +- char winpath[MAX_PATH]; +- if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath)) +- { +- return (GetFileAttributesA(winpath) != INVALID_FILE_ATTRIBUTES); +- } +- return access(filename.c_str(), R_OK) == 0; +-#elif defined(_WIN32) ++#if defined(_WIN32) + return (GetFileAttributesW( + SystemTools::ConvertToWindowsExtendedPath(filename).c_str()) + != INVALID_FILE_ATTRIBUTES); +@@ -1190,28 +1175,6 @@ + } + + //---------------------------------------------------------------------------- +-#ifdef __CYGWIN__ +-bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path) +-{ +- SystemToolsTranslationMap::iterator i = +- SystemTools::Cyg2Win32Map->find(path); +- +- if (i != SystemTools::Cyg2Win32Map->end()) +- { +- strncpy(win32_path, i->second.c_str(), MAX_PATH); +- } +- else +- { +- if(cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, MAX_PATH) != 0) +- { +- win32_path[0] = 0; +- } +- SystemToolsTranslationMap::value_type entry(path, win32_path); +- SystemTools::Cyg2Win32Map->insert(entry); +- } +- return win32_path[0] != 0; +-} +-#endif + + bool SystemTools::Touch(const kwsys_stl::string& filename, bool create) + { +@@ -4307,7 +4270,7 @@ + + bool SystemTools::FileIsFullPath(const char* in_name, size_t len) + { +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) + // On Windows, the name must be at least two characters long. + if(len < 2) + { +@@ -5078,9 +5041,6 @@ + static unsigned int SystemToolsManagerCount; + SystemToolsTranslationMap *SystemTools::TranslationMap; + SystemToolsTranslationMap *SystemTools::LongPathMap; +-#ifdef __CYGWIN__ +-SystemToolsTranslationMap *SystemTools::Cyg2Win32Map; +-#endif + + // SystemToolsManager manages the SystemTools singleton. + // SystemToolsManager should be included in any translation unit +@@ -5126,9 +5086,6 @@ + // Allocate the translation map first. + SystemTools::TranslationMap = new SystemToolsTranslationMap; + SystemTools::LongPathMap = new SystemToolsTranslationMap; +-#ifdef __CYGWIN__ +- SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap; +-#endif + + // Add some special translation paths for unix. These are not added + // for windows because drive letters need to be maintained. Also, +@@ -5183,9 +5140,6 @@ + { + delete SystemTools::TranslationMap; + delete SystemTools::LongPathMap; +-#ifdef __CYGWIN__ +- delete SystemTools::Cyg2Win32Map; +-#endif + } + + +--- cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-06-10 11:24:24.271286600 +0200 +@@ -298,15 +298,6 @@ + static bool FileExists(const kwsys_stl::string& filename); + + /** +- * Converts Cygwin path to Win32 path. Uses dictionary container for +- * caching and calls to cygwin_conv_to_win32_path from Cygwin dll +- * for actual translation. Returns true on success, else false. +- */ +-#ifdef __CYGWIN__ +- static bool PathCygwinToWin32(const char *path, char *win32_path); +-#endif +- +- /** + * Return file length + */ + static unsigned long FileLength(const kwsys_stl::string& filename); +@@ -942,9 +933,6 @@ + */ + static SystemToolsTranslationMap *TranslationMap; + static SystemToolsTranslationMap *LongPathMap; +-#ifdef __CYGWIN__ +- static SystemToolsTranslationMap *Cyg2Win32Map; +-#endif + friend class SystemToolsManager; + }; + +--- cmake-3.2.2/Modules/FindCurses.cmake 2015-04-13 19:09:00.000000000 +0200 ++++ cmake-3.2.2/Modules/FindCurses.cmake 2015-06-10 12:10:19.682030300 +0200 +@@ -60,15 +60,6 @@ + if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES)) + set(CURSES_USE_NCURSES TRUE) + endif() +-# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html +-# cygwin ncurses stopped providing curses.h symlinks see above +-# message. Cygwin is an ncurses package, so force ncurses on +-# cygwin if the curses.h is missing +-if(CYGWIN) +- if(NOT EXISTS /usr/include/curses.h) +- set(CURSES_USE_NCURSES TRUE) +- endif() +-endif() + + + # Not sure the logic is correct here. diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/application-services.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/application-services.patch new file mode 100644 index 000000000000..75873d6055c0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/application-services.patch @@ -0,0 +1,44 @@ +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt +index 1b6bb00d4c..487114daa8 100644 +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -893,7 +893,6 @@ endif() + # On Apple we need CoreFoundation and CoreServices + if(APPLE) + target_link_libraries(CMakeLib "-framework CoreFoundation") +- target_link_libraries(CMakeLib "-framework CoreServices") + endif() + + if(WIN32 AND NOT UNIX) +diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx +index a5ce5d18f4..3d6838ce82 100644 +--- a/Source/cmGlobalXCodeGenerator.cxx ++++ b/Source/cmGlobalXCodeGenerator.cxx +@@ -43,11 +43,6 @@ + + struct cmLinkImplementation; + +-#if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__) +-# define HAVE_APPLICATION_SERVICES +-# include <ApplicationServices/ApplicationServices.h> +-#endif +- + #if !defined(CMAKE_BOOTSTRAP) + # include "cmXMLParser.h" + +diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt +index bfcaf30bb7..1da540aee5 100644 +--- a/Utilities/cmlibarchive/CMakeLists.txt ++++ b/Utilities/cmlibarchive/CMakeLists.txt +@@ -2007,11 +2007,6 @@ IF(ENABLE_TEST) + ENDIF(ENABLE_TEST) + ENDIF() + +-# We need CoreServices on Mac OS. +-IF(APPLE) +- LIST(APPEND ADDITIONAL_LIBS "-framework CoreServices") +-ENDIF(APPLE) +- + add_subdirectory(libarchive) + IF(0) # CMake does not build libarchive's command-line tools. + add_subdirectory(cat) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix new file mode 100644 index 000000000000..559a4c191b68 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix @@ -0,0 +1,128 @@ +{ stdenv, lib, fetchurl, pkgconfig, fetchpatch +, bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash +, buildPackages +# darwin attributes +, ps +, isBootstrap ? false +, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) +, useNcurses ? false, ncurses +, useQt4 ? false, qt4 +, withQt5 ? false, qtbase +}: + +assert withQt5 -> useQt4 == false; +assert useQt4 -> withQt5 == false; + +stdenv.mkDerivation rec { + pname = "cmake" + + lib.optionalString isBootstrap "-boot" + + lib.optionalString useNcurses "-cursesUI" + + lib.optionalString withQt5 "-qt5UI" + + lib.optionalString useQt4 "-qt4UI"; + version = "3.18.2"; + + src = fetchurl { + url = "${meta.homepage}files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; + # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt + sha256 = "0zhxsnxm5d8wdarz2gs3r41r1dfrnh35ki75fa684gaxfzy40kjx"; + }; + + 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. + ./application-services.patch + + # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d + ./libuv-application-services.patch + + ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch; + + outputs = [ "out" ]; + setOutputFlags = false; + + setupHook = ./setup-hook.sh; + + buildInputs = + [ setupHook pkgconfig ] + ++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ] + ++ lib.optional useNcurses ncurses + ++ lib.optional useQt4 qt4 + ++ lib.optional withQt5 qtbase; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + propagatedBuildInputs = lib.optional stdenv.isDarwin ps; + + preConfigure = '' + fixCmakeFiles . + substituteInPlace Modules/Platform/UnixPaths.cmake \ + --subst-var-by libc_bin ${lib.getBin stdenv.cc.libc} \ + --subst-var-by libc_dev ${lib.getDev stdenv.cc.libc} \ + --subst-var-by libc_lib ${lib.getLib stdenv.cc.libc} + substituteInPlace Modules/FindCxxTest.cmake \ + --replace "$""{PYTHON_EXECUTABLE}" ${stdenv.shell} + '' + # 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 = [ + "--docdir=share/doc/${pname}${version}" + ] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup + ++ lib.optional (useQt4 || withQt5) "--qt-gui" + # Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568 + ++ lib.optionals stdenv.hostPlatform.is32bit [ + "CFLAGS=-D_FILE_OFFSET_BITS=64" + "CXXFLAGS=-D_FILE_OFFSET_BITS=64" + ] + ++ [ + "--" + # We should set the proper `CMAKE_SYSTEM_NAME`. + # http://www.cmake.org/Wiki/CMake_Cross_Compiling + # + # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and + # strip. Otherwise they are taken to be relative to the source root of the + # package being built. + "-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++" + "-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc" + "-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" + ] + # Avoid depending on frameworks. + ++ lib.optional (!useNcurses) "-DBUILD_CursesDialog=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 + ''; + + dontUseCmakeConfigure = true; + enableParallelBuilding = true; + + # This isn't an autoconf configure script; triples are passed via + # CMAKE_SYSTEM_NAME, etc. + configurePlatforms = [ ]; + + doCheck = false; # fails + + meta = with lib; { + homepage = "https://cmake.org/"; + changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/" + + "release/${lib.versions.majorMinor version}.html"; + description = "Cross-Platform Makefile Generator"; + longDescription = '' + CMake is an open-source, cross-platform family of tools designed to + build, test and package software. CMake is used to control the software + compilation process using simple platform and compiler independent + configuration files, and generate native makefiles and workspaces that + can be used in the compiler environment of your choice. + ''; + platforms = if useQt4 then qt4.meta.platforms else platforms.all; + maintainers = with maintainers; [ ttuegel lnl7 ]; + license = licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch new file mode 100644 index 000000000000..6607a9c6ed1f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/libuv-application-services.patch @@ -0,0 +1,55 @@ +diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt +index 7625cf65d9..167903e309 100644 +--- a/Utilities/cmlibuv/CMakeLists.txt ++++ b/Utilities/cmlibuv/CMakeLists.txt +@@ -193,6 +193,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + 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 --git a/Utilities/cmlibuv/src/unix/fsevents.c b/Utilities/cmlibuv/src/unix/fsevents.c +index a51f29b3f6..3f6bf01968 100644 +--- a/Utilities/cmlibuv/src/unix/fsevents.c ++++ b/Utilities/cmlibuv/src/unix/fsevents.c +@@ -21,7 +21,7 @@ + #include "uv.h" + #include "internal.h" + +-#if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MAX_ALLOWED < 1070 ++#if !HAVE_CORESERVICES_CORESERVICES_H || MAC_OS_X_VERSION_MAX_ALLOWED < 1070 + + /* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */ + /* macOS prior to 10.7 doesn't provide the full FSEvents API so use kqueue */ +@@ -39,7 +39,7 @@ int uv__fsevents_close(uv_fs_event_t* handle) { + void uv__fsevents_loop_delete(uv_loop_t* loop) { + } + +-#else /* TARGET_OS_IPHONE */ ++#else /* !HAVE_CORESERVICES_CORESERVICES_H */ + + #include "darwin-stub.h" + +@@ -920,4 +920,4 @@ int uv__fsevents_close(uv_fs_event_t* handle) { + return 0; + } + +-#endif /* TARGET_OS_IPHONE */ ++#endif /* !HAVE_CORESERVICES_CORESERVICES_H */ diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/search-path-2.8.patch new file mode 100644 index 000000000000..9fc949661686 --- /dev/null +++ b/infra/libkookie/nixpkgs/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/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/search-path.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/search-path.patch new file mode 100644 index 000000000000..b71c2dd44416 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/search-path.patch @@ -0,0 +1,74 @@ +diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake +index b9381c3d7d..cecc40a89e 100644 +--- a/Modules/Platform/UnixPaths.cmake ++++ b/Modules/Platform/UnixPaths.cmake +@@ -26,9 +26,6 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) + # please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst + # synchronized + list(APPEND CMAKE_SYSTEM_PREFIX_PATH +- # Standard +- /usr/local /usr / +- + # CMake install location + "${_CMAKE_INSTALL_DIR}" + ) +@@ -47,24 +44,19 @@ endif() + + # 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 + ) + + if(CMAKE_SYSROOT_COMPILE) +@@ -77,15 +69,15 @@ endif() + # parsing the implicit directory information from compiler output. + set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT + ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} +- "${_cmake_sysroot_compile}/usr/include" ++ @libc_dev@/include + ) + set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT + ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} +- "${_cmake_sysroot_compile}/usr/include" ++ @libc_dev@/include + ) + set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT + ${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES} +- "${_cmake_sysroot_compile}/usr/include" ++ @libc_dev@/include + ) + + unset(_cmake_sysroot_compile) +diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake +index b9e2f17979..ab517cd4a7 100644 +--- a/Modules/Platform/WindowsPaths.cmake ++++ b/Modules/Platform/WindowsPaths.cmake +@@ -70,7 +70,7 @@ endif() + + 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/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/setup-hook.sh new file mode 100755 index 000000000000..0bb695615fce --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -0,0 +1,178 @@ +addCMakeParams() { + addToSearchPath CMAKE_PREFIX_PATH $1 +} + +fixCmakeFiles() { + # Replace occurences of /usr and /opt by /var/empty. + echo "fixing cmake files..." + find "$1" \( -type f -name "*.cmake" -o -name "*.cmake.in" -o -name CMakeLists.txt \) -print | + while read fn; do + sed -e 's^/usr\([ /]\|$\)^/var/empty\1^g' -e 's^/opt\([ /]\|$\)^/var/empty\1^g' < "$fn" > "$fn.tmp" + mv "$fn.tmp" "$fn" + done +} + +cmakeConfigurePhase() { + runHook preConfigure + + export CTEST_OUTPUT_ON_FAILURE=1 + if [ -n "${enableParallelChecking-1}" ]; then + export CTEST_PARALLEL_LEVEL=$NIX_BUILD_CORES + fi + + if [ -z "${dontFixCmake-}" ]; then + fixCmakeFiles . + fi + + if [ -z "${dontUseCmakeBuildDir-}" ]; then + mkdir -p build + cd build + cmakeDir=${cmakeDir:-..} + fi + + if [ -z "${dontAddPrefix-}" ]; then + cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags" + fi + + # We should set the proper `CMAKE_SYSTEM_NAME`. + # http://www.cmake.org/Wiki/CMake_Cross_Compiling + # + # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and + # strip. Otherwise they are taken to be relative to the source root of the + # package being built. + cmakeFlags="-DCMAKE_CXX_COMPILER=$CXX $cmakeFlags" + cmakeFlags="-DCMAKE_C_COMPILER=$CC $cmakeFlags" + cmakeFlags="-DCMAKE_AR=$(command -v $AR) $cmakeFlags" + cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLIB) $cmakeFlags" + cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags" + + # on macOS we want to prefer Unix-style headers to Frameworks + # because we usually do not package the framework + cmakeFlags="-DCMAKE_FIND_FRAMEWORK=LAST $cmakeFlags" + + # on macOS i686 was only relevant for 10.5 or earlier. + cmakeFlags="-DCMAKE_OSX_ARCHITECTURES=x86_64 $cmakeFlags" + + # we never want to use the global macOS SDK + cmakeFlags="-DCMAKE_OSX_SYSROOT= $cmakeFlags" + + # correctly detect our clang compiler + cmakeFlags="-DCMAKE_POLICY_DEFAULT_CMP0025=NEW $cmakeFlags" + + # This installs shared libraries with a fully-specified install + # name. By default, cmake installs shared libraries with just the + # basename as the install name, which means that, on Darwin, they + # can only be found by an executable at runtime if the shared + # libraries are in a system path or in the same directory as the + # executable. This flag makes the shared library accessible from its + # nix/store directory. + cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags" + + # The docdir flag needs to include PROJECT_NAME as per GNU guidelines, + # try to extract it from CMakeLists.txt. + if [[ -z "$shareDocName" ]]; then + local cmakeLists="${cmakeDir}/CMakeLists.txt" + if [[ -f "$cmakeLists" ]]; then + local shareDocName="$(grep --only-matching --perl-regexp --ignore-case '\bproject\s*\(\s*"?\K([^[:space:]")]+)' < "$cmakeLists" | head -n1)" + fi + # The argument sometimes contains garbage or variable interpolation. + # When that is the case, let’s fall back to the derivation name. + if [[ -z "$shareDocName" ]] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_+-]'; then + if [[ -n "${pname-}" ]]; then + shareDocName="$pname" + else + shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')" + fi + fi + fi + + # This ensures correct paths with multiple output derivations + # It requires the project to use variables from GNUInstallDirs module + # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html + cmakeFlags="-DCMAKE_INSTALL_BINDIR=${!outputBin}/bin $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_SBINDIR=${!outputBin}/sbin $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputInclude}/include $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_OLDINCLUDEDIR=${!outputInclude}/include $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_MANDIR=${!outputMan}/share/man $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_INFODIR=${!outputInfo}/share/info $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_DOCDIR=${!outputDoc}/share/doc/${shareDocName} $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_LIBDIR=${!outputLib}/lib $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_LIBEXECDIR=${!outputLib}/libexec $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags" + + # Don’t build tests when doCheck = false + if [ -z "${doCheck-}" ]; then + cmakeFlags="-DBUILD_TESTING=OFF $cmakeFlags" + fi + + # Avoid cmake resetting the rpath of binaries, on make install + # And build always Release, to ensure optimisation flags + cmakeFlags="-DCMAKE_BUILD_TYPE=${cmakeBuildType:-Release} -DCMAKE_SKIP_BUILD_RPATH=ON $cmakeFlags" + + # Disable user package registry to avoid potential side effects + # and unecessary attempts to access non-existent home folder + # https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#disabling-the-package-registry + cmakeFlags="-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON $cmakeFlags" + cmakeFlags="-DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF $cmakeFlags" + cmakeFlags="-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF $cmakeFlags" + + if [ "${buildPhase-}" = ninjaBuildPhase ]; then + cmakeFlags="-GNinja $cmakeFlags" + fi + + echo "cmake flags: $cmakeFlags ${cmakeFlagsArray[@]}" + + cmake ${cmakeDir:-.} $cmakeFlags "${cmakeFlagsArray[@]}" + + if ! [[ -v enableParallelBuilding ]]; then + enableParallelBuilding=1 + echo "cmake: enabled parallel building" + fi + + runHook postConfigure +} + +if [ -z "${dontUseCmakeConfigure-}" -a -z "${configurePhase-}" ]; then + setOutputFlags= + configurePhase=cmakeConfigurePhase +fi + +addEnvHooks "$targetOffset" addCMakeParams + +makeCmakeFindLibs(){ + isystem_seen= + iframework_seen= + for flag in ${NIX_CFLAGS_COMPILE-} ${NIX_LDFLAGS-}; do + if test -n "$isystem_seen" && test -d "$flag"; then + isystem_seen= + export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH-}${CMAKE_INCLUDE_PATH:+:}${flag}" + elif test -n "$iframework_seen" && test -d "$flag"; then + iframework_seen= + export CMAKE_FRAMEWORK_PATH="${CMAKE_FRAMEWORK_PATH-}${CMAKE_FRAMEWORK_PATH:+:}${flag}" + else + isystem_seen= + iframework_seen= + case $flag in + -I*) + export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH-}${CMAKE_INCLUDE_PATH:+:}${flag:2}" + ;; + -L*) + export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH-}${CMAKE_LIBRARY_PATH:+:}${flag:2}" + ;; + -F*) + export CMAKE_FRAMEWORK_PATH="${CMAKE_FRAMEWORK_PATH-}${CMAKE_FRAMEWORK_PATH:+:}${flag:2}" + ;; + -isystem) + isystem_seen=1 + ;; + -iframework) + iframework_seen=1 + ;; + esac + fi + done +} + +# not using setupHook, because it could be a setupHook adding additional +# include flags to NIX_CFLAGS_COMPILE +postHooks+=(makeCmakeFindLibs) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/colormake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/colormake/default.nix new file mode 100644 index 000000000000..7eed88069557 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/colormake/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, perl }: + +stdenv.mkDerivation { + pname = "colormake"; + version = "2.1.0"; + + buildInputs = [ perl ]; + + src = fetchFromGitHub { + owner = "pagekite"; + repo = "Colormake"; + rev = "66544f40d"; + sha256 = "8e714c5540305d169989d9387dbac47b8b9fb2cfb424af7bcd412bfe684dc6d7"; + }; + + installPhase = '' + mkdir -p $out/bin + cp -fa colormake.pl colormake colormake-short clmake clmake-short $out/bin + ''; + + meta = with stdenv.lib; { + description = "Simple wrapper around make to colorize the output"; + homepage = "https://bre.klaki.net/programs/colormake/"; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ bhipple ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/conan/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/conan/default.nix new file mode 100644 index 000000000000..e09277e498d2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/conan/default.nix @@ -0,0 +1,103 @@ +{ lib, python3, fetchFromGitHub, git, pkgconfig }: + +# Note: +# Conan has specific dependency demands; check +# https://github.com/conan-io/conan/blob/master/conans/requirements.txt +# https://github.com/conan-io/conan/blob/master/conans/requirements_server.txt +# on the release branch/commit we're packaging. +# +# Two approaches are used here to deal with that: +# Pinning the specific versions it wants in `newPython`, +# and using `substituteInPlace conans/requirements.txt ...` +# in `postPatch` to allow newer versions when we know +# (e.g. from changelogs) that they are compatible. + +let newPython = python3.override { + packageOverrides = self: super: { + distro = super.distro.overridePythonAttrs (oldAttrs: rec { + version = "1.1.0"; + src = oldAttrs.src.override { + inherit version; + sha256 = "1vn1db2akw98ybnpns92qi11v94hydwp130s8753k6ikby95883j"; + }; + }); + node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec { + version = "0.6.1"; + src = oldAttrs.src.override { + inherit version; + sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0"; + }; + }); + pluginbase = super.pluginbase.overridePythonAttrs (oldAttrs: rec { + version = "0.7"; + src = oldAttrs.src.override { + inherit version; + sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8"; + }; + }); + }; +}; + +in newPython.pkgs.buildPythonApplication rec { + version = "1.27.0"; + pname = "conan"; + + src = fetchFromGitHub { + owner = "conan-io"; + repo = "conan"; + rev = version; + sha256 = "0ncqs1p4g23fmzgdmwppgxr8w275h38hgjdzs456cgivz8xs9rjl"; + }; + + propagatedBuildInputs = with newPython.pkgs; [ + bottle + colorama + dateutil + deprecation + distro + fasteners + future + jinja2 + node-semver + patch-ng + pluginbase + pygments + pyjwt + pylint # Not in `requirements.txt` but used in hooks, see https://github.com/conan-io/conan/pull/6152 + pyyaml + requests + six + tqdm + urllib3 + ]; + + checkInputs = [ + pkgconfig + git + ] ++ (with newPython.pkgs; [ + codecov + mock + nose + parameterized + webtest + ]); + + # TODO: reenable tests now that we fetch tests w/ the source from GitHub. + # Not enabled right now due to time constraints/failing tests that I didn't have time to track down + doCheck = false; + + postPatch = '' + substituteInPlace conans/requirements.txt \ + --replace "PyYAML>=3.11, <3.14.0" "PyYAML" \ + --replace "deprecation>=2.0, <2.1" "deprecation" \ + --replace "six>=1.10.0,<=1.14.0" "six" + ''; + + meta = with lib; { + homepage = "https://conan.io"; + description = "Decentralized and portable C/C++ package manager"; + license = licenses.mit; + maintainers = with maintainers; [ HaoZeke ]; + platforms = platforms.linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/doit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/doit/default.nix new file mode 100644 index 000000000000..b906d64f0af9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/doit/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, python3Packages }: + +let + + name = "doit"; + version = "0.32.0"; + +in python3Packages.buildPythonApplication { + name = "${name}-${version}"; + + src = fetchurl { + url = "mirror://pypi/d/${name}/${name}-${version}.tar.gz"; + sha256 = "033m6y9763l81kgqd07rm62bngv3dsm3k9p28nwsn2qawl8h8g9j"; + }; + + buildInputs = with python3Packages; [ mock pytest ]; + + propagatedBuildInputs = with python3Packages; [ cloudpickle ] + ++ stdenv.lib.optional stdenv.isLinux pyinotify + ++ stdenv.lib.optional stdenv.isDarwin macfsevents; + + # Tests fail due to mysterious gdbm.open() resource temporarily + # unavailable errors. + doCheck = false; + checkPhase = "py.test"; + + meta = with stdenv.lib; { + homepage = "https://pydoit.org/"; + description = "A task management & automation tool"; + 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 + work-flows. It is specially suitable for building and managing + custom work-flows where there is no out-of-the-box solution + available. + ''; + maintainers = with maintainers; [ pSub ]; + platforms = platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/Gemfile b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/Gemfile new file mode 100644 index 000000000000..ddb13a65c165 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'drake' diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/Gemfile.lock b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/Gemfile.lock new file mode 100644 index 000000000000..466133010e04 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/Gemfile.lock @@ -0,0 +1,15 @@ +GEM + remote: https://rubygems.org/ + specs: + comp_tree (1.1.3) + drake (0.9.2.0.3.1) + comp_tree (>= 1.1.3) + +PLATFORMS + ruby + +DEPENDENCIES + drake + +BUNDLED WITH + 2.1.4 diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/default.nix new file mode 100644 index 000000000000..2f753c82521e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/default.nix @@ -0,0 +1,17 @@ +{ lib, bundlerApp, bundlerUpdateScript }: + +bundlerApp { + pname = "drake"; + gemdir = ./.; + exes = [ "drake" ]; + + passthru.updateScript = bundlerUpdateScript "drake"; + + meta = with lib; { + description = "A branch of Rake supporting automatic parallelizing of tasks"; + homepage = "http://quix.github.io/rake/"; + maintainers = with maintainers; [ romildo manveru nicknovitski ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/gemset.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/gemset.nix new file mode 100644 index 000000000000..061ed5d973ab --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/drake/gemset.nix @@ -0,0 +1,23 @@ +{ + comp_tree = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0dj9lkfxcczn67l1j12dcxswrfxxd1zgxa344zk6vqs2gwwhy9m9"; + type = "gem"; + }; + version = "1.1.3"; + }; + drake = { + dependencies = ["comp_tree"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "09gkmdshwdmdnkdxi03dv4rk1dip0wdv6dx14wscrmi0jyk86yag"; + type = "gem"; + }; + version = "0.9.2.0.3.1"; + }; +}
\ No newline at end of file diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix new file mode 100644 index 000000000000..44c91e936097 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix @@ -0,0 +1,75 @@ +{ stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }: + +stdenv.mkDerivation rec { + pname = "dub"; + version = "1.14.0"; + + enableParallelBuilding = true; + + src = fetchFromGitHub { + owner = "dlang"; + repo = "dub"; + rev = "v${version}"; + sha256 = "070kfkyrkr98y1hbhcf85842c0x7l95w1ambrkdgajpb6kcmpf84"; + }; + + postUnpack = '' + patchShebangs . + ''; + + # Can be removed with https://github.com/dlang/dub/pull/1368 + dubvar = "\\$DUB"; + postPatch = '' + substituteInPlace test/fetchzip.sh \ + --replace "dub remove" "\"${dubvar}\" remove" + ''; + + nativeBuildInputs = [ dmd libevent rsync ]; + buildInputs = [ curl ]; + + buildPhase = '' + export DMD=${dmd.out}/bin/dmd + ./build.sh + ''; + + doCheck = !stdenv.isDarwin; + + checkPhase = '' + export DUB=$NIX_BUILD_TOP/source/bin/dub + export PATH=$PATH:$NIX_BUILD_TOP/source/bin/ + export DC=${dmd.out}/bin/dmd + export HOME=$TMP + + rm -rf test/issue502-root-import + rm test/issue990-download-optional-selected.sh + rm test/timeout.sh + rm test/issue674-concurrent-dub.sh + rm test/issue672-upgrade-optional.sh + rm test/issue1574-addcommand.sh + rm test/issue1524-maven-upgrade-dependency-tree.sh + rm test/issue1416-maven-repo-pkg-supplier.sh + rm test/issue1037-better-dependency-messages.sh + rm test/interactive-remove.sh + rm test/fetchzip.sh + rm test/feat663-search.sh + rm test/ddox.sh + rm test/0-init-multi.sh + rm test/0-init-multi-json.sh + + ./test/run-unittest.sh + ''; + + installPhase = '' + mkdir $out + mkdir $out/bin + cp bin/dub $out/bin + ''; + + meta = with stdenv.lib; { + description = "Package and build manager for D applications and libraries"; + homepage = "https://code.dlang.org/"; + license = licenses.mit; + maintainers = with maintainers; [ ThomasMader ]; + platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/fac/cargo-lock.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/fac/cargo-lock.patch new file mode 100644 index 000000000000..86768d4611e3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/fac/cargo-lock.patch @@ -0,0 +1,802 @@ +diff --git a/Cargo.lock b/Cargo.lock +new file mode 100644 +index 0000000..4ab2c17 +--- /dev/null ++++ b/Cargo.lock +@@ -0,0 +1,796 @@ ++# This file is automatically @generated by Cargo. ++# It is not intended for manual editing. ++[[package]] ++name = "ahash" ++version = "0.3.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" ++ ++[[package]] ++name = "aho-corasick" ++version = "0.7.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" ++dependencies = [ ++ "memchr", ++] ++ ++[[package]] ++name = "ansi_term" ++version = "0.11.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" ++dependencies = [ ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "atty" ++version = "0.2.14" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" ++dependencies = [ ++ "hermit-abi", ++ "libc", ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "autocfg" ++version = "1.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" ++ ++[[package]] ++name = "bigbro" ++version = "0.5.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3eaac07a3e62cd31e2102ca97c7fdf20002893ba2a396d29ea4710d2415cdce5" ++dependencies = [ ++ "libc", ++ "seccomp-droundy", ++] ++ ++[[package]] ++name = "bitflags" ++version = "1.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" ++ ++[[package]] ++name = "cc" ++version = "1.0.59" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" ++ ++[[package]] ++name = "cfg-if" ++version = "0.1.10" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" ++ ++[[package]] ++name = "clap" ++version = "2.33.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" ++dependencies = [ ++ "ansi_term", ++ "atty", ++ "bitflags", ++ "strsim", ++ "textwrap", ++ "unicode-width", ++ "vec_map", ++] ++ ++[[package]] ++name = "crude-profiler" ++version = "0.1.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9389510ac716b6ace8c4b635420cf023e12c81b61e933bfef06639142f149ecd" ++dependencies = [ ++ "lazy_static 0.2.11", ++] ++ ++[[package]] ++name = "ctrlc" ++version = "3.1.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d0b676fa23f995faf587496dcd1c80fead847ed58d2da52ac1caca9a72790dd2" ++dependencies = [ ++ "nix", ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "either" ++version = "1.6.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" ++ ++[[package]] ++name = "env_logger" ++version = "0.7.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" ++dependencies = [ ++ "log", ++ "regex", ++] ++ ++[[package]] ++name = "fac" ++version = "0.5.3" ++dependencies = [ ++ "atty", ++ "bigbro", ++ "clap", ++ "crude-profiler", ++ "ctrlc", ++ "git-version", ++ "internment", ++ "lazy_static 1.4.0", ++ "libc", ++ "metrohash", ++ "notify", ++ "num_cpus", ++ "pathdiff", ++ "quickcheck", ++ "termcolor", ++ "tinyset", ++] ++ ++[[package]] ++name = "filetime" ++version = "0.2.12" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" ++dependencies = [ ++ "cfg-if", ++ "libc", ++ "redox_syscall", ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "fsevent" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" ++dependencies = [ ++ "bitflags", ++ "fsevent-sys", ++] ++ ++[[package]] ++name = "fsevent-sys" ++version = "2.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] ++name = "fuchsia-zircon" ++version = "0.3.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" ++dependencies = [ ++ "bitflags", ++ "fuchsia-zircon-sys", ++] ++ ++[[package]] ++name = "fuchsia-zircon-sys" ++version = "0.3.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" ++ ++[[package]] ++name = "gcc" ++version = "0.3.55" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" ++ ++[[package]] ++name = "getrandom" ++version = "0.1.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" ++dependencies = [ ++ "cfg-if", ++ "libc", ++ "wasi", ++] ++ ++[[package]] ++name = "git-version" ++version = "0.3.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "94918e83f1e01dedc2e361d00ce9487b14c58c7f40bab148026fa39d42cb41e2" ++dependencies = [ ++ "git-version-macro", ++ "proc-macro-hack", ++] ++ ++[[package]] ++name = "git-version-macro" ++version = "0.3.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "34a97a52fdee1870a34fa6e4b77570cba531b27d1838874fef4429a791a3d657" ++dependencies = [ ++ "proc-macro-hack", ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "hashbrown" ++version = "0.8.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" ++dependencies = [ ++ "ahash", ++ "autocfg", ++] ++ ++[[package]] ++name = "hermit-abi" ++version = "0.1.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] ++name = "inotify" ++version = "0.7.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" ++dependencies = [ ++ "bitflags", ++ "inotify-sys", ++ "libc", ++] ++ ++[[package]] ++name = "inotify-sys" ++version = "0.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] ++name = "internment" ++version = "0.3.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7e5cba670f596a69e619cb796bcf609cb32c0ba4415d1e809104b8b832130d79" ++dependencies = [ ++ "hashbrown", ++ "lazy_static 1.4.0", ++ "serde", ++ "state", ++ "tinyset", ++] ++ ++[[package]] ++name = "iovec" ++version = "0.1.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] ++name = "itertools" ++version = "0.9.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" ++dependencies = [ ++ "either", ++] ++ ++[[package]] ++name = "kernel32-sys" ++version = "0.2.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" ++dependencies = [ ++ "winapi 0.2.8", ++ "winapi-build", ++] ++ ++[[package]] ++name = "lazy_static" ++version = "0.2.11" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" ++ ++[[package]] ++name = "lazy_static" ++version = "1.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" ++ ++[[package]] ++name = "lazycell" ++version = "1.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" ++ ++[[package]] ++name = "libc" ++version = "0.2.77" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235" ++ ++[[package]] ++name = "log" ++version = "0.4.11" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" ++dependencies = [ ++ "cfg-if", ++] ++ ++[[package]] ++name = "memchr" ++version = "2.3.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" ++ ++[[package]] ++name = "metrohash" ++version = "1.0.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3ba553cb19e2acbc54baa16faef215126243fe45e53357a3b2e9f4ebc7b0506c" ++ ++[[package]] ++name = "mio" ++version = "0.6.22" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" ++dependencies = [ ++ "cfg-if", ++ "fuchsia-zircon", ++ "fuchsia-zircon-sys", ++ "iovec", ++ "kernel32-sys", ++ "libc", ++ "log", ++ "miow", ++ "net2", ++ "slab", ++ "winapi 0.2.8", ++] ++ ++[[package]] ++name = "mio-extras" ++version = "2.0.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" ++dependencies = [ ++ "lazycell", ++ "log", ++ "mio", ++ "slab", ++] ++ ++[[package]] ++name = "miow" ++version = "0.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" ++dependencies = [ ++ "kernel32-sys", ++ "net2", ++ "winapi 0.2.8", ++ "ws2_32-sys", ++] ++ ++[[package]] ++name = "net2" ++version = "0.2.35" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" ++dependencies = [ ++ "cfg-if", ++ "libc", ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "nix" ++version = "0.17.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" ++dependencies = [ ++ "bitflags", ++ "cc", ++ "cfg-if", ++ "libc", ++ "void", ++] ++ ++[[package]] ++name = "notify" ++version = "4.0.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "80ae4a7688d1fab81c5bf19c64fc8db920be8d519ce6336ed4e7efe024724dbd" ++dependencies = [ ++ "bitflags", ++ "filetime", ++ "fsevent", ++ "fsevent-sys", ++ "inotify", ++ "libc", ++ "mio", ++ "mio-extras", ++ "walkdir", ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "num_cpus" ++version = "1.13.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" ++dependencies = [ ++ "hermit-abi", ++ "libc", ++] ++ ++[[package]] ++name = "pathdiff" ++version = "0.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34" ++ ++[[package]] ++name = "pkg-config" ++version = "0.3.18" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" ++ ++[[package]] ++name = "ppv-lite86" ++version = "0.2.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" ++ ++[[package]] ++name = "proc-macro-hack" ++version = "0.5.18" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" ++ ++[[package]] ++name = "proc-macro2" ++version = "1.0.21" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c" ++dependencies = [ ++ "unicode-xid", ++] ++ ++[[package]] ++name = "quickcheck" ++version = "0.9.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" ++dependencies = [ ++ "env_logger", ++ "log", ++ "rand", ++ "rand_core", ++] ++ ++[[package]] ++name = "quote" ++version = "1.0.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" ++dependencies = [ ++ "proc-macro2", ++] ++ ++[[package]] ++name = "rand" ++version = "0.7.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" ++dependencies = [ ++ "getrandom", ++ "libc", ++ "rand_chacha", ++ "rand_core", ++ "rand_hc", ++] ++ ++[[package]] ++name = "rand_chacha" ++version = "0.2.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" ++dependencies = [ ++ "ppv-lite86", ++ "rand_core", ++] ++ ++[[package]] ++name = "rand_core" ++version = "0.5.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" ++dependencies = [ ++ "getrandom", ++] ++ ++[[package]] ++name = "rand_hc" ++version = "0.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" ++dependencies = [ ++ "rand_core", ++] ++ ++[[package]] ++name = "redox_syscall" ++version = "0.1.57" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" ++ ++[[package]] ++name = "regex" ++version = "1.3.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" ++dependencies = [ ++ "aho-corasick", ++ "memchr", ++ "regex-syntax", ++ "thread_local 1.0.1", ++] ++ ++[[package]] ++name = "regex-syntax" ++version = "0.6.18" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" ++ ++[[package]] ++name = "same-file" ++version = "1.0.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" ++dependencies = [ ++ "winapi-util", ++] ++ ++[[package]] ++name = "seccomp-droundy" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d4b762ab71c6bf1a9a3e0b21e8600b73b088f2a6562e03cd77b2826821fae5f8" ++dependencies = [ ++ "libc", ++ "seccomp-droundy-sys", ++] ++ ++[[package]] ++name = "seccomp-droundy-sys" ++version = "0.1.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "200976cc4ff22cd8b9c6c23681fe6aa89a12aa3637c86dd16e44c05d7c373488" ++dependencies = [ ++ "gcc", ++ "libc", ++ "pkg-config", ++] ++ ++[[package]] ++name = "serde" ++version = "1.0.115" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" ++ ++[[package]] ++name = "slab" ++version = "0.4.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" ++ ++[[package]] ++name = "state" ++version = "0.4.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" ++dependencies = [ ++ "thread_local 0.3.3", ++] ++ ++[[package]] ++name = "strsim" ++version = "0.8.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" ++ ++[[package]] ++name = "syn" ++version = "1.0.40" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "unicode-xid", ++] ++ ++[[package]] ++name = "termcolor" ++version = "1.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" ++dependencies = [ ++ "winapi-util", ++] ++ ++[[package]] ++name = "textwrap" ++version = "0.11.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" ++dependencies = [ ++ "unicode-width", ++] ++ ++[[package]] ++name = "thread-id" ++version = "3.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" ++dependencies = [ ++ "libc", ++ "redox_syscall", ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "thread_local" ++version = "0.3.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7" ++dependencies = [ ++ "thread-id", ++ "unreachable", ++] ++ ++[[package]] ++name = "thread_local" ++version = "1.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" ++dependencies = [ ++ "lazy_static 1.4.0", ++] ++ ++[[package]] ++name = "tinyset" ++version = "0.4.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "784f540960a63144d63992caf430ed87e39d920f2c474cb8ac586ff31fb861fc" ++dependencies = [ ++ "itertools", ++ "rand", ++] ++ ++[[package]] ++name = "unicode-width" ++version = "0.1.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" ++ ++[[package]] ++name = "unicode-xid" ++version = "0.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" ++ ++[[package]] ++name = "unreachable" ++version = "0.1.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" ++dependencies = [ ++ "void", ++] ++ ++[[package]] ++name = "vec_map" ++version = "0.8.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" ++ ++[[package]] ++name = "void" ++version = "1.0.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" ++ ++[[package]] ++name = "walkdir" ++version = "2.3.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" ++dependencies = [ ++ "same-file", ++ "winapi 0.3.9", ++ "winapi-util", ++] ++ ++[[package]] ++name = "wasi" ++version = "0.9.0+wasi-snapshot-preview1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" ++ ++[[package]] ++name = "winapi" ++version = "0.2.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" ++ ++[[package]] ++name = "winapi" ++version = "0.3.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" ++dependencies = [ ++ "winapi-i686-pc-windows-gnu", ++ "winapi-x86_64-pc-windows-gnu", ++] ++ ++[[package]] ++name = "winapi-build" ++version = "0.1.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" ++ ++[[package]] ++name = "winapi-i686-pc-windows-gnu" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" ++ ++[[package]] ++name = "winapi-util" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" ++dependencies = [ ++ "winapi 0.3.9", ++] ++ ++[[package]] ++name = "winapi-x86_64-pc-windows-gnu" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" ++ ++[[package]] ++name = "ws2_32-sys" ++version = "0.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" ++dependencies = [ ++ "winapi 0.2.8", ++ "winapi-build", ++] diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/fac/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/fac/default.nix new file mode 100644 index 000000000000..8c41eb3ac51a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/fac/default.nix @@ -0,0 +1,50 @@ +{ stdenv, git, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "fac-build"; + version = "0.5.3"; + + src = fetchFromGitHub { + owner = "droundy"; + repo = "fac"; + rev = version; + sha256 = "1gifrlb31jy8633rnhny58ccp3wlmd338129c6sh0h1a38vkmsxk"; + }; + + # workaround for missing Cargo.lock file + cargoPatches = [ ./cargo-lock.patch ]; + + cargoSha256 = "0hjfq61y1ikdcajr2k514k7fad2zxbwq7yb5nk1wx38f1524709q"; + + # fac includes a unit test called ls_files_works which assumes it's + # running in a git repo. Nix's sandbox runs cargo build outside git, + # so this test won't work. + checkFlagsArray = [ "--skip=ls_files_works" ]; + + # fac calls git at runtime, expecting it to be in the PATH, + # so we need to patch it to call git by absolute path instead. + postPatch = '' + substituteInPlace src/git.rs \ + --replace 'std::process::Command::new("git")' \ + 'std::process::Command::new("${git}/bin/git")' + ''; + + meta = with stdenv.lib; { + description = '' + A build system that uses ptrace to handle dependencies automatically + ''; + longDescription = '' + Fac is a general-purpose build system inspired by make that utilizes + ptrace to ensure that all dependences are enumerated and that all + source files are added to a (git) repo. An important feature of fac + is that it automatically handles dependencies, rather than either + complaining about them or giving an incorrect build. Currently, fac + only runs on linux systems, but on those systems it is incredibly + easy to use! + ''; + homepage = "https://physics.oregonstate.edu/~roundyd/fac"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.dpercy ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gn/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gn/default.nix new file mode 100644 index 000000000000..599e10af1a9a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gn/default.nix @@ -0,0 +1,64 @@ +{ stdenv, lib, fetchgit, darwin, writeText +, ninja, python3 +}: + +let + # Note: Please use the recommended version for Chromium, e.g.: + # https://git.archlinux.org/svntogit/packages.git/tree/trunk/chromium-gn-version.sh?h=packages/gn + rev = "fd3d768bcfd44a8d9639fe278581bd9851d0ce3a"; + revNum = "1718"; # git describe HEAD --match initial-commit | cut -d- -f3 + version = "2020-03-09"; + sha256 = "1asc14y8by7qcn10vbk467hvx93s30pif8r0brissl0sihsaqazr"; + + revShort = builtins.substring 0 7 rev; + lastCommitPosition = writeText "last_commit_position.h" '' + #ifndef OUT_LAST_COMMIT_POSITION_H_ + #define OUT_LAST_COMMIT_POSITION_H_ + + #define LAST_COMMIT_POSITION_NUM ${revNum} + #define LAST_COMMIT_POSITION "${revNum} (${revShort})" + + #endif // OUT_LAST_COMMIT_POSITION_H_ + ''; + +in stdenv.mkDerivation { + pname = "gn-unstable"; + inherit version; + + src = fetchgit { + # Note: The TAR-Archives (+archive/${rev}.tar.gz) are not deterministic! + url = "https://gn.googlesource.com/gn"; + inherit rev sha256; + }; + + nativeBuildInputs = [ ninja python3 ]; + buildInputs = lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [ + libobjc + cctools + + # frameworks + ApplicationServices + Foundation + AppKit + ]); + + buildPhase = '' + python build/gen.py --no-last-commit-position + ln -s ${lastCommitPosition} out/last_commit_position.h + ninja -j $NIX_BUILD_CORES -C out gn + ''; + + installPhase = '' + install -vD out/gn "$out/bin/gn" + ''; + + setupHook = ./setup-hook.sh; + + meta = with lib; { + description = "A meta-build system that generates build files for Ninja"; + homepage = "https://gn.googlesource.com/gn"; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ stesie matthewbauer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gn/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gn/setup-hook.sh new file mode 100644 index 000000000000..850f18948cad --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gn/setup-hook.sh @@ -0,0 +1,14 @@ +gnConfigurePhase() { + runHook preConfigure + + echo "gn flags: $gnFlags ${gnFlagsArray[@]}" + + gn gen out/Release --args="$gnFlags ${gnFlagsArray[@]}" + cd out/Release/ + + runHook postConfigure +} + +if [ -z "${dontUseGnConfigure-}" -a -z "${configurePhase-}" ]; then + configurePhase=gnConfigurePhase +fi diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/default.nix new file mode 100644 index 000000000000..a83281c4e961 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/default.nix @@ -0,0 +1,63 @@ +{ stdenv, fetchurl, guileSupport ? false, pkgconfig ? null , guile ? null }: + +assert guileSupport -> ( pkgconfig != null && guile != null ); + +let + version = "4.2.1"; +in +stdenv.mkDerivation { + pname = "gnumake"; + inherit version; + + src = fetchurl { + url = "mirror://gnu/make/make-${version}.tar.bz2"; + sha256 = "12f5zzyq2w56g95nni65hc0g5p7154033y2f3qmjvd016szn5qnn"; + }; + + patchFlags = [ "-p0" ]; + patches = [ + # Purity: don't look for library dependencies (of the form `-lfoo') in /lib + # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for + # included Makefiles, don't look in /usr/include and friends. + ./impure-dirs.patch + ./pselect.patch + # Fix support for glibc 2.27's glob, inspired by http://www.linuxfromscratch.org/lfs/view/8.2/chapter05/make.html + ./glibc-2.27-glob.patch + ]; + + nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ]; + buildInputs = stdenv.lib.optionals guileSupport [ guile ]; + + configureFlags = stdenv.lib.optional guileSupport "--with-guile" + + # Make uses this test to decide whether it should keep track of + # subseconds. Apple made this possible with APFS and macOS 10.13. + # However, we still support macOS 10.11 and 10.12. Binaries built + # in Nixpkgs will be unable to use futimens to set mtime less than + # a second. So, tell Make to ignore nanoseconds in mtime here by + # overriding the autoconf test for the struct. + # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion. + ++ stdenv.lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no"; + + outputs = [ "out" "man" "info" ]; + + meta = with stdenv.lib; { + homepage = "https://www.gnu.org/software/make/"; + description = "A tool to control the generation of non-source files from sources"; + license = licenses.gpl3Plus; + + longDescription = '' + Make is a tool which controls the generation of executables and + other non-source files of a program from the program's source files. + + Make gets its knowledge of how to build your program from a file + called the makefile, which lists each of the non-source files and + how to compute it from other files. When you write a program, you + should write a makefile for it, so that it is possible to use Make + to build and install the program. + ''; + + platforms = platforms.all; + maintainers = [ maintainers.vrthra ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27-glob.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27-glob.patch new file mode 100644 index 000000000000..186212d0d298 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.27-glob.patch @@ -0,0 +1,32 @@ +diff -Naur glob/glob.c glob/glob.c +--- glob/glob.c 2013-10-20 13:14:38.000000000 -0400 ++++ glob/glob.c 2018-03-16 14:32:38.483496170 -0400 +@@ -208,28 +208,9 @@ + #endif /* __GNU_LIBRARY__ || __DJGPP__ */ + + +-#if !defined __alloca && !defined __GNU_LIBRARY__ +- +-# ifdef __GNUC__ +-# undef alloca +-# define alloca(n) __builtin_alloca (n) +-# else /* Not GCC. */ +-# ifdef HAVE_ALLOCA_H + # include <alloca.h> +-# else /* Not HAVE_ALLOCA_H. */ +-# ifndef _AIX +-# ifdef WINDOWS32 +-# include <malloc.h> +-# else +-extern char *alloca (); +-# endif /* WINDOWS32 */ +-# endif /* Not _AIX. */ +-# endif /* sparc or HAVE_ALLOCA_H. */ +-# endif /* GCC. */ +- + # define __alloca alloca + +-#endif + + #ifndef __GNU_LIBRARY__ + # define __stat stat diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/impure-dirs.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/impure-dirs.patch new file mode 100644 index 000000000000..f6646f1d0126 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/impure-dirs.patch @@ -0,0 +1,34 @@ +diff -rc read.c read.c +*** read.c 2006-03-17 15:24:20.000000000 +0100 +--- read.c 2007-05-24 17:16:31.000000000 +0200 +*************** +*** 99,107 **** +--- 99,109 ---- + #endif + INCLUDEDIR, + #ifndef _AMIGA ++ #if 0 + "/usr/gnu/include", + "/usr/local/include", + "/usr/include", ++ #endif + #endif + 0 + }; +diff -rc reremake.c +*** remake.c 2006-03-20 03:36:37.000000000 +0100 +--- remake.c 2007-05-24 17:06:54.000000000 +0200 +*************** +*** 1452,1460 **** +--- 1452,1462 ---- + static char *dirs[] = + { + #ifndef _AMIGA ++ #if 0 + "/lib", + "/usr/lib", + #endif ++ #endif + #if defined(WINDOWS32) && !defined(LIBDIR) + /* + * This is completely up to the user at product install time. Just define diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/pselect.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/pselect.patch new file mode 100644 index 000000000000..5a03acb2f7ca --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/4.2/pselect.patch @@ -0,0 +1,170 @@ +From b552b05251980f693c729e251f93f5225b400714 Mon Sep 17 00:00:00 2001 +From: Paul Smith <psmith@gnu.org> +Date: Sat, 3 Jun 2017 16:20:51 -0400 +Subject: [SV 51159] Use a non-blocking read with pselect to avoid hangs. + +* posixos.c (set_blocking): Set blocking on a file descriptor. +(jobserver_setup): Set non-blocking on the jobserver read side. +(jobserver_parse_auth): Ditto. +(jobserver_acquire_all): Set blocking to avoid a busy-wait loop. +(jobserver_acquire): If the non-blocking read() returns without +taking a token then try again. +--- + posixos.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 71 insertions(+), 26 deletions(-) + +diff --git posixos.c posixos.c +index e642d7f..dbafa51 100644 +--- posixos.c ++++ posixos.c +@@ -62,6 +62,24 @@ make_job_rfd (void) + #endif + } + ++static void ++set_blocking (int fd, int blocking) ++{ ++ // If we're not using pselect() don't change the blocking ++#ifdef HAVE_PSELECT ++ int flags; ++ EINTRLOOP (flags, fcntl (fd, F_GETFL)); ++ if (flags >= 0) ++ { ++ int r; ++ flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK); ++ EINTRLOOP (r, fcntl (fd, F_SETFL, flags)); ++ if (r < 0) ++ pfatal_with_name ("fcntl(O_NONBLOCK)"); ++ } ++#endif ++} ++ + unsigned int + jobserver_setup (int slots) + { +@@ -86,6 +104,9 @@ jobserver_setup (int slots) + pfatal_with_name (_("init jobserver pipe")); + } + ++ /* When using pselect() we want the read to be non-blocking. */ ++ set_blocking (job_fds[0], 0); ++ + return 1; + } + +@@ -121,6 +142,9 @@ jobserver_parse_auth (const char *auth) + return 0; + } + ++ /* When using pselect() we want the read to be non-blocking. */ ++ set_blocking (job_fds[0], 0); ++ + return 1; + } + +@@ -169,7 +193,10 @@ jobserver_acquire_all (void) + { + unsigned int tokens = 0; + +- /* Close the write side, so the read() won't hang. */ ++ /* Use blocking reads to wait for all outstanding jobs. */ ++ set_blocking (job_fds[0], 1); ++ ++ /* Close the write side, so the read() won't hang forever. */ + close (job_fds[1]); + job_fds[1] = -1; + +@@ -236,18 +263,12 @@ jobserver_pre_acquire (void) + unsigned int + jobserver_acquire (int timeout) + { +- sigset_t empty; +- fd_set readfds; + struct timespec spec; + struct timespec *specp = NULL; +- int r; +- char intake; ++ sigset_t empty; + + sigemptyset (&empty); + +- FD_ZERO (&readfds); +- FD_SET (job_fds[0], &readfds); +- + if (timeout) + { + /* Alarm after one second (is this too granular?) */ +@@ -256,28 +277,52 @@ jobserver_acquire (int timeout) + specp = &spec; + } + +- r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); +- +- if (r == -1) ++ while (1) + { +- /* Better be SIGCHLD. */ +- if (errno != EINTR) +- pfatal_with_name (_("pselect jobs pipe")); +- return 0; +- } ++ fd_set readfds; ++ int r; ++ char intake; + +- if (r == 0) +- /* Timeout. */ +- return 0; ++ FD_ZERO (&readfds); ++ FD_SET (job_fds[0], &readfds); + +- /* The read FD is ready: read it! */ +- EINTRLOOP (r, read (job_fds[0], &intake, 1)); +- if (r < 0) +- pfatal_with_name (_("read jobs pipe")); ++ r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); ++ if (r < 0) ++ switch (errno) ++ { ++ case EINTR: ++ /* SIGCHLD will show up as an EINTR. */ ++ return 0; ++ ++ case EBADF: ++ /* Someone closed the jobs pipe. ++ That shouldn't happen but if it does we're done. */ ++ O (fatal, NILF, _("job server shut down")); + +- /* What does it mean if read() returns 0? It shouldn't happen because only +- the master make can reap all the tokens and close the write side...?? */ +- return r > 0; ++ default: ++ pfatal_with_name (_("pselect jobs pipe")); ++ } ++ ++ if (r == 0) ++ /* Timeout. */ ++ return 0; ++ ++ /* The read FD is ready: read it! This is non-blocking. */ ++ EINTRLOOP (r, read (job_fds[0], &intake, 1)); ++ ++ if (r < 0) ++ { ++ /* Someone sniped our token! Try again. */ ++ if (errno == EAGAIN) ++ continue; ++ ++ pfatal_with_name (_("read jobs pipe")); ++ } ++ ++ /* read() should never return 0: only the master make can reap all the ++ tokens and close the write side...?? */ ++ return r > 0; ++ } + } + + #else +-- +cgit v1.0-41-gc330 + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix new file mode 100644 index 000000000000..f01f38ecd233 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/default.nix @@ -0,0 +1,59 @@ +{ stdenv, fetchurl, guileSupport ? false, pkgconfig ? null , guile ? null }: + +assert guileSupport -> ( pkgconfig != null && guile != null ); + +let + version = "4.3"; +in +stdenv.mkDerivation { + pname = "gnumake"; + inherit version; + + src = fetchurl { + url = "mirror://gnu/make/make-${version}.tar.gz"; + sha256 = "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0"; + }; + + patches = [ + # Purity: don't look for library dependencies (of the form `-lfoo') in /lib + # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for + # included Makefiles, don't look in /usr/include and friends. + ./impure-dirs.patch + ]; + + nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ]; + buildInputs = stdenv.lib.optionals guileSupport [ guile ]; + + configureFlags = stdenv.lib.optional guileSupport "--with-guile" + + # Make uses this test to decide whether it should keep track of + # subseconds. Apple made this possible with APFS and macOS 10.13. + # However, we still support macOS 10.11 and 10.12. Binaries built + # in Nixpkgs will be unable to use futimens to set mtime less than + # a second. So, tell Make to ignore nanoseconds in mtime here by + # overriding the autoconf test for the struct. + # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion. + ++ stdenv.lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no"; + + outputs = [ "out" "man" "info" ]; + + meta = with stdenv.lib; { + homepage = "https://www.gnu.org/software/make/"; + description = "A tool to control the generation of non-source files from sources"; + license = licenses.gpl3Plus; + + longDescription = '' + Make is a tool which controls the generation of executables and + other non-source files of a program from the program's source files. + + Make gets its knowledge of how to build your program from a file + called the makefile, which lists each of the non-source files and + how to compute it from other files. When you write a program, you + should write a makefile for it, so that it is possible to use Make + to build and install the program. + ''; + + platforms = platforms.all; + maintainers = [ maintainers.vrthra ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch new file mode 100644 index 000000000000..6c7d9d2463c3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch @@ -0,0 +1,25 @@ +diff -Naur a/src/read.c b/src/read.c +--- a/src/read.c ++++ b/src/read.c +@@ -109,9 +109,6 @@ + #endif + INCLUDEDIR, + #ifndef _AMIGA +- "/usr/gnu/include", +- "/usr/local/include", +- "/usr/include", + #endif + 0 + }; +diff -Naur a/src/remake.c b/src/remake.c +--- a/src/remake.c ++++ b/src/remake.c +@@ -1601,8 +1601,6 @@ + static const char *dirs[] = + { + #ifndef _AMIGA +- "/lib", +- "/usr/lib", + #endif + #if defined(WINDOWS32) && !defined(LIBDIR) + /* diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gradle/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gradle/default.nix new file mode 100644 index 000000000000..73e9bc7b5601 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gradle/default.nix @@ -0,0 +1,85 @@ +{ stdenv, fetchurl, unzip, jdk, java ? jdk, makeWrapper }: + +rec { + gradleGen = {name, src, nativeVersion} : stdenv.mkDerivation { + inherit name src nativeVersion; + + dontBuild = true; + + installPhase = '' + mkdir -pv $out/lib/gradle/ + cp -rv lib/ $out/lib/gradle/ + + gradle_launcher_jar=$(echo $out/lib/gradle/lib/gradle-launcher-*.jar) + test -f $gradle_launcher_jar + makeWrapper ${java}/bin/java $out/bin/gradle \ + --set JAVA_HOME ${java} \ + --add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain" + ''; + + fixupPhase = if (!stdenv.isLinux) then ":" else + let arch = if stdenv.is64bit then "amd64" else "i386"; in '' + mkdir patching + pushd patching + jar xf $out/lib/gradle/lib/native-platform-linux-${arch}-${nativeVersion}.jar + patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64" net/rubygrapefruit/platform/linux-${arch}/libnative-platform.so + jar cf native-platform-linux-${arch}-${nativeVersion}.jar . + mv native-platform-linux-${arch}-${nativeVersion}.jar $out/lib/gradle/lib/ + popd + + # The scanner doesn't pick up the runtime dependency in the jar. + # Manually add a reference where it will be found. + mkdir $out/nix-support + echo ${stdenv.cc.cc} > $out/nix-support/manual-runtime-dependencies + ''; + + buildInputs = [ unzip java makeWrapper ]; + + meta = { + description = "Enterprise-grade build system"; + longDescription = '' + Gradle is a build system which offers you ease, power and freedom. + You can choose the balance for yourself. It has powerful multi-project + build support. It has a layer on top of Ivy that provides a + build-by-convention integration for Ivy. It gives you always the choice + between the flexibility of Ant and the convenience of a + build-by-convention behavior. + ''; + homepage = "http://www.gradle.org/"; + license = stdenv.lib.licenses.asl20; + platforms = stdenv.lib.platforms.unix; + }; + }; + + gradle_latest = gradle_6_6; + + gradle_6_6 = gradleGen rec { + name = "gradle-6.6"; + nativeVersion = "0.22-milestone-4"; + + src = fetchurl { + url = "https://services.gradle.org/distributions/${name}-bin.zip"; + sha256 = "09a0fnz6fn8yaxm3q3iwyjm3nnaz7k8i1xlpc7sm414py043by76"; + }; + }; + + gradle_5_6 = gradleGen rec { + name = "gradle-5.6.4"; + nativeVersion = "0.18"; + + src = fetchurl { + url = "https://services.gradle.org/distributions/${name}-bin.zip"; + sha256 = "1f3067073041bc44554d0efe5d402a33bc3d3c93cc39ab684f308586d732a80d"; + }; + }; + + gradle_4_10 = gradleGen rec { + name = "gradle-4.10.3"; + nativeVersion = "0.14"; + + src = fetchurl { + url = "https://services.gradle.org/distributions/${name}-bin.zip"; + sha256 = "0vhqxnk0yj3q9jam5w4kpia70i4h0q4pjxxqwynh3qml0vrcn9l6"; + }; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gup/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gup/default.nix new file mode 100644 index 000000000000..30c4d4ec4de0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/gup/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, nix-update-source, lib, python +, which, runtimeShell, pychecker ? null }: +stdenv.mkDerivation rec { + version = "0.7.0"; + src = fetchFromGitHub { + owner = "timbertson"; + repo = "gup"; + rev = "version-0.7.0"; + sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv"; + }; + pname = "gup"; + buildInputs = lib.remove null [ python which pychecker ]; + SKIP_PYCHECKER = pychecker == null; + buildPhase = "make python"; + installPhase = '' + mkdir $out + cp -r python/bin $out/bin + ''; + passthru.updateScript = '' + #!${runtimeShell} + set -e + echo + cd ${toString ./.} + ${nix-update-source}/bin/nix-update-source \ + --prompt version \ + --replace-attr version \ + --set owner timbertson \ + --set repo gup \ + --set type fetchFromGitHub \ + --set rev 'version-{version}' \ + --modify-nix default.nix + ''; + meta = { + inherit (src.meta) homepage; + description = "A better make, inspired by djb's redo"; + license = stdenv.lib.licenses.lgpl2Plus; + maintainers = [ stdenv.lib.maintainers.timbertson ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/icmake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/icmake/default.nix new file mode 100644 index 000000000000..89e2b8d0cc6e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/icmake/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchFromGitLab, makeWrapper, gcc, ncurses }: + +stdenv.mkDerivation rec { + pname = "icmake"; + version = "9.03.01"; + + src = fetchFromGitLab { + sha256 = "05r0a69w0hv2qhjpb2bxd0lmp2vv5r2d4iggg6ly4miam0i318jy"; + rev = version; + repo = "icmake"; + owner = "fbb-git"; + }; + + + setSourceRoot = '' + sourceRoot=$(echo */icmake) + ''; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ gcc ]; + + preConfigure = '' + patchShebangs ./ + substituteInPlace INSTALL.im --replace "usr/" "" + ''; + + buildPhase = '' + ./icm_prepare $out + ./icm_bootstrap x + ''; + + installPhase = '' + ./icm_install all / + + wrapProgram $out/bin/icmbuild \ + --prefix PATH : ${ncurses}/bin + ''; + + meta = with stdenv.lib; { + description = "A program maintenance (make) utility using a C-like grammar"; + homepage = "https://fbb-git.gitlab.io/icmake/"; + license = licenses.gpl3; + maintainers = with maintainers; [ pSub ]; + platforms = platforms.linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/jam/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/jam/default.nix new file mode 100644 index 000000000000..7d7502fad4b7 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/jam/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, yacc }: + +stdenv.mkDerivation rec { + name = "jam-2.6.1"; + + src = fetchurl { + url = "https://swarm.workshop.perforce.com/projects/perforce_software-jam/download/main/${name}.tar"; + sha256 = "19xkvkpycxfsncxvin6yqrql3x3z9ypc1j8kzls5k659q4kv5rmc"; + }; + + nativeBuildInputs = [ yacc ]; + + preConfigure = '' + unset AR + ''; + + buildPhase = '' + make jam0 + ./jam0 -j$NIX_BUILD_CORES -sBINDIR=$out/bin install + ''; + + installPhase = '' + mkdir -p $out/doc/jam + cp *.html $out/doc/jam + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = "https://www.perforce.com/resources/documentation/jam"; + license = licenses.free; + description = "Just Another Make"; + maintainers = with maintainers; [ orivej ]; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/kati/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/kati/default.nix new file mode 100644 index 000000000000..a7fced4482be --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/kati/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation { + pname = "kati-unstable"; + version = "2019-09-23"; + + src = fetchFromGitHub { + owner = "google"; + repo = "kati"; + rev = "9da3296746a0cd55b38ebebf91e7f57105a4c36f"; + sha256 = "0s5dfhgpcbx12b1fqmm8p0jpvrhgrnl9qywv1ksbwhw3pfp7j866"; + }; + + patches = [ ./version.patch ]; + + installPhase = '' + install -D ckati $out/bin/ckati + ''; + + meta = with stdenv.lib; { + description = "An experimental GNU make clone"; + homepage = "https://github.com/google/kati"; + platforms = platforms.all; + license = licenses.asl20; + maintainers = with maintainers; [ danielfullmer ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/kati/version.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/kati/version.patch new file mode 100644 index 000000000000..1821ac6bbb73 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/kati/version.patch @@ -0,0 +1,19 @@ +diff --git a/Makefile.ckati b/Makefile.ckati +index e4067bb..15518f3 100644 +--- a/Makefile.ckati ++++ b/Makefile.ckati +@@ -102,14 +102,8 @@ $(KATI_CXX_TEST_EXES): $(KATI_BIN_PATH)/%: $(KATI_INTERMEDIATES_PATH)/%.o + $(KATI_LD) $^ -o $@ $(KATI_LIBS) + + # Rule to generate version.cc +-KATI_GIT_DIR := $(shell git -C $(KATI_SRC_PATH) rev-parse --show-toplevel) +-ifneq ($(KATI_GIT_DIR),) +-KATI_VERSION_DEPS := $(KATI_GIT_DIR)/.git/HEAD $(KATI_GIT_DIR)/.git/index +-KATI_VERSION := $(shell git -C $(KATI_GIT_DIR) rev-parse HEAD) +-else + KATI_VERSION_DEPS := + KATI_VERSION := unknown +-endif + $(KATI_INTERMEDIATES_PATH)/version.cc: $(KATI_VERSION_DEPS) + @mkdir -p $(dir $@) + echo '// +build ignore' > $@ diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/leiningen/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/leiningen/default.nix new file mode 100644 index 000000000000..713f499ce2b2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/leiningen/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchurl, makeWrapper +, coreutils, jdk, rlwrap, gnupg }: + +stdenv.mkDerivation rec { + pname = "leiningen"; + version = "2.9.1"; + + src = fetchurl { + url = "https://raw.github.com/technomancy/leiningen/${version}/bin/lein-pkg"; + sha256 = "1h0gpzpr7xk6hvmrrq41bcp2k9aai348baf8ad9bxvci01n4zb12"; + }; + + jarsrc = fetchurl { + # NOTE: This is actually a .jar, Github has issues + url = "https://github.com/technomancy/leiningen/releases/download/${version}/${pname}-${version}-standalone.zip"; + sha256 = "1y2mva5s2w2szzn1b9rhz0dvkffls4ravii677ybcf2w9wd86z7a"; + }; + + JARNAME = "${pname}-${version}-standalone.jar"; + + dontUnpack = true; + + buildInputs = [ makeWrapper ]; + propagatedBuildInputs = [ jdk ]; + + # the jar is not in share/java, because it's a standalone jar and should + # never be picked up by set-java-classpath.sh + + installPhase = '' + mkdir -p $out/bin $out/share + cp -v $src $out/bin/lein + cp -v $jarsrc $out/share/$JARNAME + ''; + + fixupPhase = '' + chmod +x $out/bin/lein + patchShebangs $out/bin/lein + substituteInPlace $out/bin/lein \ + --replace 'LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar' "LEIN_JAR=$out/share/$JARNAME" + wrapProgram $out/bin/lein \ + --prefix PATH ":" "${stdenv.lib.makeBinPath [ rlwrap coreutils ]}" \ + --set LEIN_GPG ${gnupg}/bin/gpg \ + --set JAVA_CMD ${jdk}/bin/java + ''; + + meta = { + homepage = "https://leiningen.org/"; + description = "Project automation for Clojure"; + license = stdenv.lib.licenses.epl10; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mage/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mage/default.nix new file mode 100644 index 000000000000..6c9d8bfc8385 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mage/default.nix @@ -0,0 +1,31 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "mage"; + version = "1.10.0"; + + src = fetchFromGitHub { + owner = "magefile"; + repo = pname; + rev = "v${version}"; + sha256 = "0c77xgz2bz4j9sh9v7f49iqyamc4lvvldcmn6v50hk98s9193gbf"; + }; + + vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; + + doCheck = false; + + buildFlagsArray = [ + "-ldflags=" + "-X github.com/magefile/mage/mage.commitHash=v${version}" + "-X github.com/magefile/mage/mage.gitTag=v${version}" + "-X github.com/magefile/mage/mage.timestamp=1970-01-01T00:00:00Z" + ]; + + meta = with lib; { + description = "A Make/Rake-like Build Tool Using Go"; + homepage = "https://magefile.org/"; + license = licenses.asl20; + maintainers = with maintainers; [ swdunlop ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch new file mode 100644 index 000000000000..e5ac95d0b9dc --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch @@ -0,0 +1,19 @@ +--- a/mesonbuild/coredata.py ++++ b/mesonbuild/coredata.py +@@ -491,7 +491,6 @@ class CoreData: + return value + if option.endswith('dir') and value.is_absolute() and \ + option not in builtin_dir_noprefix_options: +- # Value must be a subdir of the prefix + # commonpath will always return a path in the native format, so we + # must use pathlib.PurePath to do the same conversion before + # comparing. +@@ -503,7 +502,7 @@ class CoreData: + try: + value = value.relative_to(prefix) + except ValueError: +- raise MesonException(msg.format(option, value, prefix)) ++ pass + if '..' in str(value): + raise MesonException(msg.format(option, value, prefix)) + return value.as_posix() diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch new file mode 100644 index 000000000000..f1e3c76e8b53 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch @@ -0,0 +1,20 @@ +diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py +index 4176b9a03..faaabf616 100644 +--- a/mesonbuild/scripts/depfixer.py ++++ b/mesonbuild/scripts/depfixer.py +@@ -336,6 +336,15 @@ class Elf(DataSizes): + if not new_rpath: + self.remove_rpath_entry(entrynum) + else: ++ # Clear old rpath to avoid stale references, ++ # not heeding the warning above about de-duplication ++ # since it does not seem to cause issues for us ++ # and not doing so trips up Nix’s reference checker. ++ # See https://github.com/NixOS/nixpkgs/pull/46020 ++ # and https://github.com/NixOS/nixpkgs/issues/95163 ++ self.bf.seek(rp_off) ++ self.bf.write(b'\0'*len(old_rpath)) ++ + self.bf.seek(rp_off) + self.bf.write(new_rpath) + self.bf.write(b'\0') diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/default.nix new file mode 100644 index 000000000000..8421fb7d70a0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/default.nix @@ -0,0 +1,87 @@ +{ lib +, python3 +, stdenv +, writeTextDir +, substituteAll +, pkgsHostHost +, fetchpatch +}: + +python3.pkgs.buildPythonApplication rec { + pname = "meson"; + version = "0.55.3"; + + src = python3.pkgs.fetchPypi { + inherit pname version; + sha256 = "19cjy24mfaswxyvqmns6rd7hx05ybqb663zlgklspfr8l4jjmvbb"; + }; + + patches = [ + # Upstream insists on not allowing bindir and other dir options + # outside of prefix for some reason: + # https://github.com/mesonbuild/meson/issues/2561 + # We remove the check so multiple outputs can work sanely. + ./allow-dirs-outside-of-prefix.patch + + # Meson is currently inspecting fewer variables than autoconf does, which + # makes it harder for us to use setup hooks, etc. Taken from + # https://github.com/mesonbuild/meson/pull/6827 + ./more-env-vars.patch + + # Unlike libtool, vanilla Meson does not pass any information + # about the path library will be installed to to g-ir-scanner, + # breaking the GIR when path other than ${!outputLib}/lib is used. + # We patch Meson to add a --fallback-library-path argument with + # library install_dir to g-ir-scanner. + ./gir-fallback-path.patch + + # In common distributions, RPATH is only needed for internal libraries so + # meson removes everything else. With Nix, the locations of libraries + # are not as predictable, therefore we need to keep them in the RPATH. + # At the moment we are keeping the paths starting with /nix/store. + # https://github.com/NixOS/nixpkgs/issues/31222#issuecomment-365811634 + (substituteAll { + src = ./fix-rpath.patch; + inherit (builtins) storeDir; + }) + + # When Meson removes build_rpath from DT_RUNPATH entry, it just writes + # the shorter NUL-terminated new rpath over the old one to reduce + # the risk of potentially breaking the ELF files. + # But this can cause much bigger problem for Nix as it can produce + # cut-in-half-by-\0 store path references. + # Let’s just clear the whole rpath and hope for the best. + ./clear-old-rpath.patch + ]; + + setupHook = ./setup-hook.sh; + + # Ensure there will always be a native C compiler when meson is used, as a + # workaround until https://github.com/mesonbuild/meson/pull/6512 lands. + depsHostHostPropagated = [ pkgsHostHost.stdenv.cc ]; + + # 0.45 update enabled tests but they are failing + doCheck = false; + # checkInputs = [ ninja pkgconfig ]; + # checkPhase = "python ./run_project_tests.py"; + + postFixup = '' + pushd $out/bin + # undo shell wrapper as meson tools are called with python + for i in *; do + mv ".$i-wrapped" "$i" + done + popd + + # Do not propagate Python + rm $out/nix-support/propagated-build-inputs + ''; + + meta = with lib; { + homepage = "https://mesonbuild.com"; + description = "SCons-like build system that use python as a front-end language and Ninja as a building backend"; + license = licenses.asl20; + maintainers = with maintainers; [ jtojnar mbe ]; + platforms = platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/fix-rpath.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/fix-rpath.patch new file mode 100644 index 000000000000..d34b6c4c4345 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/fix-rpath.patch @@ -0,0 +1,24 @@ +--- a/mesonbuild/backend/backends.py ++++ b/mesonbuild/backend/backends.py +@@ -456,6 +456,21 @@ class Backend: + args.extend(self.environment.coredata.get_external_link_args(target.for_machine, lang)) + except Exception: + pass ++ ++ nix_ldflags = os.environ.get('NIX_LDFLAGS', '').split() ++ next_is_path = False ++ # Try to add rpaths set by user or ld-wrapper so that they are not removed. ++ # Based on https://github.com/NixOS/nixpkgs/blob/69711a2f5ffe8cda208163be5258266172ff527f/pkgs/build-support/bintools-wrapper/ld-wrapper.sh#L148-L177 ++ for flag in nix_ldflags: ++ if flag == '-rpath' or flag == '-L': ++ next_is_path = True ++ elif next_is_path or flag.startswith('-L/'): ++ if flag.startswith('-L/'): ++ flag = flag[2:] ++ if flag.startswith('@storeDir@'): ++ dirs.add(flag) ++ next_is_path = False ++ + # Match rpath formats: + # -Wl,-rpath= + # -Wl,-rpath, diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch new file mode 100644 index 000000000000..0c924bacf73f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch @@ -0,0 +1,16 @@ +--- a/mesonbuild/modules/gnome.py ++++ b/mesonbuild/modules/gnome.py +@@ -807,6 +807,13 @@ class GnomeModule(ExtensionModule): + if fatal_warnings: + scan_command.append('--warn-error') + ++ if len(set([girtarget.get_custom_install_dir()[0] for girtarget in girtargets])) > 1: ++ raise MesonException('generate_gir tries to build multiple libraries with different install_dir at once: {}'.format(','.join([str(girtarget) for girtarget in girtargets]))) ++ ++ fallback_libpath = girtargets[0].get_custom_install_dir()[0] ++ if fallback_libpath is not None and isinstance(fallback_libpath, str) and len(fallback_libpath) > 0 and fallback_libpath[0] == "/": ++ scan_command += ['--fallback-library-path=' + fallback_libpath] ++ + scan_target = self._make_gir_target(state, girfile, scan_command, depends, kwargs) + + typelib_output = '%s-%s.typelib' % (ns, nsversion) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/more-env-vars.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/more-env-vars.patch new file mode 100644 index 000000000000..ada58fff6d41 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/more-env-vars.patch @@ -0,0 +1,13 @@ +diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py +index 219b62ec8..e3ceaddbd 100644 +--- a/mesonbuild/envconfig.py ++++ b/mesonbuild/envconfig.py +@@ -94,7 +94,7 @@ def get_env_var_pair(for_machine: MachineChoice, + # compiling we fall back on the unprefixed host version. This + # allows native builds to never need to worry about the 'BUILD_*' + # ones. +- ([var_name + '_FOR_BUILD'] if is_cross else [var_name]), ++ [var_name + '_FOR_BUILD'] + ([] if is_cross else [var_name]), + # Always just the unprefixed host verions + [var_name] + )[for_machine] diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/setup-hook.sh new file mode 100644 index 000000000000..3d946fcffd52 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -0,0 +1,37 @@ +mesonConfigurePhase() { + runHook preConfigure + + if [ -z "${dontAddPrefix-}" ]; then + mesonFlags="--prefix=$prefix $mesonFlags" + fi + + # See multiple-outputs.sh and meson’s coredata.py + mesonFlags="\ + --libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \ + --bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \ + --includedir=${!outputInclude}/include \ + --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \ + --localedir=${!outputLib}/share/locale \ + -Dauto_features=${mesonAutoFeatures:-enabled} \ + -Dwrap_mode=${mesonWrapMode:-nodownload} \ + $mesonFlags" + + mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-plain} $mesonFlags" + + echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}" + + meson build $mesonFlags "${mesonFlagsArray[@]}" + cd build + + if ! [[ -v enableParallelBuilding ]]; then + enableParallelBuilding=1 + echo "meson: enabled parallel building" + fi + + runHook postConfigure +} + +if [ -z "${dontUseMesonConfigure-}" -a -z "${configurePhase-}" ]; then + setOutputFlags= + configurePhase=mesonConfigurePhase +fi diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mill/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mill/default.nix new file mode 100644 index 000000000000..3fc893fd07cf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mill/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, jre, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "mill"; + version = "0.8.0"; + + src = fetchurl { + url = "https://github.com/lihaoyi/mill/releases/download/${version}/${version}"; + sha256 = "04pf76iyrbq2h2hksx0r2fmnd0d9mi6an24zvfv7k79rch11cql1"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + install -Dm555 "$src" "$out/bin/.mill-wrapped" + # can't use wrapProgram because it sets --argv0 + makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \ + --prefix PATH : "${jre}/bin" \ + --set JAVA_HOME "${jre}" \ + --set MILL_VERSION "${version}" + runHook postInstall + ''; + + meta = with stdenv.lib; { + homepage = "https://www.lihaoyi.com/mill"; + license = licenses.mit; + description = "A build tool for Scala, Java and more"; + longDescription = '' + Mill is a build tool borrowing ideas from modern tools like Bazel, to let you build + your projects in a way that's simple, fast, and predictable. Mill has built in + support for the Scala programming language, and can serve as a replacement for + SBT, but can also be extended to support any other language or platform via + modules (written in Java or Scala) or through an external subprocesses. + ''; + maintainers = with maintainers; [ scalavision ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mk/builder.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mk/builder.sh new file mode 100644 index 000000000000..73678ae9f5cc --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mk/builder.sh @@ -0,0 +1,4 @@ +source $stdenv/setup +installFlags="PREFIX=$out" +preInstall="mkdir -p $out/man/man1 $out/bin" +genericBuild diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mk/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mk/default.nix new file mode 100644 index 000000000000..09028789daa6 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/mk/default.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "mk-2006-01-31"; + src = fetchurl { + url = "http://tarballs.nixos.org/mk-20060131.tar.gz"; + sha256 = "0za8dp1211bdp4584xb59liqpww7w1ql0cmlv34p9y928nibcxsr"; + }; + builder = ./builder.sh; + + meta = { + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/msbuild/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/msbuild/default.nix new file mode 100644 index 000000000000..aea215cc927d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/msbuild/default.nix @@ -0,0 +1,133 @@ +{ stdenv, fetchurl, makeWrapper, glibcLocales, mono, dotnetPackages, unzip, dotnet-sdk }: + +let + + xplat = fetchurl { + url = "https://github.com/mono/msbuild/releases/download/0.07/mono_msbuild_xplat-master-8f608e49.zip"; + sha256 = "1jxq3fk9a6q2a8i9zacxaz3fkvc22i9qvzlpa7wbb95h42g0ffhq"; + }; + + deps = import ./nuget.nix { inherit fetchurl; }; + +in + +stdenv.mkDerivation rec { + pname = "msbuild"; + version = "16.3+xamarinxplat.2019.07.26.14.57"; + + src = fetchurl { + url = "https://download.mono-project.com/sources/msbuild/msbuild-${version}.tar.xz"; + sha256 = "1zcdfx4xsh62wj3g1jc2an0lppsfs691lz4dv05xbgi01aq1hk6a"; + }; + + nativeBuildInputs = [ + dotnet-sdk + mono + ]; + + buildInputs = [ + dotnetPackages.Nuget + glibcLocales + makeWrapper + unzip + ]; + + # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=msbuild + phases = ["unpackPhase" "buildPhase" "installPhase" "installCheckPhase"]; + + # https://github.com/NixOS/nixpkgs/issues/38991 + # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) + LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux + "${glibcLocales}/lib/locale/locale-archive"; + + buildPhase = '' + # nuget would otherwise try to base itself in /homeless-shelter + export HOME=$(pwd)/fake-home + + for package in ${toString deps}; do + nuget add $package -Source nixos + done + + nuget sources Disable -Name "nuget.org" + nuget sources Add -Name nixos -Source $(pwd)/nixos + + # license check is case sensitive + mv LICENSE license + + mkdir -p artifacts + unzip ${xplat} -d artifacts + mv artifacts/msbuild artifacts/mono-msbuild + chmod +x artifacts/mono-msbuild/MSBuild.dll + + ln -s $(find ${dotnet-sdk} -name libhostfxr.so) artifacts/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/ + + # overwrite the file + echo "#!${stdenv.shell}" > eng/common/dotnet-install.sh + + # msbuild response files to use only the nixos source + echo "/p:RestoreSources=nixos" > artifacts/mono-msbuild/MSBuild.rsp + echo "/p:RestoreSources=nixos" > src/MSBuild/MSBuild.rsp + + # not patchShebangs, there is /bin/bash in the body of the script as well + substituteInPlace ./eng/cibuild_bootstrapped_msbuild.sh --replace /bin/bash ${stdenv.shell} + + # DisableNerdbankVersioning https://gitter.im/Microsoft/msbuild/archives/2018/06/27?at=5b33dbc4ce3b0f268d489bfa + # TODO there are some (many?) failing tests + ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true + ''; + + installPhase = '' + mono artifacts/mono-msbuild/MSBuild.dll mono/build/install.proj /p:MonoInstallPrefix="$out" /p:Configuration=Release-MONO + + ln -s ${mono}/lib/mono/msbuild/Current/bin/Roslyn $out/lib/mono/msbuild/Current/bin/Roslyn + + makeWrapper ${mono}/bin/mono $out/bin/msbuild \ + --set MSBuildExtensionsPath $out/lib/mono/xbuild \ + --set-default MONO_GC_PARAMS "nursery-size=64m" \ + --add-flags "$out/lib/mono/msbuild/15.0/bin/MSBuild.dll" + ''; + + doInstallCheck = true; + + # https://docs.microsoft.com/cs-cz/visualstudio/msbuild/walkthrough-creating-an-msbuild-project-file-from-scratch?view=vs-2019 + installCheckPhase = '' + cat > Helloworld.cs <<EOF +using System; + +class HelloWorld +{ + static void Main() + { +#if DebugConfig + Console.WriteLine("WE ARE IN THE DEBUG CONFIGURATION"); +#endif + + Console.WriteLine("Hello, world!"); + } +} +EOF + + cat > Helloworld.csproj <<EOF +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Compile Include="Helloworld.cs" /> + </ItemGroup> + <Target Name="Build"> + <Csc Sources="@(Compile)"/> + </Target> +</Project> +EOF + + $out/bin/msbuild Helloworld.csproj -t:Build + ${mono}/bin/mono Helloworld.exe | grep "Hello, world!" + ''; + + meta = with stdenv.lib; { + description = "Mono version of Microsoft Build Engine, the build platform for .NET, and Visual Studio"; + homepage = "https://github.com/mono/msbuild"; + license = licenses.mit; + maintainers = with maintainers; [ jdanek ]; + platforms = platforms.unix; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/msbuild/nuget.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/msbuild/nuget.nix new file mode 100644 index 000000000000..0aae3840752d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/msbuild/nuget.nix @@ -0,0 +1,1130 @@ +{ fetchurl }: let + + fetchNuGet = { url, name, version, sha256 }: fetchurl { + inherit name url sha256; + }; + +in [ +(fetchNuGet { + name = "microsoft.build"; + version = "14.3.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.build/14.3.0"; + sha256 = "1zamn3p8xxi0wsjlpln0y71ncb977f3fp08mvaz4wmbmi76nr0rz"; + }) +(fetchNuGet { + name = "system.io"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.io/4.1.0"; + sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp"; + }) +(fetchNuGet { + name = "system.io"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io/4.3.0"; + sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; + }) +(fetchNuGet { + name = "system.xml.xpath"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.xml.xpath/4.3.0"; + sha256 = "1cv2m0p70774a0sd1zxc8fm8jk3i5zk2bla3riqvi8gsm0r4kpci"; + }) +(fetchNuGet { + name = "microsoft.net.compilers.toolset"; + version = "3.3.0-beta2-19367-02"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/microsoft.net.compilers.toolset.3.3.0-beta2-19367-02.nupkg"; + sha256 = "1v9lz2fmfprhql0klqa8iipiiz3wcflvlgr3a86pcjjk7x0y84sl"; + }) +(fetchNuGet { + name = "system.io.filesystem"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.io.filesystem/4.0.1"; + sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1"; + }) +(fetchNuGet { + name = "system.io.filesystem"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io.filesystem/4.3.0"; + sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; + }) +(fetchNuGet { + name = "largeaddressaware"; + version = "1.0.3"; + url = "https://www.nuget.org/api/v2/package/largeaddressaware/1.0.3"; + sha256 = "1ppss9bgj0hf5s8307bnm2a4qm10mrymp0v12m28a5q81zjz0fr5"; + }) +(fetchNuGet { + name = "nuget.protocol"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.protocol/5.2.0-rtm.6067"; + sha256 = "0fm3qgcdsy6dy6fih0n9a4w39mzdha4cz51gr9pp9g4nag34za2a"; + }) +(fetchNuGet { + name = "runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; + }) +(fetchNuGet { + name = "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; + }) +(fetchNuGet { + name = "system.buffers"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.buffers/4.3.0"; + sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; + }) +(fetchNuGet { + name = "system.buffers"; + version = "4.4.0"; + url = "https://www.nuget.org/api/v2/package/system.buffers/4.4.0"; + sha256 = "183f8063w8zqn99pv0ni0nnwh7fgx46qzxamwnans55hhs2l0g19"; + }) +(fetchNuGet { + name = "xunit.core"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit.core/2.4.1"; + sha256 = "1nnb3j4kzmycaw1g76ii4rfqkvg6l8gqh18falwp8g28h802019a"; + }) +(fetchNuGet { + name = "system.io.filesystem.primitives"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io.filesystem.primitives/4.3.0"; + sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; + }) +(fetchNuGet { + name = "system.io.filesystem.primitives"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.io.filesystem.primitives/4.0.1"; + sha256 = "1s0mniajj3lvbyf7vfb5shp4ink5yibsx945k6lvxa96r8la1612"; + }) +(fetchNuGet { + name = "system.xml.xmldocument"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.xml.xmldocument/4.0.1"; + sha256 = "0ihsnkvyc76r4dcky7v3ansnbyqjzkbyyia0ir5zvqirzan0bnl1"; + }) +(fetchNuGet { + name = "system.xml.xmldocument"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.xml.xmldocument/4.3.0"; + sha256 = "0bmz1l06dihx52jxjr22dyv5mxv6pj4852lx68grjm7bivhrbfwi"; + }) +(fetchNuGet { + name = "microsoft.build.framework"; + version = "15.5.180"; + url = "https://www.nuget.org/api/v2/package/microsoft.build.framework/15.5.180"; + sha256 = "064y3a711ikx9pm9d2wyms4i3k4f9hfvn3vymhwygg7yv7gcj92z"; + }) +(fetchNuGet { + name = "microsoft.build.framework"; + version = "14.3.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.build.framework/14.3.0"; + sha256 = "0r7y1i7dbr3pb53fdrh268hyi627w85nzv2iblwyg8dzkfxraafd"; + }) +(fetchNuGet { + name = "system.globalization"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.globalization/4.3.0"; + sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; + }) +(fetchNuGet { + name = "system.globalization"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.globalization/4.0.11"; + sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d"; + }) +(fetchNuGet { + name = "microsoft.dotnet.signtool"; + version = "1.0.0-beta.19372.10"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.signtool/1.0.0-beta.19372.10/microsoft.dotnet.signtool.1.0.0-beta.19372.10.nupkg"; + sha256 = "1f2im2lilw10zslfclxh49knr542jy7q09p009flxsgn68riy0j6"; + }) +(fetchNuGet { + name = "system.runtime.handles"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.handles/4.3.0"; + sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; + }) +(fetchNuGet { + name = "system.runtime.handles"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.runtime.handles/4.0.1"; + sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g"; + }) +(fetchNuGet { + name = "microsoft.codeanalysis.common"; + version = "3.0.0-beta1-61516-01"; + url = "https://dotnet.myget.org/F/roslyn/api/v2/package/microsoft.codeanalysis.common/3.0.0-beta1-61516-01"; + sha256 = "1qfm61yrsmihhir7n3hb5ccn1r50i39rv1g74880ma7ihjl1hz54"; + }) +(fetchNuGet { + name = "microsoft.netcore.platforms"; + version = "1.0.1"; + url = "https://www.nuget.org/api/v2/package/microsoft.netcore.platforms/1.0.1"; + sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; + }) +(fetchNuGet { + name = "microsoft.netcore.platforms"; + version = "1.1.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.netcore.platforms/1.1.0"; + sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; + }) +(fetchNuGet { + name = "system.reflection.primitives"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.reflection.primitives/4.3.0"; + sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; + }) +(fetchNuGet { + name = "system.reflection.primitives"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.reflection.primitives/4.0.1"; + sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28"; + }) +(fetchNuGet { + name = "microbuild.core"; + version = "0.2.0"; + url = "https://www.nuget.org/api/v2/package/microbuild.core/0.2.0"; + sha256 = "0q4s45jskbyxfx4ay6znnvv94zma2wd85b8rwmwszd2nb0xl3194"; + }) +(fetchNuGet { + name = "system.diagnostics.tracesource"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.tracesource/4.0.0"; + sha256 = "1mc7r72xznczzf6mz62dm8xhdi14if1h8qgx353xvhz89qyxsa3h"; + }) +(fetchNuGet { + name = "system.runtime.numerics"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.numerics/4.3.0"; + sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; + }) +(fetchNuGet { + name = "system.threading.tasks.parallel"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks.parallel/4.3.0"; + sha256 = "1rr3qa4hxwyj531s4nb3bwrxnxxwz617i0n9gh6x7nr7dd3ayzgh"; + }) +(fetchNuGet { + name = "system.threading.tasks.parallel"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks.parallel/4.0.1"; + sha256 = "114wdg32hr46dfsnns3pgs67kcha5jn47p5gg0mhxfn5vrkr2p75"; + }) +(fetchNuGet { + name = "nuget.credentials"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.credentials/5.2.0-rtm.6067"; + sha256 = "07g2na590sph9li5igww74i3gqyrj5cb6gsgjh54f1f4bs4x1c4k"; + }) +(fetchNuGet { + name = "system.objectmodel"; + version = "4.0.12"; + url = "https://www.nuget.org/api/v2/package/system.objectmodel/4.0.12"; + sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj"; + }) +(fetchNuGet { + name = "system.objectmodel"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.objectmodel/4.3.0"; + sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2"; + }) +(fetchNuGet { + name = "system.xml.xmlserializer"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.xml.xmlserializer/4.0.11"; + sha256 = "01nzc3gdslw90qfykq4qzr2mdnqxjl4sj0wp3fixiwdmlmvpib5z"; + }) +(fetchNuGet { + name = "microsoft.codeanalysis.build.tasks"; + version = "3.0.0-beta1-61516-01"; + url = "https://dotnet.myget.org/F/roslyn/api/v2/package/microsoft.codeanalysis.build.tasks/3.0.0-beta1-61516-01"; + sha256 = "1cjpqbd4i0gxhh86nvamlpkisd1krcrya6riwjhghvpjph6115vp"; + }) +(fetchNuGet { + name = "system.private.datacontractserialization"; + version = "4.1.1"; + url = "https://www.nuget.org/api/v2/package/system.private.datacontractserialization/4.1.1"; + sha256 = "1xk9wvgzipssp1393nsg4n16zbr5481k03nkdlj954hzq5jkx89r"; + }) +(fetchNuGet { + name = "system.numerics.vectors"; + version = "4.4.0"; + url = "https://www.nuget.org/api/v2/package/system.numerics.vectors/4.4.0"; + sha256 = "0rdvma399070b0i46c4qq1h2yvjj3k013sqzkilz4bz5cwmx1rba"; + }) +(fetchNuGet { + name = "microsoft.build.centralpackageversions"; + version = "2.0.1"; + url = "https://www.nuget.org/api/v2/package/microsoft.build.centralpackageversions/2.0.1"; + sha256 = "17cjiaj2b98q8s89168g42jb8rhwm6062jcbv57rbkdiiwdsn55k"; + }) +(fetchNuGet { + name = "system.text.encoding.extensions"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.text.encoding.extensions/4.0.11"; + sha256 = "08nsfrpiwsg9x5ml4xyl3zyvjfdi4mvbqf93kjdh11j4fwkznizs"; + }) +(fetchNuGet { + name = "system.text.encoding.extensions"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.text.encoding.extensions/4.3.0"; + sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; + }) +(fetchNuGet { + name = "microsoft.visualstudio.sdk.embedinteroptypes"; + version = "15.0.15"; + url = "https://www.nuget.org/api/v2/package/microsoft.visualstudio.sdk.embedinteroptypes/15.0.15"; + sha256 = "0chr3slzzcanwcyd9isx4gichqzmfh4zd3h83piw0r4xsww1wmpd"; + }) +(fetchNuGet { + name = "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; + }) +(fetchNuGet { + name = "system.runtime.extensions"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.extensions/4.1.0"; + sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z"; + }) +(fetchNuGet { + name = "system.runtime.extensions"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.extensions/4.3.0"; + sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; + }) +(fetchNuGet { + name = "system.resources.extensions"; + version = "4.6.0-preview8.19364.1"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.resources.extensions/4.6.0-preview8.19364.1/system.resources.extensions.4.6.0-preview8.19364.1.nupkg"; + sha256 = "0jh9ilbicmsngv77a4ayzs0n7s440ycdf726nbljw029gq4rzvqf"; + }) +(fetchNuGet { + name = "nuget.frameworks"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.frameworks/5.2.0-rtm.6067"; + sha256 = "1g1kcfqhxr1bhl3ksbdmz3rb9nq1qmkac1sijf9ng4gmr9fmprdm"; + }) +(fetchNuGet { + name = "system.diagnostics.diagnosticsource"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.diagnosticsource/4.3.0"; + sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; + }) +(fetchNuGet { + name = "system.security.claims"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.claims/4.3.0"; + sha256 = "0jvfn7j22l3mm28qjy3rcw287y9h65ha4m940waaxah07jnbzrhn"; + }) +(fetchNuGet { + name = "system.linq.expressions"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.linq.expressions/4.3.0"; + sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv"; + }) +(fetchNuGet { + name = "system.diagnostics.stacktrace"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.stacktrace/4.3.0"; + sha256 = "0ash4h9k0m7xsm0yl79r0ixrdz369h7y922wipp5gladmlbvpyjd"; + }) +(fetchNuGet { + name = "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; + }) +(fetchNuGet { + name = "system.diagnostics.tracing"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.tracing/4.3.0"; + sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; + }) +(fetchNuGet { + name = "system.diagnostics.tracing"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.tracing/4.1.0"; + sha256 = "1d2r76v1x610x61ahfpigda89gd13qydz6vbwzhpqlyvq8jj6394"; + }) +(fetchNuGet { + name = "xunit.analyzers"; + version = "0.10.0"; + url = "https://www.nuget.org/api/v2/package/xunit.analyzers/0.10.0"; + sha256 = "15n02q3akyqbvkp8nq75a8rd66d4ax0rx8fhdcn8j78pi235jm7j"; + }) +(fetchNuGet { + name = "xunit.assert"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit.assert/2.4.1"; + sha256 = "1imynzh80wxq2rp9sc4gxs4x1nriil88f72ilhj5q0m44qqmqpc6"; + }) +(fetchNuGet { + name = "system.appcontext"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.appcontext/4.1.0"; + sha256 = "0fv3cma1jp4vgj7a8hqc9n7hr1f1kjp541s6z0q1r6nazb4iz9mz"; + }) +(fetchNuGet { + name = "system.appcontext"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.appcontext/4.3.0"; + sha256 = "1649qvy3dar900z3g817h17nl8jp4ka5vcfmsr05kh0fshn7j3ya"; + }) +(fetchNuGet { + name = "system.text.encoding.codepages"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.text.encoding.codepages/4.3.0"; + sha256 = "0lgxg1gn7pg7j0f942pfdc9q7wamzxsgq3ng248ikdasxz0iadkv"; + }) +(fetchNuGet { + name = "system.text.encoding.codepages"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.text.encoding.codepages/4.0.1"; + sha256 = "00wpm3b9y0k996rm9whxprngm8l500ajmzgy2ip9pgwk0icp06y3"; + }) +(fetchNuGet { + name = "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; + }) +(fetchNuGet { + name = "microsoft.codeanalysis.csharp"; + version = "3.0.0-beta1-61516-01"; + url = "https://dotnet.myget.org/F/roslyn/api/v2/package/microsoft.codeanalysis.csharp/3.0.0-beta1-61516-01"; + sha256 = "0a7npkdw6s5jczw1lkm63x2bpz1z3ccid20h5nm6k78cv7sihm4h"; + }) +(fetchNuGet { + name = "system.console"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/system.console/4.0.0"; + sha256 = "0ynxqbc3z1nwbrc11hkkpw9skw116z4y9wjzn7id49p9yi7mzmlf"; + }) +(fetchNuGet { + name = "system.console"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.console/4.3.0"; + sha256 = "1flr7a9x920mr5cjsqmsy9wgnv3lvd0h1g521pdr1lkb2qycy7ay"; + }) +(fetchNuGet { + name = "system.reflection.typeextensions"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.reflection.typeextensions/4.1.0"; + sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7"; + }) +(fetchNuGet { + name = "system.runtime.compilerservices.unsafe"; + version = "4.5.2"; + url = "https://www.nuget.org/api/v2/package/system.runtime.compilerservices.unsafe/4.5.2"; + sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi"; + }) +(fetchNuGet { + name = "system.threading.tasks"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks/4.3.0"; + sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; + }) +(fetchNuGet { + name = "system.threading.tasks"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks/4.0.11"; + sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; + }) +(fetchNuGet { + name = "xunit.abstractions"; + version = "2.0.3"; + url = "https://www.nuget.org/api/v2/package/xunit.abstractions/2.0.3"; + sha256 = "00wl8qksgkxld76fgir3ycc5rjqv1sqds6x8yx40927q5py74gfh"; + }) +(fetchNuGet { + name = "microsoft.build.utilities.core"; + version = "15.5.180"; + url = "https://www.nuget.org/api/v2/package/microsoft.build.utilities.core/15.5.180"; + sha256 = "0c4bjhaqgc98bchln8p5d2p1vyn8qrha2b8gpn2l7bnznbcrd630"; + }) +(fetchNuGet { + name = "microsoft.build.utilities.core"; + version = "14.3.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.build.utilities.core/14.3.0"; + sha256 = "0351nsnx12nzkss6vaqwwh7d7car7hrgyh0vyd4bl83c4x3ls1kb"; + }) +(fetchNuGet { + name = "system.reflection.emit"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.reflection.emit/4.0.1"; + sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp"; + }) +(fetchNuGet { + name = "microsoft.visualstudio.setup.configuration.interop"; + version = "1.16.30"; + url = "https://www.nuget.org/api/v2/package/microsoft.visualstudio.setup.configuration.interop/1.16.30"; + sha256 = "14022lx03vdcqlvbbdmbsxg5pqfx1rfq2jywxlyaz9v68cvsb0g4"; + }) +(fetchNuGet { + name = "system.net.sockets"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.net.sockets/4.3.0"; + sha256 = "1ssa65k6chcgi6mfmzrznvqaxk8jp0gvl77xhf1hbzakjnpxspla"; + }) +(fetchNuGet { + name = "microsoft.dotnet.arcade.sdk"; + version = "1.0.0-beta.19372.10"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.arcade.sdk/1.0.0-beta.19372.10/microsoft.dotnet.arcade.sdk.1.0.0-beta.19372.10.nupkg"; + sha256 = "1lii0yg4fbsma80mmvw2zwplc26abb46q6gkxwbsbkyszkw128hv"; + }) +(fetchNuGet { + name = "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; + }) +(fetchNuGet { + name = "runtime.native.system.io.compression"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.native.system.io.compression/4.3.0"; + sha256 = "1vvivbqsk6y4hzcid27pqpm5bsi6sc50hvqwbcx8aap5ifrxfs8d"; + }) +(fetchNuGet { + name = "system.diagnostics.debug"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.debug/4.3.0"; + sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; + }) +(fetchNuGet { + name = "system.diagnostics.debug"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.debug/4.0.11"; + sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz"; + }) +(fetchNuGet { + name = "system.xml.readerwriter"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.xml.readerwriter/4.3.0"; + sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1"; + }) +(fetchNuGet { + name = "system.xml.readerwriter"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.xml.readerwriter/4.0.11"; + sha256 = "0c6ky1jk5ada9m94wcadih98l6k1fvf6vi7vhn1msjixaha419l5"; + }) +(fetchNuGet { + name = "system.threading.timer"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.timer/4.3.0"; + sha256 = "1nx773nsx6z5whv8kaa1wjh037id2f1cxhb69pvgv12hd2b6qs56"; + }) +(fetchNuGet { + name = "system.threading.timer"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.threading.timer/4.0.1"; + sha256 = "15n54f1f8nn3mjcjrlzdg6q3520571y012mx7v991x2fvp73lmg6"; + }) +(fetchNuGet { + name = "system.reflection.metadata"; + version = "1.4.2"; + url = "https://www.nuget.org/api/v2/package/system.reflection.metadata/1.4.2"; + sha256 = "08b7b43vczlliv8k7q43jinjfrxwpljsglw7sxmc6sd7d54pd1vi"; + }) +(fetchNuGet { + name = "system.reflection.metadata"; + version = "1.6.0"; + url = "https://www.nuget.org/api/v2/package/system.reflection.metadata/1.6.0"; + sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4"; + }) +(fetchNuGet { + name = "system.xml.xdocument"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.xml.xdocument/4.3.0"; + sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd"; + }) +(fetchNuGet { + name = "system.linq"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.linq/4.3.0"; + sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; + }) +(fetchNuGet { + name = "system.linq"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.linq/4.1.0"; + sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5"; + }) +(fetchNuGet { + name = "nuget.librarymodel"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.librarymodel/5.2.0-rtm.6067"; + sha256 = "0dxvnspgkc1lcmilb67kkipg39ih34cmifs6jwk9kbrwf96z51q9"; + }) +(fetchNuGet { + name = "xlifftasks"; + version = "1.0.0-beta.19252.1"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/xlifftasks/1.0.0-beta.19252.1/xlifftasks.1.0.0-beta.19252.1.nupkg"; + sha256 = "0249sfb30y9dgsfryaj8644qw3yc1xp2xzc08lsrwvmm8vjcvkri"; + }) +(fetchNuGet { + name = "system.text.regularexpressions"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.text.regularexpressions/4.3.0"; + sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l"; + }) +(fetchNuGet { + name = "system.text.regularexpressions"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.text.regularexpressions/4.1.0"; + sha256 = "1mw7vfkkyd04yn2fbhm38msk7dz2xwvib14ygjsb8dq2lcvr18y7"; + }) +(fetchNuGet { + name = "system.security.accesscontrol"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.accesscontrol/4.3.0"; + sha256 = "1gakrskmlmwhzmjc1c2mrwk0fml615rsk31dw0kbjnn9yqnnrjbi"; + }) +(fetchNuGet { + name = "xunit.runner.visualstudio"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit.runner.visualstudio/2.4.1"; + sha256 = "0fln5pk18z98gp0zfshy1p9h6r9wc55nyqhap34k89yran646vhn"; + }) +(fetchNuGet { + name = "system.resources.resourcemanager"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.resources.resourcemanager/4.0.1"; + sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi"; + }) +(fetchNuGet { + name = "system.resources.resourcemanager"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.resources.resourcemanager/4.3.0"; + sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; + }) +(fetchNuGet { + name = "nuget.projectmodel"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.projectmodel/5.2.0-rtm.6067"; + sha256 = "1s5950nbcsnfrpbaxdnl6cv1xbsa57fln04lhyrki536476a6wcn"; + }) +(fetchNuGet { + name = "nuget.versioning"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.versioning/5.2.0-rtm.6067"; + sha256 = "04rr31ms95h7ymqxlalpv3xs48j8ng4ljfz5lmrfw7547rhcrj2h"; + }) +(fetchNuGet { + name = "system.memory"; + version = "4.5.3"; + url = "https://www.nuget.org/api/v2/package/system.memory/4.5.3"; + sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a"; + }) +(fetchNuGet { + name = "system.resources.reader"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/system.resources.reader/4.0.0"; + sha256 = "1jafi73dcf1lalrir46manq3iy6xnxk2z7gpdpwg4wqql7dv3ril"; + }) +(fetchNuGet { + name = "nuget.common"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.common/5.2.0-rtm.6067"; + sha256 = "1ff5dhkv8v04n2kr5gyjjvki4mqsp1w4dwsgj7cvdcfcm8alba0m"; + }) +(fetchNuGet { + name = "runtime.native.system"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/runtime.native.system/4.0.0"; + sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf"; + }) +(fetchNuGet { + name = "runtime.native.system"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.native.system/4.3.0"; + sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; + }) +(fetchNuGet { + name = "system.runtime.interopservices"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices/4.1.0"; + sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1"; + }) +(fetchNuGet { + name = "system.runtime.interopservices"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices/4.3.0"; + sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; + }) +(fetchNuGet { + name = "microbuild.core.sentinel"; + version = "1.0.0"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microbuild.core.sentinel/1.0.0/microbuild.core.sentinel.1.0.0.nupkg"; + sha256 = "035kqx5fkapql108n222lz8psvxk04mv3dy1qg3h08i4b8j3dy8i"; + }) +(fetchNuGet { + name = "sn"; + version = "1.0.0"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/sn/1.0.0/sn.1.0.0.nupkg"; + sha256 = "1012fcdc6vq2355v86h434s6p2nnqgpdapb7p25l4h39g5q8p1qs"; + }) +(fetchNuGet { + name = "system.text.encoding"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.text.encoding/4.0.11"; + sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw"; + }) +(fetchNuGet { + name = "system.text.encoding"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.text.encoding/4.3.0"; + sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; + }) +(fetchNuGet { + name = "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; + }) +(fetchNuGet { + name = "system.reflection.emit.lightweight"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.reflection.emit.lightweight/4.0.1"; + sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr"; + }) +(fetchNuGet { + name = "microsoft.net.test.sdk"; + version = "15.9.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.net.test.sdk/15.9.0"; + sha256 = "0g7wjgiigs4v8qa32g9ysqgx8bx55dzmbxfkc4ic95mpd1vkjqxw"; + }) +(fetchNuGet { + name = "system.io.compression"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io.compression/4.3.0"; + sha256 = "084zc82yi6yllgda0zkgl2ys48sypiswbiwrv7irb3r0ai1fp4vz"; + }) +(fetchNuGet { + name = "system.runtime.serialization.primitives"; + version = "4.1.1"; + url = "https://www.nuget.org/api/v2/package/system.runtime.serialization.primitives/4.1.1"; + sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k"; + }) +(fetchNuGet { + name = "system.diagnostics.fileversioninfo"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.fileversioninfo/4.3.0"; + sha256 = "094hx249lb3vb336q7dg3v257hbxvz2jnalj695l7cg5kxzqwai7"; + }) +(fetchNuGet { + name = "system.xml.xpath.xdocument"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.xml.xpath.xdocument/4.3.0"; + sha256 = "1wxckyb7n1pi433xzz0qcwcbl1swpra64065mbwwi8dhdc4kiabn"; + }) +(fetchNuGet { + name = "system.security.principal.windows"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.principal.windows/4.3.0"; + sha256 = "00a0a7c40i3v4cb20s2cmh9csb5jv2l0frvnlzyfxh848xalpdwr"; + }) +(fetchNuGet { + name = "vswhere"; + version = "2.6.7"; + url = "https://www.nuget.org/api/v2/package/vswhere/2.6.7"; + sha256 = "0h4k5i96p7633zzf4xsv7615f9x72rr5qr7b9934ri2y6gshfcwk"; + }) +(fetchNuGet { + name = "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; + }) +(fetchNuGet { + name = "xunit.runner.console"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit.runner.console/2.4.1"; + sha256 = "13ykz9anhz72xc4q6byvdfwrp54hlcbl6zsfapwfhnzyvfgb9w13"; + }) +(fetchNuGet { + name = "system.threading"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.threading/4.0.11"; + sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; + }) +(fetchNuGet { + name = "system.threading"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.threading/4.3.0"; + sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; + }) +(fetchNuGet { + name = "system.threading.tasks.dataflow"; + version = "4.5.24"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks.dataflow/4.5.24"; + sha256 = "0wahbfdb0jxx3hi04xggfms8wgf68wmvv68m2vfp8v2kiqr5mr2r"; + }) +(fetchNuGet { + name = "microsoft.codeanalysis.analyzers"; + version = "1.1.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.codeanalysis.analyzers/1.1.0"; + sha256 = "08r667hj2259wbim1p3al5qxkshydykmb7nd9ygbjlg4mmydkapc"; + }) +(fetchNuGet { + name = "system.dynamic.runtime"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.dynamic.runtime/4.3.0"; + sha256 = "1d951hrvrpndk7insiag80qxjbf2y0y39y8h5hnq9612ws661glk"; + }) +(fetchNuGet { + name = "system.io.pipes"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io.pipes/4.3.0"; + sha256 = "1ygv16gzpi9cnlzcqwijpv7055qc50ynwg3vw29vj1q3iha3h06r"; + }) +(fetchNuGet { + name = "system.net.primitives"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.net.primitives/4.3.0"; + sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; + }) +(fetchNuGet { + name = "system.runtime.serialization.xml"; + version = "4.1.1"; + url = "https://www.nuget.org/api/v2/package/system.runtime.serialization.xml/4.1.1"; + sha256 = "11747an5gbz821pwahaim3v82gghshnj9b5c4cw539xg5a3gq7rk"; + }) +(fetchNuGet { + name = "system.security.cryptography.encoding"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.cryptography.encoding/4.3.0"; + sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; + }) +(fetchNuGet { + name = "system.collections.nongeneric"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.collections.nongeneric/4.0.1"; + sha256 = "19994r5y5bpdhj7di6w047apvil8lh06lh2c2yv9zc4fc5g9bl4d"; + }) +(fetchNuGet { + name = "system.diagnostics.tools"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.tools/4.3.0"; + sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1"; + }) +(fetchNuGet { + name = "microsoft.netframework.referenceassemblies"; + version = "1.0.0-alpha-004"; + url = "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/microsoft.netframework.referenceassemblies/1.0.0-alpha-004"; + sha256 = "1qrpxhcx11v92lqwvrih88mlyfw2rkrsjqh7gl8c1h71vyppr3bp"; + }) +(fetchNuGet { + name = "system.reflection.emit.ilgeneration"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.reflection.emit.ilgeneration/4.0.1"; + sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0"; + }) +(fetchNuGet { + name = "xunit.extensibility.execution"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit.extensibility.execution/2.4.1"; + sha256 = "1pbilxh1gp2ywm5idfl0klhl4gb16j86ib4x83p8raql1dv88qia"; + }) +(fetchNuGet { + name = "microsoft.codecoverage"; + version = "15.9.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.codecoverage/15.9.0"; + sha256 = "10v5xrdilnm362g9545qxvlrbwc9vn65jhpb1i0jlhyqsj6bfwzg"; + }) +(fetchNuGet { + name = "xunit.extensibility.core"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit.extensibility.core/2.4.1"; + sha256 = "103qsijmnip2pnbhciqyk2jyhdm6snindg5z2s57kqf5pcx9a050"; + }) +(fetchNuGet { + name = "system.collections.concurrent"; + version = "4.0.12"; + url = "https://www.nuget.org/api/v2/package/system.collections.concurrent/4.0.12"; + sha256 = "07y08kvrzpak873pmyxs129g1ch8l27zmg51pcyj2jvq03n0r0fc"; + }) +(fetchNuGet { + name = "system.collections.concurrent"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.collections.concurrent/4.3.0"; + sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; + }) +(fetchNuGet { + name = "system.collections"; + version = "4.0.11"; + url = "https://www.nuget.org/api/v2/package/system.collections/4.0.11"; + sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6"; + }) +(fetchNuGet { + name = "system.collections"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.collections/4.3.0"; + sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; + }) +(fetchNuGet { + name = "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; + }) +(fetchNuGet { + name = "microsoft.build.nugetsdkresolver"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/microsoft.build.nugetsdkresolver/5.2.0-rtm.6067"; + sha256 = "1rz2i4md7b8rlybb9s7416l0pr357f3ar149s6ipfq0xijn3xgmh"; + }) +(fetchNuGet { + name = "system.reflection"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.reflection/4.1.0"; + sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9"; + }) +(fetchNuGet { + name = "system.reflection"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.reflection/4.3.0"; + sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; + }) +(fetchNuGet { + name = "nuget.configuration"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.configuration/5.2.0-rtm.6067"; + sha256 = "075mypb32i0d0x73rcr0di6pb0bhlp0izv3633ky64kddriajma1"; + }) +(fetchNuGet { + name = "system.net.http"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.net.http/4.3.0"; + sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j"; + }) +(fetchNuGet { + name = "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; + }) +(fetchNuGet { + name = "system.security.cryptography.x509certificates"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.cryptography.x509certificates/4.3.0"; + sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; + }) +(fetchNuGet { + name = "nuget.packaging"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.packaging/5.2.0-rtm.6067"; + sha256 = "16p5glvvpp5rw10ycbpyg39k4prir450l12r5frpm8qz0rdp3xig"; + }) +(fetchNuGet { + name = "nuget.commands"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.commands/5.2.0-rtm.6067"; + sha256 = "06vnphsmwnvcigwj37hy5abipjzwhnq61zw66cclwd6jjibb1kh9"; + }) +(fetchNuGet { + name = "system.runtime"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime/4.1.0"; + sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; + }) +(fetchNuGet { + name = "system.runtime"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime/4.3.0"; + sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; + }) +(fetchNuGet { + name = "microsoft.win32.primitives"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.win32.primitives/4.3.0"; + sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; + }) +(fetchNuGet { + name = "microsoft.win32.primitives"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/microsoft.win32.primitives/4.0.1"; + sha256 = "1n8ap0cmljbqskxpf8fjzn7kh1vvlndsa75k01qig26mbw97k2q7"; + }) +(fetchNuGet { + name = "system.collections.immutable"; + version = "1.2.0"; + url = "https://www.nuget.org/api/v2/package/system.collections.immutable/1.2.0"; + sha256 = "1jm4pc666yiy7af1mcf7766v710gp0h40p228ghj6bavx7xfa38m"; + }) +(fetchNuGet { + name = "system.collections.immutable"; + version = "1.3.1"; + url = "https://www.nuget.org/api/v2/package/system.collections.immutable/1.3.1"; + sha256 = "17615br2x5riyx8ivf1dcqwj6q3ipq1bi5hqhw54yfyxmx38ddva"; + }) +(fetchNuGet { + name = "system.collections.immutable"; + version = "1.5.0"; + url = "https://www.nuget.org/api/v2/package/system.collections.immutable/1.5.0"; + sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06"; + }) +(fetchNuGet { + name = "nuget.dependencyresolver.core"; + version = "5.2.0-rtm.6067"; + url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.dependencyresolver.core/5.2.0-rtm.6067"; + sha256 = "0iw1z2lascjjmdkk9nf2wqm5sj5nqjv4611xx29vlmp6cyhnpq4i"; + }) +(fetchNuGet { + name = "netstandard.library"; + version = "1.6.1"; + url = "https://www.nuget.org/api/v2/package/netstandard.library/1.6.1"; + sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8"; + }) +(fetchNuGet { + name = "shouldly"; + version = "3.0.0"; + url = "https://www.nuget.org/api/v2/package/shouldly/3.0.0"; + sha256 = "1hg28w898kl84rx57sclb2z9b76v5hxlwxig1xnb6fr81aahzlw3"; + }) +(fetchNuGet { + name = "microsoft.diasymreader.pdb2pdb"; + version = "1.1.0-beta1-62506-02"; + url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.diasymreader.pdb2pdb/1.1.0-beta1-62506-02/microsoft.diasymreader.pdb2pdb.1.1.0-beta1-62506-02.nupkg"; + sha256 = "1dkhpmq5aw34nndvb4xc370866vf33x70zrjhgvnpwwspb6vb0zh"; + }) +(fetchNuGet { + name = "system.globalization.calendars"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.globalization.calendars/4.3.0"; + sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; + }) +(fetchNuGet { + name = "system.io.compression.zipfile"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io.compression.zipfile/4.3.0"; + sha256 = "1yxy5pq4dnsm9hlkg9ysh5f6bf3fahqqb6p8668ndy5c0lk7w2ar"; + }) +(fetchNuGet { + name = "system.runtime.interopservices.runtimeinformation"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices.runtimeinformation/4.0.0"; + sha256 = "0glmvarf3jz5xh22iy3w9v3wyragcm4hfdr17v90vs7vcrm7fgp6"; + }) +(fetchNuGet { + name = "system.runtime.interopservices.runtimeinformation"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices.runtimeinformation/4.3.0"; + sha256 = "0q18r1sh4vn7bvqgd6dmqlw5v28flbpj349mkdish2vjyvmnb2ii"; + }) +(fetchNuGet { + name = "system.io.filesystem.driveinfo"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.io.filesystem.driveinfo/4.3.0"; + sha256 = "0j67khc75lwdf7d5i3z41cks7zhac4zdccgvk2xmq6wm1l08xnlh"; + }) +(fetchNuGet { + name = "system.threading.tasks.extensions"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks.extensions/4.3.0"; + sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z"; + }) +(fetchNuGet { + name = "system.threading.tasks.extensions"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.tasks.extensions/4.0.0"; + sha256 = "1cb51z062mvc2i8blpzmpn9d9mm4y307xrwi65di8ri18cz5r1zr"; + }) +(fetchNuGet { + name = "microsoft.netcore.targets"; + version = "1.0.1"; + url = "https://www.nuget.org/api/v2/package/microsoft.netcore.targets/1.0.1"; + sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; + }) +(fetchNuGet { + name = "microsoft.netcore.targets"; + version = "1.1.0"; + url = "https://www.nuget.org/api/v2/package/microsoft.netcore.targets/1.1.0"; + sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; + }) +(fetchNuGet { + name = "system.reflection.extensions"; + version = "4.0.1"; + url = "https://www.nuget.org/api/v2/package/system.reflection.extensions/4.0.1"; + sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn"; + }) +(fetchNuGet { + name = "system.reflection.extensions"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.reflection.extensions/4.3.0"; + sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq"; + }) +(fetchNuGet { + name = "system.diagnostics.process"; + version = "4.1.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.process/4.1.0"; + sha256 = "061lrcs7xribrmq7kab908lww6kn2xn1w3rdc41q189y0jibl19s"; + }) +(fetchNuGet { + name = "system.diagnostics.process"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.diagnostics.process/4.3.0"; + sha256 = "0g4prsbkygq8m21naqmcp70f24a1ksyix3dihb1r1f71lpi3cfj7"; + }) +(fetchNuGet { + name = "system.security.cryptography.primitives"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.cryptography.primitives/4.3.0"; + sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; + }) +(fetchNuGet { + name = "system.threading.thread"; + version = "4.0.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.thread/4.0.0"; + sha256 = "1gxxm5fl36pjjpnx1k688dcw8m9l7nmf802nxis6swdaw8k54jzc"; + }) +(fetchNuGet { + name = "system.threading.thread"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.threading.thread/4.3.0"; + sha256 = "0y2xiwdfcph7znm2ysxanrhbqqss6a3shi1z3c779pj2s523mjx4"; + }) +(fetchNuGet { + name = "newtonsoft.json"; + version = "9.0.1"; + url = "https://www.nuget.org/api/v2/package/newtonsoft.json/9.0.1"; + sha256 = "0mcy0i7pnfpqm4pcaiyzzji4g0c8i3a5gjz28rrr28110np8304r"; + }) +(fetchNuGet { + name = "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.0"; + sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; + }) +(fetchNuGet { + name = "xunit"; + version = "2.4.1"; + url = "https://www.nuget.org/api/v2/package/xunit/2.4.1"; + sha256 = "0xf3kaywpg15flqaqfgywqyychzk15kz0kz34j21rcv78q9ywq20"; + }) +(fetchNuGet { + name = "system.valuetuple"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.valuetuple/4.3.0"; + sha256 = "1227k7fxbxapq7dms4lvwwjdf3pr1jcsmhy2nzzhj6g6hs530hxn"; + }) +(fetchNuGet { + name = "microsoft.netframework.referenceassemblies.net472"; + version = "1.0.0-alpha-004"; + url = "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/microsoft.netframework.referenceassemblies.net472/1.0.0-alpha-004"; + sha256 = "08wa54dm7yskayzxivnwbm8sg1pf6ai8ccr64ixf9lyz3yw6y0nc"; + }) +(fetchNuGet { + name = "system.security.cryptography.algorithms"; + version = "4.3.0"; + url = "https://www.nuget.org/api/v2/package/system.security.cryptography.algorithms/4.3.0"; + sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; + }) +] diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/ninja/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/ninja/default.nix new file mode 100644 index 000000000000..bc5ad7744d68 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/ninja/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchFromGitHub, fetchpatch, python3, buildDocs ? true, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "ninja"; + version = "1.10.1"; + + src = fetchFromGitHub { + owner = "ninja-build"; + repo = "ninja"; + rev = "v${version}"; + sha256 = "1bmv7zfqwp48ga6vnqvy0gzkclv40xgq19q4ihl58r6cn4swccn3"; + }; + + nativeBuildInputs = [ python3 re2c ] ++ optionals buildDocs [ asciidoc docbook_xml_dtd_45 docbook_xsl libxslt.bin ]; + + buildPhase = '' + python configure.py --bootstrap + '' + optionalString buildDocs '' + # "./ninja -vn manual" output copied here to support cross compilation. + asciidoc -b docbook -d book -o build/manual.xml doc/manual.asciidoc + xsltproc --nonet doc/docbook.xsl build/manual.xml > doc/manual.html + ''; + + installPhase = '' + install -Dm555 -t $out/bin ninja + install -Dm444 misc/bash-completion $out/share/bash-completion/completions/ninja + install -Dm444 misc/zsh-completion $out/share/zsh/site-functions/_ninja + '' + optionalString buildDocs '' + install -Dm444 -t $out/share/doc/ninja doc/manual.asciidoc doc/manual.html + ''; + + setupHook = ./setup-hook.sh; + + meta = { + description = "Small build system with a focus on speed"; + longDescription = '' + Ninja is a small build system with a focus on speed. It differs from + other build systems in two major respects: it is designed to have its + input files generated by a higher-level build system, and it is designed + to run builds as fast as possible. + ''; + homepage = "https://ninja-build.org/"; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = with maintainers; [ thoughtpolice bjornfor orivej ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/ninja/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/ninja/setup-hook.sh new file mode 100644 index 000000000000..7d8087ad1342 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/ninja/setup-hook.sh @@ -0,0 +1,78 @@ +ninjaBuildPhase() { + runHook preBuild + + local buildCores=1 + + # Parallel building is enabled by default. + if [ "${enableParallelBuilding-1}" ]; then + buildCores="$NIX_BUILD_CORES" + fi + + local flagsArray=( + -j$buildCores -l$NIX_BUILD_CORES + $ninjaFlags "${ninjaFlagsArray[@]}" + ) + + echoCmd 'build flags' "${flagsArray[@]}" + ninja "${flagsArray[@]}" + + runHook postBuild +} + +if [ -z "${dontUseNinjaBuild-}" -a -z "${buildPhase-}" ]; then + buildPhase=ninjaBuildPhase +fi + +ninjaInstallPhase() { + runHook preInstall + + # shellcheck disable=SC2086 + local flagsArray=( + $ninjaFlags "${ninjaFlagsArray[@]}" + ${installTargets:-install} + ) + + echoCmd 'install flags' "${flagsArray[@]}" + ninja "${flagsArray[@]}" + + runHook postInstall +} + +if [ -z "${dontUseNinjaInstall-}" -a -z "${installPhase-}" ]; then + installPhase=ninjaInstallPhase +fi + +ninjaCheckPhase() { + runHook preCheck + + if [ -z "${checkTarget:-}" ]; then + if ninja -t query test >/dev/null 2>&1; then + checkTarget=test + fi + fi + + if [ -z "${checkTarget:-}" ]; then + echo "no test target found in ninja, doing nothing" + else + local buildCores=1 + + if [ "${enableParallelChecking-1}" ]; then + buildCores="$NIX_BUILD_CORES" + fi + + local flagsArray=( + -j$buildCores -l$NIX_BUILD_CORES + $ninjaFlags "${ninjaFlagsArray[@]}" + $checkTarget + ) + + echoCmd 'check flags' "${flagsArray[@]}" + ninja "${flagsArray[@]}" + fi + + runHook postCheck +} + +if [ -z "${dontUseNinjaCheck-}" -a -z "${checkPhase-}" ]; then + checkPhase=ninjaCheckPhase +fi diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/pants/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/pants/default.nix new file mode 100644 index 000000000000..9757d8cda8d1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/pants/default.nix @@ -0,0 +1,41 @@ +{ stdenv, pythonPackages }: + +with stdenv.lib; +with pythonPackages; + +buildPythonApplication rec { + pname = "pantsbuild.pants"; + version = "1.7.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1d7ff1383287c8e72f2c9855cfef982d362274a64e2707a93c070f988ba80a37"; + }; + + # No tests + doCheck = false; + + 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.22,>=2.5.0" + ''; + + # Unnecessary, and causes some really weird behavior around .class files, which + # this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520. + dontStrip = true; + + propagatedBuildInputs = [ + twitter-common-collections setproctitle ansicolors packaging pathspec + scandir twitter-common-dirutil psutil requests pystache pex docutils + markdown pygments twitter-common-confluence fasteners pywatchman + futures cffi subprocess32 contextlib2 faulthandler pyopenssl wheel + ]; + + meta = { + description = "A build system for software projects in a variety of languages"; + homepage = "https://www.pantsbuild.org/"; + license = licenses.asl20; + maintainers = with maintainers; [ copumpkin ]; + broken = true; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/qbs/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/qbs/default.nix new file mode 100644 index 000000000000..d4f94c1aed97 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/qbs/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, qmake, qtbase, qtscript }: + +stdenv.mkDerivation rec { + pname = "qbs"; + + version = "1.16.0"; + + src = fetchFromGitHub { + owner = "qbs"; + repo = "qbs"; + rev = "v${version}"; + sha256 = "1kg11s3figpkvgd85p0zk416s57gnvlzrz1isbc2lv13adidf041"; + }; + + nativeBuildInputs = [ qmake ]; + + qmakeFlags = [ "QBS_INSTALL_PREFIX=$(out)" "qbs.pro" ]; + + buildInputs = [ qtbase qtscript ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A tool that helps simplify the build process for developing projects across multiple platforms"; + homepage = "https://wiki.qt.io/Qbs"; + license = licenses.lgpl3; + maintainers = with maintainers; [ expipiplus1 ]; + platforms = platforms.linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/Gemfile b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/Gemfile new file mode 100644 index 000000000000..bd1ff6faa65c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'rake' diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/Gemfile.lock b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/Gemfile.lock new file mode 100644 index 000000000000..f89ceae93442 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/Gemfile.lock @@ -0,0 +1,13 @@ +GEM + remote: https://rubygems.org/ + specs: + rake (12.3.2) + +PLATFORMS + ruby + +DEPENDENCIES + rake + +BUNDLED WITH + 2.1.4 diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/default.nix new file mode 100644 index 000000000000..d2f0a264ba74 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/default.nix @@ -0,0 +1,17 @@ +{ lib, bundlerApp, bundlerUpdateScript }: + +bundlerApp { + pname = "rake"; + gemdir = ./.; + exes = [ "rake" ]; + + passthru.updateScript = bundlerUpdateScript "rake"; + + meta = with lib; { + description = "A software task management and build automation tool"; + homepage = "https://github.com/ruby/rake"; + license = with licenses; mit; + maintainers = with maintainers; [ manveru nicknovitski ]; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/gemset.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/gemset.nix new file mode 100644 index 000000000000..05a59cff850f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rake/gemset.nix @@ -0,0 +1,12 @@ +{ + rake = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1sy5a7nh6xjdc9yhcw31jji7ssrf9v5806hn95gbrzr998a2ydjn"; + type = "gem"; + }; + version = "12.3.2"; + }; +}
\ No newline at end of file diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar/default.nix new file mode 100644 index 000000000000..1c5996c6b1cf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, erlang }: + + +let + version = "2.6.4"; +in +stdenv.mkDerivation { + pname = "rebar"; + inherit version; + + src = fetchurl { + url = "https://github.com/rebar/rebar/archive/${version}.tar.gz"; + sha256 = "01xxq1f1vrwca00pky2van26hi2hhr05ghfhy71v5cifzax4cwjp"; + }; + + buildInputs = [ erlang ]; + + buildPhase = "escript bootstrap"; + installPhase = '' + mkdir -p $out/bin + cp rebar $out/bin/rebar + ''; + + meta = { + homepage = "https://github.com/rebar/rebar"; + description = "Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases"; + + longDescription = '' + rebar is a self-contained Erlang script, so it's easy to + distribute or even embed directly in a project. Where possible, + rebar uses standard Erlang/OTP conventions for project + structures, thus minimizing the amount of build configuration + work. rebar also provides dependency management, enabling + application writers to easily re-use common libraries from a + variety of locations (git, hg, etc). + ''; + + platforms = stdenv.lib.platforms.unix; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar3/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar3/default.nix new file mode 100644 index 000000000000..5c0fff134a7e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar3/default.nix @@ -0,0 +1,135 @@ +{ stdenv, fetchFromGitHub, + fetchHex, erlang, + tree }: + +let + version = "3.12.0"; + + erlware_commons = fetchHex { + pkg = "erlware_commons"; + version = "1.3.1"; + sha256 = "7aada93f368d0a0430122e39931b7fb4ac9e94dbf043cdc980ad4330fd9cd166"; + }; + ssl_verify_fun = fetchHex { + pkg = "ssl_verify_fun"; + version = "1.1.3"; + sha256 = "2e120e6505d6e9ededb2836611dfe2f7028432dc280957998e154307b5ea92fe"; + }; + certifi = fetchHex { + pkg = "certifi"; + version = "2.3.1"; + sha256 = "e12d667d042c11d130594bae2b0097e63836fe8b1e6d6b2cc48f8bb7a2cf7d68"; + }; + providers = fetchHex { + pkg = "providers"; + version = "1.7.0"; + sha256 = "8be66129ca85c2fa74efd8737cdaedd31c1c1af51dd2fd601495a6def4cae4a6"; + }; + getopt = fetchHex { + pkg = "getopt"; + version = "1.0.1"; + sha256 = "53e1ab83b9ceb65c9672d3e7a35b8092e9bdc9b3ee80721471a161c10c59959c"; + }; + bbmustache = fetchHex { + pkg = "bbmustache"; + version = "1.6.0"; + sha256 = "53e02d296512a57be03a98c91541b34d2ca64930268030b2d12364a0332015df"; + }; + relx = fetchHex { + pkg = "relx"; + version = "3.28.0"; + sha256 = "8afb871c0a2a27f0063d973903fc64d2207bc705ecc3607462920683d24ac7b5"; + }; + cf = fetchHex { + pkg = "cf"; + version = "0.2.2"; + sha256 = "08cvy7skn5d2k4manlx5k3anqgjdvajjhc5jwxbaszxw34q3na28"; + }; + cth_readable = fetchHex { + pkg = "cth_readable"; + version = "1.4.3"; + sha256 = "0wr0hba6ka74s3628jrrd7ynjdh7syxigkh7ildg8fgi20ab88fd"; + }; + eunit_formatters = fetchHex { + pkg = "eunit_formatters"; + version = "0.5.0"; + sha256 = "1jb3hzb216r29x2h4pcjwfmx1k81431rgh5v0mp4x5146hhvmj6n"; + }; + hex_core = fetchHex { + pkg = "hex_core"; + version = "0.4.0"; + sha256 = "8ace8c6cfa10df4cb8be876f42f7446890e124203c094cc7b4e7616fb8de5d7f"; + }; + parse_trans = fetchHex { + pkg = "parse_trans"; + version = "3.3.0"; + sha256 = "0q5r871bzx1a8fa06yyxdi3xkkp7v5yqazzah03d6yl3vsmn7vqp"; + }; + +in +stdenv.mkDerivation rec { + pname = "rebar3"; + inherit version erlang; + + src = fetchFromGitHub { + owner = "erlang"; + repo = pname; + rev = version; + sha256 = "0936ix7lfwsamssap58b265zid7x2m97azrr2qpjcln3xysd16lg"; + }; + + bootstrapper = ./rebar3-nix-bootstrap; + + buildInputs = [ erlang tree ]; + + postPatch = '' + mkdir -p _checkouts + mkdir -p _build/default/lib/ + + cp --no-preserve=mode -R ${erlware_commons} _checkouts/erlware_commons + cp --no-preserve=mode -R ${providers} _checkouts/providers + cp --no-preserve=mode -R ${getopt} _checkouts/getopt + cp --no-preserve=mode -R ${bbmustache} _checkouts/bbmustache + cp --no-preserve=mode -R ${certifi} _checkouts/certifi + cp --no-preserve=mode -R ${cf} _checkouts/cf + cp --no-preserve=mode -R ${cth_readable} _checkouts/cth_readable + cp --no-preserve=mode -R ${eunit_formatters} _checkouts/eunit_formatters + cp --no-preserve=mode -R ${relx} _checkouts/relx + cp --no-preserve=mode -R ${ssl_verify_fun} _checkouts/ssl_verify_fun + cp --no-preserve=mode -R ${hex_core} _checkouts/hex_core + cp --no-preserve=mode -R ${parse_trans} _checkouts/parse_trans + + # Bootstrap script expects the dependencies in _build/default/lib + # TODO: Make it accept checkouts? + for i in _checkouts/* ; do + ln -s $(pwd)/$i $(pwd)/_build/default/lib/ + done + ''; + + buildPhase = '' + HOME=. escript bootstrap + ''; + + installPhase = '' + mkdir -p $out/bin + cp rebar3 $out/bin/rebar3 + ''; + + meta = { + homepage = "https://github.com/rebar/rebar3"; + description = "Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases"; + + longDescription = '' + rebar is a self-contained Erlang script, so it's easy to distribute or + even embed directly in a project. Where possible, rebar uses standard + Erlang/OTP conventions for project structures, thus minimizing the amount + of build configuration work. rebar also provides dependency management, + enabling application writers to easily re-use common libraries from a + variety of locations (hex.pm, git, hg, and so on). + ''; + + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ gleber tazjin ]; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap new file mode 100755 index 000000000000..f1deed1df352 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap @@ -0,0 +1,267 @@ +#!/usr/bin/env escript +%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- +%%! -smp enable +%%% --------------------------------------------------------------------------- +%%% @doc +%%% The purpose of this command is to prepare a rebar3 project so that +%%% rebar3 understands that the dependencies are all already +%%% installed. If you want a hygienic build on nix then you must run +%%% this command before running rebar3. I suggest that you add a +%%% `Makefile` to your project and have the bootstrap command be a +%%% dependency of the build commands. See the nix documentation for +%%% more information. +%%% +%%% This command designed to have as few dependencies as possible so +%%% that it can be a dependency of root level packages like rebar3. To +%%% that end it does many things in a fairly simplistic way. That is +%%% by design. +%%% +%%% ### Assumptions +%%% +%%% This command makes the following assumptions: +%%% +%%% * It is run in a nix-shell or nix-build environment +%%% * that all dependencies have been added to the ERL_LIBS +%%% Environment Variable + +-record(data, {version + , debug_info = false + , compile_ports + , erl_libs + , plugins + , root + , name}). + +-define(HEX_REGISTRY_PATH, ".cache/rebar3/hex/default/registry"). + +main(Args) -> + {ok, ArgData} = parse_args(Args), + {ok, RequiredData} = gather_required_data_from_the_environment(ArgData), + do_the_bootstrap(RequiredData). + +-spec do_the_bootstrap(#data{}) -> ok. +do_the_bootstrap(RequiredData) -> + ok = bootstrap_configs(RequiredData), + ok = bootstrap_plugins(RequiredData), + ok = bootstrap_libs(RequiredData). + +%% @doc +%% Argument parsing is super simple only because we want to keep the +%% dependencies minimal. For now there can be one entry on the +%% command line: "debug-info" +-spec parse_args([string()]) -> #data{}. +parse_args(Args0) -> + PossibleArgs = sets:from_list(["debug-info"]), + Args1 = sets:from_list(Args0), + Result = sets:subtract(Args1, PossibleArgs), + case sets:to_list(Result) of + [] -> + {ok, #data{debug_info = sets:is_element("debug-info", Args1)}}; + UnknownArgs -> + io:format("Unexpected command line arguments passed in: ~p~n", + [UnknownArgs]), + erlang:halt(120) + end. + + +-spec bootstrap_configs(#data{}) -> ok. +bootstrap_configs(RequiredData)-> + io:format("Boostrapping app and rebar configurations~n"), + ok = if_single_app_project_update_app_src_version(RequiredData), + ok = if_compile_ports_add_pc_plugin(RequiredData), + ok = if_debug_info_add(RequiredData). + +-spec bootstrap_plugins(#data{}) -> ok. +bootstrap_plugins(#data{plugins = Plugins}) -> + io:format("Bootstrapping rebar3 plugins~n"), + Target = "_build/default/plugins/", + Paths = string:tokens(Plugins, " "), + CopiableFiles = + lists:foldl(fun(Path, Acc) -> + gather_dependency(Path) ++ Acc + end, [], Paths), + lists:foreach(fun (Path) -> + ok = link_app(Path, Target) + end, CopiableFiles). + +-spec bootstrap_libs(#data{}) -> ok. +bootstrap_libs(#data{erl_libs = ErlLibs}) -> + io:format("Bootstrapping dependent libraries~n"), + Target = "_build/default/lib/", + Paths = string:tokens(ErlLibs, ":"), + CopiableFiles = + lists:foldl(fun(Path, Acc) -> + gather_directory_contents(Path) ++ Acc + end, [], Paths), + lists:foreach(fun (Path) -> + ok = link_app(Path, Target) + end, CopiableFiles). + +-spec gather_dependency(string()) -> [{string(), string()}]. +gather_dependency(Path) -> + FullLibrary = filename:join(Path, "lib/erlang/lib/"), + case filelib:is_dir(FullLibrary) of + true -> + gather_directory_contents(FullLibrary); + false -> + [raw_hex(Path)] + end. + +-spec raw_hex(string()) -> {string(), string()}. +raw_hex(Path) -> + [_, Name] = re:split(Path, "-hex-source-"), + {Path, erlang:binary_to_list(Name)}. + +-spec gather_directory_contents(string()) -> [{string(), string()}]. +gather_directory_contents(Path) -> + {ok, Names} = file:list_dir(Path), + lists:map(fun(AppName) -> + {filename:join(Path, AppName), fixup_app_name(AppName)} + end, Names). + +%% @doc +%% Makes a symlink from the directory pointed at by Path to a +%% directory of the same name in Target. So if we had a Path of +%% {`foo/bar/baz/bash`, `baz`} and a Target of `faz/foo/foos`, the symlink +%% would be `faz/foo/foos/baz`. +-spec link_app({string(), string()}, string()) -> ok. +link_app({Path, TargetFile}, TargetDir) -> + Target = filename:join(TargetDir, TargetFile), + make_symlink(Path, Target). + +-spec make_symlink(string(), string()) -> ok. +make_symlink(Path, TargetFile) -> + file:delete(TargetFile), + ok = filelib:ensure_dir(TargetFile), + io:format("Making symlink from ~s to ~s~n", [Path, TargetFile]), + ok = file:make_symlink(Path, TargetFile). + +%% @doc +%% This takes an app name in the standard OTP <name>-<version> format +%% and returns just the app name. Why? Because rebar doesn't +%% respect OTP conventions in some cases. +-spec fixup_app_name(string()) -> string(). +fixup_app_name(FileName) -> + case string:tokens(FileName, "-") of + [Name] -> Name; + [Name, _Version] -> Name; + [Name, _Version, _Tag] -> Name + end. + +-spec gather_required_data_from_the_environment(#data{}) -> {ok, #data{}}. +gather_required_data_from_the_environment(ArgData) -> + {ok, ArgData#data{ version = guard_env("version") + , erl_libs = get_env("ERL_LIBS", []) + , plugins = get_env("buildPlugins", []) + , root = code:root_dir() + , name = guard_env("name") + , compile_ports = nix2bool(get_env("compilePorts", ""))}}. + +-spec nix2bool(any()) -> boolean(). +nix2bool("1") -> + true; +nix2bool("") -> + false. + +get_env(Name) -> + os:getenv(Name). +get_env(Name, Def) -> + case get_env(Name) of + false -> Def; + Val -> Val + end. + +-spec guard_env(string()) -> string(). +guard_env(Name) -> + case get_env(Name) of + false -> + stderr("Expected Environment variable ~s! Are you sure you are " + "running in a Nix environment? Either a nix-build, " + "nix-shell, etc?~n", [Name]), + erlang:halt(1); + Variable -> + Variable + end. + +%% @doc +%% If debug info is set we need to add debug info to the list of compile options +%% +-spec if_debug_info_add(#data{}) -> ok. +if_debug_info_add(#data{debug_info = true}) -> + ConfigTerms = add_debug_info(read_rebar_config()), + Text = lists:map(fun(Term) -> io_lib:format("~tp.~n", [Term]) end, + ConfigTerms), + file:write_file("rebar.config", Text); +if_debug_info_add(_) -> + ok. + +-spec add_debug_info([term()]) -> [term()]. +add_debug_info(Config) -> + ExistingOpts = case lists:keysearch(erl_opts, 1, Config) of + {value, {erl_opts, ExistingOptsList}} -> ExistingOptsList; + _ -> [] + end, + case lists:member(debug_info, ExistingOpts) of + true -> + Config; + false -> + lists:keystore(erl_opts, 1, Config, + {erl_opts, [debug_info | ExistingOpts]}) + end. + + +%% @doc +%% If the compile ports flag is set, rewrite the rebar config to +%% include the 'pc' plugin. +-spec if_compile_ports_add_pc_plugin(#data{}) -> ok. +if_compile_ports_add_pc_plugin(#data{compile_ports = true}) -> + ConfigTerms = add_pc_to_plugins(read_rebar_config()), + Text = lists:map(fun(Term) -> io_lib:format("~tp.~n", [Term]) end, + ConfigTerms), + file:write_file("rebar.config", Text); +if_compile_ports_add_pc_plugin(_) -> + ok. + +-spec add_pc_to_plugins([term()]) -> [term()]. +add_pc_to_plugins(Config) -> + PluginList = case lists:keysearch(plugins, 1, Config) of + {value, {plugins, ExistingPluginList}} -> ExistingPluginList; + _ -> [] + end, + lists:keystore(plugins, 1, Config, {plugins, [pc | PluginList]}). + +-spec read_rebar_config() -> [term()]. +read_rebar_config() -> + case file:consult("rebar.config") of + {ok, Terms} -> + Terms; + _ -> + stderr("Unable to read rebar config!", []), + erlang:halt(1) + end. + + +-spec if_single_app_project_update_app_src_version(#data{}) -> ok. +if_single_app_project_update_app_src_version(#data{name = Name, + version = Version}) -> + SrcFile = filename:join("src", + lists:concat([Name, ".app.src"])), + + case filelib:is_file(SrcFile) of + true -> + update_app_src_with_version(SrcFile, Version); + false -> + ok + end. + +-spec update_app_src_with_version(string(), string()) -> ok. +update_app_src_with_version(SrcFile, Version) -> + {ok, [{application, Name, Details}]} = file:consult(SrcFile), + NewDetails = lists:keyreplace(vsn, 1, Details, {vsn, Version}), + ok = file:write_file(SrcFile, io_lib:fwrite("~p.\n", [{application, Name, NewDetails}])). + +%% @doc +%% Write the result of the format string out to stderr. +-spec stderr(string(), [term()]) -> ok. +stderr(FormatStr, Args) -> + io:put_chars(standard_error, io_lib:format(FormatStr, Args)). diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-apenwarr/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-apenwarr/default.nix new file mode 100644 index 000000000000..c62fb0f2515d --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-apenwarr/default.nix @@ -0,0 +1,73 @@ +{ stdenv, lib, python3, fetchFromGitHub, which, findutils, coreutils +, perl, installShellFiles +, doCheck ? true +}: stdenv.mkDerivation rec { + + pname = "redo-apenwarr"; + version = "0.42c"; + + src = fetchFromGitHub rec { + owner = "apenwarr"; + repo = "redo"; + rev = "${repo}-${version}"; + sha256 = "0kc2gag1n5583195gs38gjm8mb7in9y70c07fxibsay19pvvb8iw"; + }; + + postPatch = '' + + patchShebangs minimal/do + + '' + lib.optionalString doCheck '' + unset CC CXX + + substituteInPlace minimal/do.test \ + --replace "/bin/pwd" "${coreutils}/bin/pwd" + + substituteInPlace t/105-sympath/all.do \ + --replace "/bin/pwd" "${coreutils}/bin/pwd" + + substituteInPlace t/all.do \ + --replace "/bin/ls" "ls" + + substituteInPlace t/110-compile/hello.o.do \ + --replace "/usr/include" "${stdenv.lib.getDev stdenv.cc.libc}/include" + + substituteInPlace t/200-shell/nonshelltest.do \ + --replace "/usr/bin/env perl" "${perl}/bin/perl" + + ''; + + inherit doCheck; + + checkTarget = "test"; + + outputs = [ "out" "man" ]; + + installFlags = [ + "PREFIX=$(out)" + "DESTDIR=/" + ]; + + nativeBuildInputs = [ + python3 + (with python3.pkgs; [ beautifulsoup4 markdown ]) + which + findutils + installShellFiles + ]; + + postInstall = '' + installShellCompletion --bash contrib/bash_completion.d/redo + ''; + + meta = with lib; { + description = "Smaller, easier, more powerful, and more reliable than make. An implementation of djb's redo"; + homepage = "https://github.com/apenwarr/redo"; + maintainers = with maintainers; [ + andrewchambers + ck3d + ]; + license = licenses.asl20; + platforms = python3.meta.platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-c/Makefile b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-c/Makefile new file mode 100644 index 000000000000..f2c43cc5003c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-c/Makefile @@ -0,0 +1,10 @@ +CFLAGS=-Os + +all: redo links + +links: + sh links.do + +install: + mkdir -p "$(out)/bin" + cp --no-dereference redo redo-* "$(out)/bin" diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-c/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-c/default.nix new file mode 100644 index 000000000000..1480f32a50f3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-c/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub }: +stdenv.mkDerivation rec { + pname = "redo-c"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "leahneukirchen"; + repo = pname; + rev = "v${version}"; + sha256 = "11wc2sgw1ssdm83cjdc6ndnp1bv5mzhbw7njw47mk7ri1ic1x51b"; + }; + + postPatch = '' + cp '${./Makefile}' Makefile + ''; + + meta = with stdenv.lib; { + description = "An implementation of the redo build system in portable C with zero dependencies"; + homepage = "https://github.com/leahneukirchen/redo-c"; + license = licenses.cc0; + platforms = platforms.all; + maintainers = with maintainers; [ ck3d ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-sh/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-sh/default.nix new file mode 100644 index 000000000000..315b74b820e5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo-sh/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, makeWrapper, coreutils }: + +stdenv.mkDerivation { + version = "4.0.3"; + pname = "redo-sh"; + + src = fetchurl { + url = "http://news.dieweltistgarnichtso.net/bin/archives/redo-sh.tar.gz"; + sha256 = "1n84ld4fihqa7a6kn3f177dknz89qcvissfwz1m21bwdq950avia"; + }; + + buildInputs = [ makeWrapper ]; + + sourceRoot = "."; + installPhase = '' + mkdir -p "$out/share" + mv man "$out/share" + mv bin "$out" + for p in $out/bin/*; do + wrapProgram "$p" --prefix PATH : "$out/bin:${coreutils}/bin" + done + ''; + + meta = with stdenv.lib; { + description = "Redo implementation in Bourne Shell"; + homepage = "http://news.dieweltistgarnichtso.net/bin/redo-sh.html"; + license = licenses.agpl3; + platforms = platforms.unix; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo/default.nix new file mode 100644 index 000000000000..a735a05dc5b8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/redo/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, perl }: + +stdenv.mkDerivation rec { + name = "redo-1.4"; + src = fetchurl { + url = "https://jdebp.eu./Repository/freebsd/${name}.tar.gz"; + sha256 = "1c8gr5h77v4fw78zkhbm9z9adqs3kd7xvxwnmci2zvlf4bqqk4jv"; + }; + + nativeBuildInputs = [ perl /* for pod2man */ ]; + + sourceRoot = "."; + + buildPhase = '' + ./package/compile + ''; + installPhase = '' + ./package/export $out/ + ''; + + meta = { + homepage = "https://jdebp.eu./Softwares/redo/"; + description = "A system for building target files from source files"; + license = stdenv.lib.licenses.bsd2; + maintainers = [ stdenv.lib.maintainers.vrthra ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/remake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/remake/default.nix new file mode 100644 index 000000000000..7d44bc74df8a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/remake/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, readline }: + +stdenv.mkDerivation rec { + pname = "remake"; + remakeVersion = "4.1"; + dbgVersion = "1.1"; + version = "${remakeVersion}+dbg-${dbgVersion}"; + + src = fetchurl { + url = "mirror://sourceforge/project/bashdb/remake/${version}/remake-${remakeVersion}+dbg${dbgVersion}.tar.bz2"; + sha256 = "1zi16pl7sqn1aa8b7zqm9qnd9vjqyfywqm8s6iap4clf86l7kss2"; + }; + + patches = [ + ./glibc-2.27-glob.patch + ]; + + buildInputs = [ readline ]; + + meta = { + homepage = "http://bashdb.sourceforge.net/remake/"; + license = stdenv.lib.licenses.gpl3; + description = "GNU Make with comprehensible tracing and a debugger"; + platforms = with stdenv.lib.platforms; linux ++ darwin; + maintainers = with stdenv.lib.maintainers; [ bjornfor ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/remake/glibc-2.27-glob.patch b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/remake/glibc-2.27-glob.patch new file mode 100644 index 000000000000..ef876e2fb237 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/remake/glibc-2.27-glob.patch @@ -0,0 +1,34 @@ +diff --git a/glob/glob.c b/glob/glob.c +index f3911bcd861..6cb76e8e162 100644 +--- a/glob/glob.c ++++ b/glob/glob.c +@@ -208,29 +208,8 @@ my_realloc (p, n) + #endif /* __GNU_LIBRARY__ || __DJGPP__ */ + + +-#if !defined __alloca && !defined __GNU_LIBRARY__ +- +-# ifdef __GNUC__ +-# undef alloca +-# define alloca(n) __builtin_alloca (n) +-# else /* Not GCC. */ +-# ifdef HAVE_ALLOCA_H +-# include <alloca.h> +-# else /* Not HAVE_ALLOCA_H. */ +-# ifndef _AIX +-# ifdef WINDOWS32 +-# include <malloc.h> +-# else +-extern char *alloca (); +-# endif /* WINDOWS32 */ +-# endif /* Not _AIX. */ +-# endif /* sparc or HAVE_ALLOCA_H. */ +-# endif /* GCC. */ +- + # define __alloca alloca + +-#endif +- + #ifndef __GNU_LIBRARY__ + # define __stat stat + # ifdef STAT_MACROS_BROKEN diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rocm-cmake/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rocm-cmake/default.nix new file mode 100644 index 000000000000..ae2e63e040b1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/rocm-cmake/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "rocm-cmake"; + version = "3.8.0"; + + src = fetchFromGitHub { + owner = "RadeonOpenCompute"; + repo = "rocm-cmake"; + rev = "rocm-${version}"; + sha256 = "1x1mj1acarhin319zycms8sqm9ylw2mcdbkpqjlb8yfsgiaa99ja"; + }; + + nativeBuildInputs = [ cmake ]; + + meta = with stdenv.lib; { + description = "CMake modules for common build tasks for the ROCm stack"; + homepage = "https://github.com/RadeonOpenCompute/rocm-cmake"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + platforms = platforms.linux; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/samurai/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/samurai/default.nix new file mode 100644 index 000000000000..f8b649e04093 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/samurai/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "samurai"; + version = "1.1"; + + src = fetchFromGitHub { + owner = "michaelforney"; + repo = pname; + rev = version; + sha256 = "0k0amxpi3v9v68a8vc69r4b86xs12vhzm0wxd7f11vap1pnqz2cz"; + }; + + makeFlags = [ "DESTDIR=" "PREFIX=${placeholder "out"}" ]; + + meta = with stdenv.lib; { + description = "ninja-compatible build tool written in C"; + homepage = "https://github.com/michaelforney/samurai"; + license = with licenses; [ mit asl20 ]; # see LICENSE + maintainers = with maintainers; [ dtzWill ]; + }; +} + diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt-extras/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt-extras/default.nix new file mode 100644 index 000000000000..49d18d9e8575 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt-extras/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, which, curl, makeWrapper, jdk }: + +let + rev = "1e9230f35879ce23cbd8d16add07d2134fd479c9"; + version = "2020-09-24"; +in +stdenv.mkDerivation { + name = "sbt-extras-${version}"; + inherit version; + + src = fetchFromGitHub { + owner = "paulp"; + repo = "sbt-extras"; + inherit rev; + sha256 = "1k6vknjjbhr5jfpiyh2yzayn2ziqi1bb862l1q2786q59161ij3j"; + }; + + dontBuild = true; + + buildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin + + substituteInPlace bin/sbt --replace 'declare java_cmd="java"' 'declare java_cmd="${jdk}/bin/java"' + + install bin/sbt $out/bin + + wrapProgram $out/bin/sbt --prefix PATH : ${stdenv.lib.makeBinPath [ which curl ]} + ''; + + meta = { + description = "A more featureful runner for sbt, the simple/scala/standard build tool"; + homepage = "https://github.com/paulp/sbt-extras"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ puffnfresh ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt/default.nix new file mode 100644 index 000000000000..2ff15d68871a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, jre, autoPatchelfHook, zlib }: + +stdenv.mkDerivation rec { + pname = "sbt"; + version = "1.4.0"; + + src = fetchurl { + url = + "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz"; + sha256 = "1mgfs732w1c1p7dna7h47x8h073lvjs224fqlpkkvq10153mnxxl"; + }; + + patchPhase = '' + echo -java-home ${jre.home} >>conf/sbtopts + ''; + + nativeBuildInputs = stdenv.lib.optionals stdenv.isLinux [ autoPatchelfHook ]; + + buildInputs = stdenv.lib.optionals stdenv.isLinux [ zlib ]; + + installPhase = '' + mkdir -p $out/share/sbt $out/bin + cp -ra . $out/share/sbt + ln -sT ../share/sbt/bin/sbt $out/bin/sbt + ln -sT ../share/sbt/bin/sbtn-x86_64-${ + if (stdenv.isDarwin) then "apple-darwin" else "pc-linux" + } $out/bin/sbtn + ''; + + meta = with stdenv.lib; { + homepage = "https://www.scala-sbt.org/"; + license = licenses.bsd3; + description = "A build tool for Scala, Java and more"; + maintainers = with maintainers; [ nequissimus ]; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt/scala-native.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt/scala-native.nix new file mode 100644 index 000000000000..70038ed2d3a4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/sbt/scala-native.nix @@ -0,0 +1,18 @@ +{ lib, sbt, makeWrapper, boehmgc, libunwind, re2, llvmPackages, zlib }: + +sbt.overrideDerivation(old: { + nativeBuildInputs = [ makeWrapper ]; + + version = "0.13.16"; + + sha256 = "033nvklclvbirhpsiy28d3ccmbm26zcs9vb7j8jndsc1ln09awi2"; + + postFixup = '' + wrapProgram $out/bin/sbt \ + --set CLANG_PATH "${llvmPackages.clang}/bin/clang" \ + --set CLANGPP_PATH "${llvmPackages.clang}/bin/clang" \ + --set CPATH "${lib.makeSearchPathOutput "dev" "include" [ re2 zlib boehmgc libunwind llvmPackages.libcxxabi llvmPackages.libcxx ]}/c++/v1" \ + --set LIBRARY_PATH "${lib.makeLibraryPath [ re2 zlib boehmgc libunwind llvmPackages.libcxxabi llvmPackages.libcxx ]}" \ + --set NIX_CFLAGS_LINK "-lc++abi -lc++" + ''; +}) diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/common.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/common.nix new file mode 100644 index 000000000000..7a15c193423c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/common.nix @@ -0,0 +1,40 @@ +{ version, sha256 }: + +{ stdenv, fetchurl, python3Packages, lib }: + +python3Packages.buildPythonApplication rec { + pname = "scons"; + inherit version; + + src = fetchurl { + url = "mirror://sourceforge/scons/${pname}-${version}.tar.gz"; + inherit sha256; + }; + + setupHook = ./setup-hook.sh; + + postPatch = lib.optionalString (lib.versionAtLeast version "4.0.0") '' + substituteInPlace setup.cfg \ + --replace "build/dist" "dist" + ''; + + # The release tarballs don't contain any tests (runtest.py and test/*): + doCheck = lib.versionOlder version "4.0.0"; + + meta = with stdenv.lib; { + description = "An improved, cross-platform substitute for Make"; + longDescription = '' + SCons is an Open Source software construction tool. Think of + SCons as an improved, cross-platform substitute for the classic + Make utility with integrated functionality similar to + autoconf/automake and compiler caches such as ccache. In short, + SCons is an easier, more reliable and faster way to build + software. + ''; + homepage = "https://scons.org/"; + changelog = "https://raw.githubusercontent.com/SConsProject/scons/rel_${version}/src/CHANGES.txt"; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.primeos ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/default.nix new file mode 100644 index 000000000000..eb86d5955971 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/default.nix @@ -0,0 +1,18 @@ +{ callPackage, python2Packages }: + +let + mkScons = args: callPackage (import ./common.nix args) { }; +in { + scons_3_0_1 = (mkScons { + version = "3.0.1"; + sha256 = "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"; + }).override { python3Packages = python2Packages; }; + scons_3_1_2 = (mkScons { + version = "3.1.2"; + sha256 = "1yzq2gg9zwz9rvfn42v5jzl3g4qf1khhny6zfbi2hib55zvg60bq"; + }).override { python3Packages = python2Packages; }; + scons_latest = mkScons { + version = "4.0.1"; + sha256 = "0z00l9wzaiqyjq0hapbvsjclvcfjjjq04kmxi7ffq966nl2d2bkj"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/setup-hook.sh new file mode 100644 index 000000000000..0b908f68286b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/scons/setup-hook.sh @@ -0,0 +1,84 @@ +sconsBuildPhase() { + runHook preBuild + + if [ -n "$prefix" ]; then + mkdir -p "$prefix" + fi + + if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then + buildFlags="${prefixKey:-prefix=}$prefix $buildFlags" + fi + + local flagsArray=( + ${enableParallelBuilding:+-j${NIX_BUILD_CORES}} + $sconsFlags ${sconsFlagsArray[@]} + $buildFlags ${buildFlagsArray[@]} + ) + + echoCmd 'build flags' "${flagsArray[@]}" + scons "${flagsArray[@]}" + + runHook postBuild +} + +sconsInstallPhase() { + runHook preInstall + + if [ -n "$prefix" ]; then + mkdir -p "$prefix" + fi + + if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then + installFlags="${prefixKey:-prefix=}$prefix $installFlags" + fi + + local flagsArray=( + $sconsFlags ${sconsFlagsArray[@]} + $installFlags ${installFlagsArray[@]} + ${installTargets:-install} + ) + + echoCmd 'install flags' "${flagsArray[@]}" + scons "${flagsArray[@]}" + + runHook postInstall +} + +sconsCheckPhase() { + runHook preCheck + + if [ -z "${checkTarget:-}" ]; then + if scons -n check >/dev/null 2>&1; then + checkTarget=check + elif scons -n test >/dev/null 2>&1; then + checkTarget=test + fi + fi + + if [ -z "${checkTarget:-}" ]; then + echo "no check/test target found, doing nothing" + else + local flagsArray=( + ${enableParallelChecking:+-j${NIX_BUILD_CORES}} + $sconsFlags ${sconsFlagsArray[@]} + ${checkFlagsArray[@]} + ) + + echoCmd 'check flags' "${flagsArray[@]}" + scons "${flagsArray[@]}" + fi + + runHook postCheck +} + +if [ -z "${buildPhase-}" ]; then + buildPhase=sconsBuildPhase +fi + +if [ -z "${dontUseSconsInstall-}" -a -z "${installPhase-}" ]; then + installPhase=sconsInstallPhase +fi + +if [ -z "${checkPhase-}" ]; then + checkPhase=sconsCheckPhase +fi diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/shards/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/shards/default.nix new file mode 100644 index 000000000000..53bc057fc131 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/shards/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, crystal }: + +crystal.buildCrystalPackage rec { + pname = "shards"; + version = "0.10.0"; + + src = fetchFromGitHub { + owner = "crystal-lang"; + repo = "shards"; + rev = "v${version}"; + sha256 = "1bjy3hcdqq8769bx73f3pwn26rnkj23dngyfbw4iv32bw23x1d49"; + }; + + # we cannot use `make` here as it would introduce a dependency on itself + format = "crystal"; + + shardsFile = ./shards.nix; + + crystalBinaries.shards.src = "./src/shards.cr"; + + # tries to execute git which fails spectacularly + doCheck = false; + + meta = with stdenv.lib; { + description = "Dependency manager for the Crystal language"; + license = licenses.asl20; + maintainers = with maintainers; [ peterhoeg ]; + inherit (crystal.meta) homepage platforms; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/shards/shards.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/shards/shards.nix new file mode 100644 index 000000000000..901b7f6e47d1 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/shards/shards.nix @@ -0,0 +1,8 @@ +{ + molinillo = { + owner = "crystal-lang"; + repo = "crystal-molinillo"; + rev = "v0.1.0"; + sha256 = "0rs0w59m6ccsgkdxfy3xv6alxsziy9sy9smz71cz0dnyvlzlnaxj"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/tup/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/tup/default.nix new file mode 100644 index 000000000000..80ee38105ca5 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/tup/default.nix @@ -0,0 +1,57 @@ +{ stdenv, fetchFromGitHub, fuse, pkgconfig, pcre }: + +stdenv.mkDerivation rec { + pname = "tup"; + version = "0.7.9"; + + src = fetchFromGitHub { + owner = "gittup"; + repo = "tup"; + rev = "v${version}"; + sha256 = "1b9rllwfdmjvfmwvzqfbqfi1flf4y9zzjmyp0dizq23gpkvhi42f"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ fuse pcre ]; + + configurePhase = '' + sed -i 's/`git describe`/v${version}/g' src/tup/link.sh + sed -i 's/pcre-confg/pkg-config pcre/g' Tupfile Tuprules.tup + ''; + + # Regular tup builds require fusermount to have suid, which nix cannot + # currently provide in a build environment, so we bootstrap and use 'tup + # generate' instead + buildPhase = '' + ./build.sh + ./build/tup init + ./build/tup generate script.sh + ./script.sh + ''; + + installPhase = '' + mkdir -p $out/bin + cp tup $out/bin/ + + mkdir -p $out/share/man/man1 + cp tup.1 $out/share/man/man1/ + ''; + + setupHook = ./setup-hook.sh; + + meta = with stdenv.lib; { + description = "A fast, file-based build system"; + longDescription = '' + Tup is a file-based build system for Linux, OSX, and Windows. It inputs a list + of file changes and a directed acyclic graph (DAG), then processes the DAG to + execute the appropriate commands required to update dependent files. Updates are + performed with very little overhead since tup implements powerful build + algorithms to avoid doing unnecessary work. This means you can stay focused on + your project rather than on your build system. + ''; + homepage = "http://gittup.org/tup/"; + license = licenses.gpl2; + maintainers = with maintainers; [ ehmry ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/tup/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/tup/setup-hook.sh new file mode 100644 index 000000000000..5bf64ae59d35 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/tup/setup-hook.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +tupConfigurePhase() { + runHook preConfigure + + echo -n CONFIG_TUP_ARCH= >> tup.config + case "$system" in + "i686-*") echo i386 >> tup.config;; + "x86_64-*") echo x86_64 >> tup.config;; + "powerpc-*") echo powerpc >> tup.config;; + "powerpc64-*") echo powerpc64 >> tup.config;; + "ia64-*") echo ia64 >> tup.config;; + "alpha-*") echo alpha >> tup.config;; + "sparc-*") echo sparc >> tup.config;; + "aarch64-*") echo arm64 >> tup.config;; + "arm*") echo arm >> tup.config;; + esac + + echo "${tupConfig-}" >> tup.config + + tup init + tup generate tupBuild.sh + + runHook postConfigure +} + +if [ -z "${dontUseTupConfigure-}" -a -z "${configurePhase-}" ]; then + configurePhase=tupConfigurePhase +fi + + +tupBuildPhase() { + runHook preBuild + + pushd . + . tupBuild.sh + popd + + runHook postBuild +} + +if [ -z "${dontUseTupBuild-}" -a -z "${buildPhase-}" ]; then + buildPhase=tupBuildPhase +fi diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/waf/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/waf/default.nix new file mode 100644 index 000000000000..49aae7c30140 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/waf/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitLab, python, ensureNewerSourcesForZipFilesHook +# optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]` +, withTools ? null +}: +let + wafToolsArg = with stdenv.lib.strings; + optionalString (!isNull withTools) " --tools=\"${concatStringsSep "," withTools}\""; +in +stdenv.mkDerivation rec { + pname = "waf"; + version = "2.0.20"; + + src = fetchFromGitLab { + owner = "ita1024"; + repo = "waf"; + rev = "${pname}-${version}"; + sha256 = "1xbd1lmchq9pdrplkr2db28xqafyw753qbhnrfn8pxdg3inxxqvq"; + }; + + buildInputs = [ python ensureNewerSourcesForZipFilesHook ]; + + configurePhase = '' + python waf-light configure + ''; + buildPhase = '' + python waf-light build${wafToolsArg} + ''; + installPhase = '' + install -D waf $out/bin/waf + ''; + + meta = with stdenv.lib; { + description = "Meta build system"; + homepage = "https://waf.io"; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = with maintainers; [ vrthra ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/wafHook/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/wafHook/default.nix new file mode 100644 index 000000000000..4184bd5fe8cd --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/wafHook/default.nix @@ -0,0 +1,10 @@ +{ lib, stdenv, pkgs, python, makeSetupHook, waf }: + +makeSetupHook { + deps = [ python ]; + substitutions = { + inherit waf; + crossFlags = lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) + ''--cross-compile "--cross-execute=${stdenv.targetPlatform.emulator pkgs}"''; + }; +} ./setup-hook.sh diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/wafHook/setup-hook.sh b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/wafHook/setup-hook.sh new file mode 100644 index 000000000000..439350c3abc2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/build-managers/wafHook/setup-hook.sh @@ -0,0 +1,75 @@ +wafConfigurePhase() { + runHook preConfigure + + if ! [ -f "${wafPath:=./waf}" ]; then + echo "copying waf to $wafPath..." + cp @waf@/bin/waf "$wafPath" + fi + + if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then + wafConfigureFlags="${prefixKey:---prefix=}$prefix $wafConfigureFlags" + fi + + local flagsArray=( + "${flagsArray[@]}" + $wafConfigureFlags "${wafConfigureFlagsArray[@]}" + ${configureTargets:-configure} + ) + if [ -z "${dontAddWafCrossFlags:-}" ]; then + flagsArray+=(@crossFlags@) + fi + echoCmd 'configure flags' "${flagsArray[@]}" + python "$wafPath" "${flagsArray[@]}" + + runHook postConfigure +} + +if [ -z "${dontUseWafConfigure-}" -a -z "${configurePhase-}" ]; then + configurePhase=wafConfigurePhase +fi + +wafBuildPhase () { + runHook preBuild + + # set to empty if unset + : ${wafFlags=} + + local flagsArray=( + ${enableParallelBuilding:+-j ${NIX_BUILD_CORES}} + $wafFlags ${wafFlagsArray[@]} + $buildFlags ${buildFlagsArray[@]} + ${buildTargets:-build} + ) + + echoCmd 'build flags' "${flagsArray[@]}" + python "$wafPath" "${flagsArray[@]}" + + runHook postBuild +} + +if [ -z "${dontUseWafBuild-}" -a -z "${buildPhase-}" ]; then + buildPhase=wafBuildPhase +fi + +wafInstallPhase() { + runHook preInstall + + if [ -n "$prefix" ]; then + mkdir -p "$prefix" + fi + + local flagsArray=( + $wafFlags ${wafFlagsArray[@]} + $installFlags ${installFlagsArray[@]} + ${installTargets:-install} + ) + + echoCmd 'install flags' "${flagsArray[@]}" + python "$wafPath" "${flagsArray[@]}" + + runHook postInstall +} + +if [ -z "${dontUseWafInstall-}" -a -z "${installPhase-}" ]; then + installPhase=wafInstallPhase +fi |