Skip to content

Commit

Permalink
Merge pull request #47604 from NixOS/staging-next
Browse files Browse the repository at this point in the history
Staging next
  • Loading branch information
FRidh committed Oct 2, 2018
2 parents fbc1fb7 + fe970a8 commit 4d1abc4
Show file tree
Hide file tree
Showing 114 changed files with 1,135 additions and 1,135 deletions.
Expand Up @@ -4,7 +4,6 @@
args @ {config, lib, pkgs}: with args; with pkgs;
let
gitBase = callPackage ./git {
texinfo = texinfo5;
svnSupport = false; # for git-svn support
guiSupport = false; # requires tcl/tk
sendEmailSupport = false; # requires plenty of perl libraries
Expand Down
Expand Up @@ -20,7 +20,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;

let
version = "2.18.0";
version = "2.19.0";
svn = subversionClient.override { perlBindings = perlSupport; };
in

Expand All @@ -29,7 +29,7 @@ stdenv.mkDerivation {

src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "14hfwfkrci829a9316hnvkglnqqw1p03cw9k56p4fcb078wbwh4b";
sha256 = "1x1y5z3awabmfg7hk6zb331jxngad4nal4507v96bnf0izsyy3qq";
};

outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
Expand Down Expand Up @@ -283,7 +283,7 @@ EOF
# XXX: I failed to understand why this one fails.
# Could someone try to re-enable it on the next release ?
# Tested to fail: 2.18.0
# Tested to fail: 2.18.0 and 2.19.0
disable_test t1700-split-index "null sha1"
# Tested to fail: 2.18.0
Expand All @@ -292,6 +292,9 @@ EOF
# Tested to fail: 2.18.0
disable_test t9902-completion "sourcing the completion script clears cached --options"
# As of 2.19.0, t5562 refers to #!/usr/bin/perl
patchShebangs t/t5562/invoke-with-content-length.pl
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
# Test fails (as of 2.17.0, musl 1.1.19)
disable_test t3900-i18n-commit
Expand Down
7 changes: 4 additions & 3 deletions pkgs/build-support/bintools-wrapper/default.nix
Expand Up @@ -6,9 +6,10 @@
# compiler and the linker just "work".

{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, bintools ? null, libc ? null
, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, stdenvNoCC
, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? bintools != null && bintools ? man
, extraPackages ? [], extraBuildCommands ? ""
, buildPackages ? {}
, useMacosReexportHack ? false
Expand Down
4 changes: 3 additions & 1 deletion pkgs/build-support/cc-wrapper/default.nix
Expand Up @@ -6,8 +6,10 @@
# compiler and the linker just "work".

{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, stdenvNoCC
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? cc != null && cc ? man
, extraPackages ? [], extraBuildCommands ? ""
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
, buildPackages ? {}
Expand Down
41 changes: 41 additions & 0 deletions pkgs/build-support/rust/cargo-vendor-normalise.py
@@ -0,0 +1,41 @@
#!/usr/bin/env python

import sys

import toml


def quote(s: str) -> str:
escaped = s.replace('"', r"\"").replace("\n", r"\n").replace("\\", "\\\\")
return '"{}"'.format(escaped)


def main() -> None:
data = toml.load(sys.stdin)

assert list(data.keys()) == ["source"]

# this value is non deterministic
data["source"]["vendored-sources"]["directory"] = "@vendor@"

lines = []
inner = data["source"]
for source, attrs in sorted(inner.items()):
lines.append("[source.{}]".format(quote(source)))
if source == "vendored-sources":
lines.append('"directory" = "@vendor@"\n')
else:
for key, value in sorted(attrs.items()):
attr = "{} = {}".format(quote(key), quote(value))
lines.append(attr)
lines.append("")

result = "\n".join(lines)
real = toml.loads(result)
assert real == data, "output = {} while input = {}".format(real, data)

print(result)


if __name__ == "__main__":
main()
18 changes: 8 additions & 10 deletions pkgs/build-support/rust/default.nix
@@ -1,7 +1,7 @@
{ stdenv, cacert, git, rust, cargo-vendor }:
{ stdenv, cacert, git, rust, cargo-vendor, python3 }:
let
fetchcargo = import ./fetchcargo.nix {
inherit stdenv cacert git rust cargo-vendor;
inherit stdenv cacert git rust cargo-vendor python3;
};
in
{ name, cargoSha256 ? "unset"
Expand Down Expand Up @@ -61,14 +61,12 @@ in stdenv.mkDerivation (args // {
${setupVendorDir}
mkdir .cargo
cat >.cargo/config <<-EOF
[source.crates-io]
registry = 'https://github.com/rust-lang/crates.io-index'
replace-with = 'vendored-sources'
[source.vendored-sources]
directory = '$(pwd)/$cargoDepsCopy'
EOF
config="$(pwd)/$cargoDepsCopy/.cargo/config";
if [[ ! -e $config ]]; then
config=${./fetchcargo-default-config.toml};
fi;
substitute $config .cargo/config \
--subst-var-by vendor "$(pwd)/$cargoDepsCopy"
unset cargoDepsCopy
Expand Down
7 changes: 7 additions & 0 deletions pkgs/build-support/rust/fetchcargo-default-config.toml
@@ -0,0 +1,7 @@
[source."crates-io"]
"replace-with" = "vendored-sources"

[source."vendored-sources"]
"directory" = "@vendor@"


35 changes: 30 additions & 5 deletions pkgs/build-support/rust/fetchcargo.nix
@@ -1,8 +1,26 @@
{ stdenv, cacert, git, rust, cargo-vendor }:
{ stdenv, cacert, git, rust, cargo-vendor, python3 }:
let cargo-vendor-normalise = stdenv.mkDerivation {
name = "cargo-vendor-normalise";
src = ./cargo-vendor-normalise.py;
nativeBuildInputs = [ python3.pkgs.wrapPython ];
unpackPhase = ":";
installPhase = "install -D $src $out/bin/cargo-vendor-normalise";
pythonPath = [ python3.pkgs.toml ];
postFixup = "wrapPythonPrograms";
doInstallCheck = true;
installCheckPhase = ''
# check that ./fetchcargo-default-config.toml is a fix point
reference=${./fetchcargo-default-config.toml}
< $reference $out/bin/cargo-vendor-normalise > test;
cmp test $reference
'';
preferLocalBuild = true;
};
in
{ name ? "cargo-deps", src, srcs, patches, sourceRoot, sha256, cargoUpdateHook ? "" }:
stdenv.mkDerivation {
name = "${name}-vendor";
nativeBuildInputs = [ cacert cargo-vendor git rust.cargo ];
nativeBuildInputs = [ cacert cargo-vendor git cargo-vendor-normalise rust.cargo ];
inherit src srcs patches sourceRoot;

phases = "unpackPhase patchPhase installPhase";
Expand All @@ -23,9 +41,16 @@ stdenv.mkDerivation {
${cargoUpdateHook}
cargo vendor
cp -ar vendor $out
mkdir -p $out
cargo vendor $out | cargo-vendor-normalise > config
# fetchcargo used to never keep the config output by cargo vendor
# and instead hardcode the config in ./fetchcargo-default-config.toml.
# This broke on packages needing git dependencies, so now we keep the config.
# But not to break old cargoSha256, if the previous behavior was enough,
# we don't store the config.
if ! cmp config ${./fetchcargo-default-config.toml} > /dev/null; then
install -Dt $out/.cargo config;
fi;
'';

outputHashAlgo = "sha256";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/setup-hooks/patch-shebangs.sh
Expand Up @@ -32,7 +32,7 @@ patchShebangs() {
# - options: something starting with a '-'
# - environment variables: foo=bar
if $(echo "$arg0" | grep -q -- "^-.*\|.*=.*"); then
echo "unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
exit 1
fi
newPath="$(command -v "$arg0" || true)"
Expand Down
5 changes: 2 additions & 3 deletions pkgs/data/misc/iana-etc/default.nix
@@ -1,12 +1,11 @@
{ stdenv, fetchzip }:

let
version = "20180711";
version = "20180905";
in fetchzip {
name = "iana-etc-${version}";

url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
sha256 = "0vbgk3paix2v4rlh90a8yh1l39s322awng06izqj44zcg704fjbj";
sha256 = "1vl3by24xddl267cjq9bcwb7yvfd7gqalwgd5sgx8i7kz9bk40q2";

postFetch = ''
tar -xzvf $downloadedFile --strip-components=1
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/4.8/default.nix
Expand Up @@ -201,9 +201,7 @@ stdenv.mkDerivation ({
''
else null;

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/4.9/default.nix
Expand Up @@ -210,9 +210,7 @@ stdenv.mkDerivation ({
''
else null;

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/5/default.nix
Expand Up @@ -216,9 +216,7 @@ stdenv.mkDerivation ({
)
else null;

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/6/default.nix
Expand Up @@ -217,9 +217,7 @@ stdenv.mkDerivation ({
)
else null;

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
8 changes: 2 additions & 6 deletions pkgs/development/compilers/gcc/7/default.nix
Expand Up @@ -190,9 +190,7 @@ stdenv.mkDerivation ({
)
else "");

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down Expand Up @@ -220,9 +218,7 @@ stdenv.mkDerivation ({
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;

# TODO: Use optionalString with next rebuild.
${if (stdenv.cc.isClang && langFortran) then "NIX_CFLAGS_COMPILE" else null} = "-Wno-unused-command-line-argument";

NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";

preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/8/default.nix
Expand Up @@ -185,9 +185,7 @@ stdenv.mkDerivation ({
)
else "");

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/builder.sh
Expand Up @@ -131,7 +131,7 @@ if test "$noSysDirs" = "1"; then
)
fi

if test -n "${targetConfig-}" -a "$crossStageStatic" == 1; then
if test "$crossStageStatic" == 1; then
# We don't want the gcc build to assume there will be a libc providing
# limits.h in this stagae
makeFlagsArray+=(
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/compilers/gcc/snapshot/default.nix
Expand Up @@ -154,9 +154,7 @@ stdenv.mkDerivation ({
''
else null;

# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
6 changes: 2 additions & 4 deletions pkgs/development/compilers/llvm/5/libc++/default.nix
Expand Up @@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';

# on next rebuild, this can be replaced with optionals; for now set to null to avoid
# patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
patches = if stdenv.hostPlatform.isMusl then [
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
] else null;
];

prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/compilers/llvm/5/llvm.nix
Expand Up @@ -119,12 +119,14 @@ in stdenv.mkDerivation (rec {
+ stdenv.lib.optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
moveToOutput "lib/libLTO${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
''
+ stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" \
--replace "\''${_IMPORT_PREFIX}/lib/libLTO.dylib" "$lib/lib/libLTO.dylib"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
'';
Expand Down
6 changes: 2 additions & 4 deletions pkgs/development/compilers/llvm/6/libc++/default.nix
Expand Up @@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';

# on next rebuild, this can be replaced with optionals; for now set to null to avoid
# patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
patches = if stdenv.hostPlatform.isMusl then [
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
] else null;
];

prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
Expand Down
14 changes: 7 additions & 7 deletions pkgs/development/compilers/rust/bootstrap.nix
Expand Up @@ -3,16 +3,16 @@
let
# Note: the version MUST be one version prior to the version we're
# building
version = "1.26.2";
version = "1.28.0";

# fetch hashes by running `print-hashes.sh 1.24.1`
hashes = {
i686-unknown-linux-gnu = "e22286190a074bfb6d47c9fde236d712a53675af1563ba85ea33e0d40165f755";
x86_64-unknown-linux-gnu = "d2b4fb0c544874a73c463993bde122f031c34897bb1eeb653d2ba2b336db83e6";
armv7-unknown-linux-gnueabihf = "1140387a61083e3ef10e7a097269200fc7e9db6f6cc9f270e04319b3b429c655";
aarch64-unknown-linux-gnu = "3dfad0dc9c795f7ee54c2099c9b7edf06b942adbbf02e9ed9e5d4b5e3f1f3759";
i686-apple-darwin = "3a5de30f3e334a66bd320ec0e954961d348434da39a826284e00d55ea60f8370";
x86_64-apple-darwin = "f193705d4c0572a358670dbacbf0ffadcd04b3989728b442f4680fa1e065fa72";
i686-unknown-linux-gnu = "de7cdb4e665e897ea9b10bf6fd545f900683296456d6a11d8510397bb330455f";
x86_64-unknown-linux-gnu = "2a1390340db1d24a9498036884e6b2748e9b4b057fc5219694e298bdaa37b810";
armv7-unknown-linux-gnueabihf = "346558d14050853b87049e5e1fbfae0bf0360a2f7c57433c6985b1a879c349a2";
aarch64-unknown-linux-gnu = "9b6fbcee73070332c811c0ddff399fa31965bec62ef258656c0c90354f6231c1";
i686-apple-darwin = "752e2c9182e057c4a54152d1e0b3949482c225d02bb69d9d9a4127dc2a65fb68";
x86_64-apple-darwin = "5d7a70ed4701fe9410041c1eea025c95cad97e5b3d8acc46426f9ac4f9f02393";
};

platform =
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/rust/cargo.nix
Expand Up @@ -28,6 +28,9 @@ rustPlatform.buildRustPackage rec {

LIBGIT2_SYS_USE_PKG_CONFIG=1;

# fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel
RUSTC_BOOTSTRAP=1;

# FIXME: Use impure version of CoreFoundation because of missing symbols.
# CFURLSetResourcePropertyForKey is defined in the headers but there's no
# corresponding implementation in the sources from opensource.apple.com.
Expand Down

0 comments on commit 4d1abc4

Please sign in to comment.