Merge branch 'master' into staging-next

Hydra nixpkgs: ?compare=1527134
This commit is contained in:
Vladimír Čunát
2019-06-25 14:04:12 +02:00
100 changed files with 7864 additions and 623 deletions

View File

@@ -109,17 +109,17 @@ in {
#<generated>
# DO NOT EDIT! Automatically generated by ./update.py
radare2 = generic {
version_commit = "21875";
gittap = "3.5.1";
gittip = "4ec482ba2d4f554beeafb3aa47758e970bcab937";
rev = "3.5.1";
version = "3.5.1";
sha256 = "1vpk5brxs5p4vj02vr0mp0wdily03c3shbyrqz6m85nbxdjhkcd8";
version_commit = "22227";
gittap = "3.6.0";
gittip = "ff3bb6e3b2e6a519b4c975d05758c171a5186389";
rev = "3.6.0";
version = "3.6.0";
sha256 = "0vp94qzznqv87vvjbyyj6swkm6gl7byqvb1jv23i8i42zi5n7qmd";
cs_ver = "4.0.1";
cs_sha256 = "0ijwxxk71nr9z91yxw20zfj4bbsbrgvixps5c7cpj163xlzlwba6";
};
r2-for-cutter = generic {
version_commit = "21875";
version_commit = "22227";
gittap = "3.3.0";
gittip = "5a9127d2599c8ff61d8544be7d4c9384402e94a3";
rev = "5a9127d2599c8ff61d8544be7d4c9384402e94a3";

View File

@@ -2,7 +2,7 @@
# this package (through the fixpoint glass)
, bazel
, lr, xe, zip, unzip, bash, writeCBin, coreutils
, which, python, gawk, gnused, gnutar, gnugrep, gzip, findutils
, which, gawk, gnused, gnutar, gnugrep, gzip, findutils
# updater
, python3, writeScript
# Apple dependencies
@@ -14,38 +14,41 @@
# Always assume all markers valid (don't redownload dependencies).
# Also, don't clean up environment variables.
, enableNixHacks ? false
, gcc-unwrapped
, autoPatchelfHook
}:
let
version = "0.26.1";
version = "0.27.0";
src = fetchurl {
url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
sha256 = "000ny51hwnjyizm1md4w8q7m832jhf3c767pgbvg6nc7h67lzsf0";
sha256 = "0yn662dzgfr8ls4avfl12k5sr4f210bab12wml18bh4sjlxhs263";
};
# Update with `eval $(nix-build -A bazel.updater)`,
# then add new dependencies from the dict in ./src-deps.json as required.
srcDeps =
srcDeps = lib.attrsets.attrValues srcDepsSet;
srcDepsSet =
let
srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
toFetchurl = d: fetchurl {
toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
name = d.name;
urls = d.urls;
sha256 = d.sha256;
};
in map toFetchurl [
});
in builtins.listToAttrs (map toFetchurl [
srcs.desugar_jdk_libs
srcs.io_bazel_skydoc
srcs.bazel_skylib
srcs.io_bazel_rules_sass
(if stdenv.hostPlatform.isDarwin
then srcs.${"java_tools_javac10_darwin-v3.2.zip"}
else srcs.${"java_tools_javac10_linux-v3.2.zip"})
then srcs.${"java_tools_javac11_darwin-v2.0.zip"}
else srcs.${"java_tools_javac11_linux-v2.0.zip"})
srcs.${"coverage_output_generator-v1.0.zip"}
srcs.build_bazel_rules_nodejs
srcs.${"android_tools_pkg-0.2.tar.gz"}
];
srcs.${"android_tools_pkg-0.4.tar.gz"}
]);
distDir = runCommand "bazel-deps" {} ''
mkdir -p $out
@@ -87,6 +90,33 @@ let
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}-v2.0.zip";
nativeBuildInputs = [ autoPatchelfHook unzip ];
buildInputs = [ gcc-unwrapped ];
sourceRoot = ".";
buildPhase = ''
mkdir $out;
'';
installPhase = ''
cp -Ra * $out/
touch $out/WORKSPACE
'';
};
in
stdenv.mkDerivation rec {
name = "bazel-${version}";
@@ -117,6 +147,7 @@ stdenv.mkDerivation rec {
runLocal = name: attrs: script: runCommandCC name ({
preferLocalBuild = true;
meta.platforms = platforms;
buildInputs = [ python3 ];
} // attrs) script;
# bazel wants to extract itself into $install_dir/install every time it runs,
@@ -258,8 +289,8 @@ stdenv.mkDerivation rec {
# 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" \
--replace "/usr/bin/env python" "${python3}/bin/python" \
--replace "NIX_STORE_PYTHON_PATH" "${python3}/bin/python" \
# md5sum is part of coreutils
sed -i 's|/sbin/md5|md5sum|' \
@@ -275,6 +306,11 @@ stdenv.mkDerivation rec {
--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
# Fixup scripts that generate scripts. Not fixed up by patchShebangs below.
substituteInPlace scripts/bootstrap/compile.sh \
--replace /bin/bash ${customBash}/bin/bash
@@ -323,19 +359,26 @@ stdenv.mkDerivation rec {
mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash
patchShebangs .
# bazel reads its system bazelrc in /etc
# override this path to a builtin one
substituteInPlace \
src/main/cpp/option_processor.cc \
--replace BAZEL_SYSTEM_BAZELRC_PATH "\"$out/etc/bazelrc\""
'';
in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches
+ genericPatches;
buildInputs = [
buildJdk
python3
];
# when a command cant be found in a bazel build, you might also
# need to add it to `defaultShellPath`.
nativeBuildInputs = [
zip
python
python3
unzip
makeWrapper
which
@@ -375,20 +418,40 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/bazel" --add-flags --server_javabase="${runJdk}"
# generates the system bazelrc
# warning: the name of the repository depends on the system, hence
# the reference to .name
mkdir $out/etc
echo "build --override_repository=${remote_java_tools.name}=${remote_java_tools}" > $out/etc/bazelrc
# 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;
doInstallCheck = true;
installCheckPhase = ''
export TEST_TMPDIR=$(pwd)
tar xf ${srcDepsSet.io_bazel_skydoc} -C $TEST_TMPDIR
mv $(ls | grep skydoc-) io_bazel_skydoc
tar xf ${srcDepsSet.bazel_skylib} -C $TEST_TMPDIR
mv $(ls | grep bazel-skylib-) bazel_skylib
tar xf ${srcDepsSet.io_bazel_rules_sass} -C $TEST_TMPDIR
mv $(ls | grep rules_sass-) rules_sass
unzip ${srcDepsSet.build_bazel_rules_nodejs} -d $TEST_TMPDIR
mv rules_nodejs-0.16.2 build_bazel_rules_nodejs
hello_test () {
$out/bin/bazel test \
--override_repository=io_bazel_skydoc=$TEST_TMPDIR/io_bazel_skydoc \
--override_repository=bazel_skylib=$TEST_TMPDIR/bazel_skylib \
--override_repository=io_bazel_rules_sass=$TEST_TMPDIR/rules_sass \
--override_repository=build_bazel_rules_nodejs=$TEST_TMPDIR/build_bazel_rules_nodejs \
--test_output=errors \
--java_toolchain='${javaToolchain}' \
examples/cpp:hello-success_test \
@@ -424,7 +487,7 @@ stdenv.mkDerivation rec {
echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
# The templates get tard up into a .jar,
# so nix cant detect python is needed in the runtime closure
echo "${python}" >> $out/nix-support/depends
echo "${python3}" >> $out/nix-support/depends
'';
dontStrip = true;

View File

@@ -23,11 +23,11 @@
"https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz"
]
},
"android_tools_pkg-0.2.tar.gz": {
"name": "android_tools_pkg-0.2.tar.gz",
"sha256": "04f85f2dd049e87805511e3babc5cea3f5e72332b1627e34f3a5461cc38e815f",
"android_tools_pkg-0.4.tar.gz": {
"name": "android_tools_pkg-0.4.tar.gz",
"sha256": "331e7706f2bcae8a68057d8ddd3e3f1574bca26c67c65802fc4a8ac6164fa912",
"urls": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.2.tar.gz"
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.4.tar.gz"
]
},
"bazel_j2objc": {
@@ -134,25 +134,25 @@
"https://github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz"
]
},
"java_tools_javac10_darwin-v3.2.zip": {
"name": "java_tools_javac10_darwin-v3.2.zip",
"sha256": "1437327179b4284f7082cee0bdc3328f040e62fc5cc59c32f6824b8c520e2b7b",
"java_tools_javac11_darwin-v2.0.zip": {
"name": "java_tools_javac11_darwin-v2.0.zip",
"sha256": "0ceb0c9ff91256fe33508306bc9cd9e188dcca38df78e70839d426bdaef67a38",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.2/java_tools_javac10_darwin-v3.2.zip"
"https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_darwin-v2.0.zip"
]
},
"java_tools_javac10_linux-v3.2.zip": {
"name": "java_tools_javac10_linux-v3.2.zip",
"sha256": "b93e7c556b01815afb6c248aa73f06b7ec912805bde8898eedac1e20d08f2e67",
"java_tools_javac11_linux-v2.0.zip": {
"name": "java_tools_javac11_linux-v2.0.zip",
"sha256": "074d624fb34441df369afdfd454e75dba821d5d54932fcfee5ba598d17dc1b99",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.2/java_tools_javac10_linux-v3.2.zip"
"https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_linux-v2.0.zip"
]
},
"java_tools_javac10_windows-v3.2.zip": {
"name": "java_tools_javac10_windows-v3.2.zip",
"sha256": "86d3cc7fa0dc91ccb8f78ae3af8440fe459177e22062043ee4b83d55e6b7dfb0",
"java_tools_javac11_windows-v2.0.zip": {
"name": "java_tools_javac11_windows-v2.0.zip",
"sha256": "2c3fc0ce7d30d60e26f4b8a36e2eadcf9e6a9d5a51b667d3d13b78db53b24251",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.2/java_tools_javac10_windows-v3.2.zip"
"https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_windows-v2.0.zip"
]
},
"java_tools_langtools_javac10": {
@@ -162,6 +162,13 @@
"https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk10.zip"
]
},
"java_tools_langtools_javac11": {
"name": "java_tools_langtools_javac11",
"sha256": "128a63f39d3f828a761f6afcfe3c6115279336a72ea77f60d7b3acf1841c9acb",
"urls": [
"https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11.zip"
]
},
"java_tools_langtools_javac9": {
"name": "java_tools_langtools_javac9",
"sha256": "3b6bbc47256acf2f61883901e2d4e3f9b292f5fe154a6912b928805de24cb864",

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "shards-${version}";
version = "0.8.1";
version = "0.9.0";
src = fetchFromGitHub {
owner = "crystal-lang";
repo = "shards";
rev = "v${version}";
sha256 = "1cjn2lafr08yiqzlhyqx14jjjxf1y24i2kk046px07gljpnlgqwk";
sha256 = "19q0xww4v0h5ln9gz8d8zv0c9ig761ik7gw8y31yxynzgzihwpf4";
};
buildInputs = [ crystal libyaml pcre which ];

View File

@@ -1,4 +1,4 @@
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk }:
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk }:
let
version = "4.1.5";
@@ -35,7 +35,15 @@ let
};
}.${stdenv.hostPlatform.system} or throwSystem;
buildInputs = [ unzip makeWrapper ];
buildInputs = [ gtk3 ];
nativeBuildInputs = [
unzip
makeWrapper
wrapGAppsHook
];
dontWrapGApps = true; # electron is in lib, we need to wrap it manually
buildCommand = ''
mkdir -p $out/lib/electron $out/bin
@@ -50,7 +58,8 @@ let
$out/lib/electron/electron
wrapProgram $out/lib/electron/electron \
--prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1
--prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \
"''${gappsWrapperArgs[@]}"
'';
};

View File

@@ -1,27 +1,24 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "lazygit-${version}";
version = "0.7.2";
pname = "lazygit";
version = "0.8";
goPackagePath = "github.com/jesseduffield/lazygit";
subPackages = [ "." ];
src = fetchFromGitHub {
owner = "jesseduffield";
repo = "lazygit";
repo = pname;
rev = "v${version}";
sha256 = "1b5mzmxw715cx7b0n22hvrpk0dbavzypljc7skwmh8k1nlx935jj";
sha256 = "0zynw5gr96a59x1qshzhhvld883ndf1plnw6l9dbhmff0wcfv6l1";
};
postPatch = ''
rm -rf scripts
'';
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Simple terminal UI for git commands";
homepage = "https://github.com/jesseduffield/lazygit";
license = licenses.mit;
maintainers = with stdenv.lib.maintainers; [ fpletz ];
platforms = stdenv.lib.platforms.unix;
maintainers = with maintainers; [ fpletz ];
};
}

View File

@@ -1,9 +1,8 @@
{ stdenv, fetchFromGitHub, crystal, shards, which }:
{ stdenv, lib, fetchFromGitHub, crystal, shards, llvm, which }:
stdenv.mkDerivation rec {
pname = "scry";
# 0.7.1 doesn't work with crystal > 0.25
version = "0.7.1.20180919";
version = "0.8.0";
src = fetchFromGitHub {
owner = "crystal-lang-tools";
@@ -12,7 +11,9 @@ stdenv.mkDerivation rec {
sha256 = "1yq7jap3y5pr2yqc6fn6bxshzwv7dz3w97incq7wpcvi7ibb4lcn";
};
nativeBuildInputs = [ crystal shards which ];
patches = lib.optional (lib.versionAtLeast crystal.version "0.28") ./fix_for_crystal_0_28_and_above.patch;
nativeBuildInputs = [ crystal shards llvm which ];
buildPhase = ''
runHook preBuild

View File

@@ -0,0 +1,20 @@
diff --git a/src/scry/completion_provider.cr b/src/scry/completion_provider.cr
index 29e0d36..f67438c 100644
--- a/src/scry/completion_provider.cr
+++ b/src/scry/completion_provider.cr
@@ -1,4 +1,5 @@
require "./log"
+require "compiler/crystal/codegen/target"
require "compiler/crystal/crystal_path"
require "./completion/*"
diff --git a/src/scry/parse_analyzer.cr b/src/scry/parse_analyzer.cr
index d87eca4..bbe9ed5 100644
--- a/src/scry/parse_analyzer.cr
+++ b/src/scry/parse_analyzer.cr
@@ -1,4 +1,5 @@
require "compiler/crystal/syntax"
+require "compiler/crystal/codegen/target"
require "compiler/crystal/crystal_path"
require "./workspace"
require "./text_document"

View File

@@ -0,0 +1,28 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "yj-${version}";
version = "4.0.0";
rev = "d9a48607cc5c812e8cf4abccc8ad26f37ab51558";
goPackagePath = "github.com/sclevine/yj";
src = fetchgit {
inherit rev;
url = "https://github.com/sclevine/yj";
sha256 = "04irphzs6hp9hvyski29ad29ga1kis3h8bw7jqvmy2c2rkrrsh7x";
};
goDeps = ./deps.nix;
meta = with stdenv.lib; {
description = ''Convert YAML <=> TOML <=> JSON <=> HCL'';
license = licenses.asl20;
maintainers = with maintainers; [ Profpatsch ];
platforms = platforms.all;
downloadPage = "https://github.com/sclevine/yj";
updateWalker = true;
inherit version;
};
}

30
pkgs/development/tools/yj/deps.nix generated Normal file
View File

@@ -0,0 +1,30 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
[
{
goPackagePath = "github.com/BurntSushi/toml";
fetch = {
type = "git";
url = "https://github.com/BurntSushi/toml";
rev = "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005";
sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
};
}
{
goPackagePath = "github.com/hashicorp/hcl";
fetch = {
type = "git";
url = "https://github.com/hashicorp/hcl";
rev = "cf7d376da96d9cecec7c7483cec2735efe54a410";
sha256 = "0i1zhgpyvvgwkz74k8wd3sygsap1saqv37rw0j5vdpaazmpr1qkb";
};
}
{
goPackagePath = "gopkg.in/yaml.v2";
fetch = {
type = "git";
url = "https://gopkg.in/yaml.v2";
rev = "51d6538a90f86fe93ac480b35f37b2be17fef232";
sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
};
}
]