Merge branch 'staging-next' into staging

This commit is contained in:
Vladimír Čunát
2019-02-01 09:42:53 +01:00
458 changed files with 9823 additions and 5655 deletions

View File

@@ -48,8 +48,10 @@ in
let result = stdenv.mkDerivation rec {
name = if sourcePerArch.packageType == "jdk"
then "adoptopenjdk-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}"
else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}";
then "adoptopenjdk-${sourcePerArch.vmType}-bin-${version}"
else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${version}";
version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
src = fetchurl {
inherit (sourcePerArch.${cpuName}) url sha256;

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "closure-compiler-${version}";
version = "20181210";
version = "20190121";
src = fetchurl {
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
sha256 = "0c79ki4lacfwks5f2q7kzcg6v3a65zs5srm14k09gh5k1hvvnayd";
sha256 = "1jxxj3a1pbf7bbqs0rkqk28ii1r3w2va4iis8fffx8zfvbgncwyc";
};
sourceRoot = ".";

View File

@@ -12,14 +12,14 @@ let
rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ];
in
stdenv.mkDerivation rec {
version = "2.1.403";
netCoreVersion = "2.1.5";
version = "2.2.103";
netCoreVersion = "2.2.1";
name = "dotnet-sdk-${version}";
src = fetchurl {
url = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/dotnet-sdk-${version}-linux-x64.tar.gz";
# use sha512 from the download page
sha512 = "903a8a633aea9211ba36232a2decb3b34a59bb62bc145a0e7a90ca46dd37bb6c2da02bcbe2c50c17e08cdff8e48605c0f990786faf1f06be1ea4a4d373beb8a9";
sha512 = "777AC6DCD0200BA447392E451A1779F0FBFA548BD620A7BBA3EEBDF35892236C3F10B19FF81D4F64B5BC134923CB47F9CC45EE6B004140E1249582249944DB69";
};
unpackPhase = ''

View File

@@ -2,15 +2,15 @@
stdenv.mkDerivation rec {
name = "gambit-bootstrap-${version}";
version = "4.9.1";
tarball_version = "v4_9_1";
version = "4.9.2";
tarball_version = "v4_9_2";
src = fetchurl {
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-${tarball_version}-devel.tgz";
sha256 = "10kzv568gimp9nzh5xw0h01vw50wi68z3awfp9ibqrpq2l0n7mw7";
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-${tarball_version}.tgz";
sha256 = "1cpganh3jgjdw6qsapcbwxdbp1xwgx5gvdl4ymwf8p2c5k018dwy";
};
buildInputs = [ autoconf git ];
buildInputs = [ autoconf ];
configurePhase = ''
./configure --prefix=$out

View File

@@ -1,10 +1,10 @@
{ stdenv, callPackage, fetchurl }:
callPackage ./build.nix {
version = "4.9.1";
version = "4.9.2";
src = fetchurl {
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_1-devel.tgz";
sha256 = "10kzv568gimp9nzh5xw0h01vw50wi68z3awfp9ibqrpq2l0n7mw7";
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_2-devel.tgz";
sha256 = "1xpjm3m1pxwj3n0g36lbb3p6wx2nc1iry95xc22pnq3m2374gjxv";
};
inherit stdenv;
}

View File

@@ -1,13 +1,13 @@
{ stdenv, callPackage, fetchFromGitHub }:
callPackage ./build.nix {
version = "unstable-2018-11-19";
# git-version = "4.9.1-8-g61c6cb50";
version = "unstable-2019-01-18";
# git-version = "4.9.2";
src = fetchFromGitHub {
owner = "feeley";
repo = "gambit";
rev = "61c6cb500f4756be1e52095d5ab4501752525a70";
sha256 = "1knpb40y1g09c6yqd2fsxm3bk56bl5xrrwfsd7nqa497x6ngm5pn";
rev = "cf5688ecf35d85b9355c645f535c1e057b3064e7";
sha256 = "1xr7j4iws6hlrdbvlii4n98apr78k4adbnmy4ggzyik65bynh1kl";
};
inherit stdenv;
}

View File

@@ -2,4 +2,3 @@
getHostRole
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libstdc++"

View File

@@ -24,9 +24,13 @@ stdenv.mkDerivation rec {
patchShebangs .
find . -type f -executable -print0 | while IFS= read -r -d ''$'\0' f; do
grep -Fl '#!/usr/bin/env' `find . -type f -executable` | while read f ; do
substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env'
done
grep -Fl '"gsc"' `find . -type f -name '*.s*'` | while read f ; do
substituteInPlace "$f" --replace '"gsc"' '"${gambit}/bin/gsc"'
done
substituteInPlace "etc/gerbil.el" --replace '"gxc"' "\"$out/bin/gxc\""
cat > etc/gerbil_static_libraries.sh <<EOF
#OPENSSL_LIBCRYPTO=${makeStaticLibraries openssl}/lib/libcrypto.a # MISSING!

View File

@@ -1,14 +1,14 @@
{ stdenv, callPackage, fetchFromGitHub, gambit }:
callPackage ./build.nix rec {
version = "0.14";
git-version = "0.14";
version = "0.15";
git-version = "0.15";
inherit gambit;
src = fetchFromGitHub {
owner = "vyzo";
repo = "gerbil";
rev = "v${version}";
sha256 = "0n078lkf8m391kr99ipb1v2dpi5vkikz9nj0p7kfjg43868my3v7";
sha256 = "1ff1gpl0bl1pbs68bxax82ikw4bzbkrj4a6l775ziwyfndjggl66";
};
inherit stdenv;
}

View File

@@ -1,14 +1,14 @@
{ stdenv, callPackage, fetchFromGitHub, gambit-unstable }:
callPackage ./build.nix {
version = "unstable-2018-11-19";
git-version = "0.15-DEV-2-g7d09a4ce";
version = "unstable-2019-01-25";
git-version = "0.15";
gambit = gambit-unstable;
src = fetchFromGitHub {
owner = "vyzo";
repo = "gerbil";
rev = "7d09a4cebe03d755a1791e77279e156a74e07685";
sha256 = "1mqi9xcjk59sqbh1fx65a4fa4mqm35py4xqxq6086bcyhkm1nzwa";
rev = "8c1aa2ca129a380de9cf668a7f3f6d56e56cbf94";
sha256 = "1ff1gpl0bl1pbs68bxax82ikw4bzbkrj4a6l775ziwyfndjggl66";
};
inherit stdenv;
}

View File

@@ -0,0 +1,164 @@
{ stdenv
, fetchurl, perl, gcc, llvm_39
, ncurses5, gmp, glibc, libiconv
}:
# Prebuilt only does native
assert stdenv.targetPlatform == stdenv.hostPlatform;
let
libPath = stdenv.lib.makeLibraryPath ([
ncurses5 gmp
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+ "LD_LIBRARY_PATH";
glibcDynLinker = assert stdenv.isLinux;
if stdenv.hostPlatform.libc == "glibc" then
# Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
else
"${stdenv.lib.getLib glibc}/lib/ld-linux*";
in
stdenv.mkDerivation rec {
version = "8.6.3";
name = "ghc-${version}-binary";
src = fetchurl ({
"i686-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb8-linux.tar.xz";
sha256 = "0bw8a7fxcbskf93rb4m542ff66vrmx5i5kj77qx37cbhijx70w5m";
};
"x86_64-linux" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb8-linux.tar.xz";
sha256 = "1m9gaga2pzi2cx5gvasg0rx1dlvr68gmi20l67652kag6xjsa719";
};
"x86_64-darwin" = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
sha256 = "1hbzk57v45176kxcx848p5jn5p1xbp2129ramkbzsk6plyhnkl3r";
};
}.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform"));
nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optionals (stdenv.targetPlatform.isAarch32 || stdenv.targetPlatform.isAarch64) [ llvm_39 ];
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
${libEnvVar} = libPath;
postUnpack =
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
# during linking
stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
# not enough room in the object files for the full path to libiconv :(
for exe in $(find . -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
done
'' +
# Some scripts used during the build need to have their shebangs patched
''
patchShebangs ghc-${version}/utils/
patchShebangs ghc-${version}/configure
'' +
# Strip is harmful, see also below. It's important that this happens
# first. The GHC Cabal build system makes use of strip by default and
# has hardcoded paths to /usr/bin/strip in many places. We replace
# those below, making them point to our dummy script.
''
mkdir "$TMP/bin"
for i in strip; do
echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
chmod +x "$TMP/bin/$i"
done
PATH="$TMP/bin:$PATH"
'' +
# We have to patch the GMP paths for the integer-gmp package.
''
find . -name integer-gmp.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
'' + stdenv.lib.optionalString stdenv.isDarwin ''
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 -exec patchelf \
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
--replace-needed libtinfo.so libtinfo.so.5 \
--interpreter ${glibcDynLinker} {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
'';
configurePlatforms = [ ];
configureFlags = [
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
# Stripping combined with patchelf breaks the executables (they die
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
dontStrip = true;
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
dontBuild = true;
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
for p in $(find "$out" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
fi
done
'' + stdenv.lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
done
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
'';
doInstallCheck = true;
installCheckPhase = ''
unset ${libEnvVar}
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
{-# LANGUAGE TemplateHaskell #-}
module Main where
main = putStrLn \$([|"yes"|])
EOF
$out/bin/ghc --make main.hs || exit 1
echo compilation ok
[ $(./main) == "yes" ]
'';
passthru = {
targetPrefix = "";
enableShared = true;
};
meta.license = stdenv.lib.licenses.bsd3;
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
}

View File

@@ -2,7 +2,7 @@
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchgit, perl, python3, m4, sphinx
, autoconf, automake, coreutils, fetchgit, fetchurl, fetchpatch, perl, python3, m4, sphinx
, libiconv ? null, ncurses
@@ -21,12 +21,12 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
, # Whetherto build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
, version ? "8.5.20180118"
, version ? "8.7.20190115"
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
@@ -84,9 +84,9 @@ stdenv.mkDerivation (rec {
name = "${targetPrefix}ghc-${version}";
src = fetchgit {
url = "git://git.haskell.org/ghc.git";
rev = "e1d4140be4d2a1508015093b69e1ef53516e1eb6";
sha256 = "1gdcr10dd968d40qgljdwx9vfkva3yrvjm9a4nis7whaaac3ag58";
url = "https://gitlab.haskell.org/ghc/ghc.git/";
rev = "c9756dbf1ee58b117ea5c4ded45dea88030efd65";
sha256 = "0ja3ivyz4jrqkw6z1mdgsczxaqkjy5vw0nyyqlqr0bqxiw9p8834";
};
enableParallelBuilding = true;
@@ -122,6 +122,24 @@ stdenv.mkDerivation (rec {
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
echo "patching llvm-targets for musl targets..."
echo "Cloning these existing '*-linux-gnu*' targets:"
grep linux-gnu llvm-targets | sed 's/^/ /'
echo "(go go gadget sed)"
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
echo "llvm-targets now contains these '*-linux-musl*' targets:"
grep linux-musl llvm-targets | sed 's/^/ /'
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
for x in configure aclocal.m4; do
substituteInPlace $x \
--replace '*-android*|*-gnueabi*)' \
'*-android*|*-gnueabi*|*-musleabi*)'
done
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
@@ -131,8 +149,8 @@ stdenv.mkDerivation (rec {
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
@@ -149,12 +167,9 @@ stdenv.mkDerivation (rec {
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
perl autoconf automake m4 python3 sphinx
bootPkgs.ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs
@@ -195,14 +210,14 @@ stdenv.mkDerivation (rec {
inherit enableShared;
# Our Cabal compiler name
haskellCompilerName = "ghc-8.5";
haskellCompilerName = "ghc-8.7";
};
meta = {
homepage = http://haskell.org/ghc;
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;
inherit (bootPkgs.ghc.meta) license platforms;
};
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {

View File

@@ -104,4 +104,7 @@ in stdenv.mkDerivation {
inherit passthru;
meta.platforms = passthru.bootPkgs.ghc.meta.platforms;
meta.hydraPlatforms = [];
meta.broken = true; # does not compile: https://hydra.nixos.org/build/88052615
}

View File

@@ -22,13 +22,13 @@ in
stdenv.mkDerivation rec {
name = "go-${version}";
version = "1.10.7";
version = "1.10.8";
src = fetchFromGitHub {
owner = "golang";
repo = "go";
rev = "go${version}";
sha256 = "1alc7dagijdg4p4hhvlznlgcxsl8gz94v7p9wk3kn303y782dl41";
sha256 = "1yynv105wh8pwiq61v4yg5i50k13g3x634x60mhxhv4gj9cq06cx";
};
GOCACHE = "off";

View File

@@ -29,13 +29,13 @@ in
stdenv.mkDerivation rec {
name = "go-${version}";
version = "1.11.4";
version = "1.11.5";
src = fetchFromGitHub {
owner = "golang";
repo = "go";
rev = "go${version}";
sha256 = "036nc17hffy0gcfs9j64qzwpjry65znbm4klf2h0xn81dp8d6mxk";
sha256 = "0d45057rc0bngq0nja847cagxji42qmlywr68f0dkg51im8nyr9y";
};
# perl is used for testing go vet

View File

@@ -1,184 +0,0 @@
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation }:
let
inherit (stdenv.lib) optionals optionalString;
clangHack = writeScriptBin "clang" ''
#!${stdenv.shell}
exec ${stdenv.cc}/bin/clang "$@" 2> >(sed '/ld: warning:.*ignoring unexpected dylib file/ d' 1>&2)
'';
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
in
stdenv.mkDerivation rec {
name = "go-${version}";
version = "1.9.7";
src = fetchFromGitHub {
owner = "golang";
repo = "go";
rev = "go${version}";
sha256 = "16bvpw0kkd2vv4d83m8xnbq3f1hfy642p7lfvk64h5h1663vpc2v";
};
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkgconfig patch procps ];
buildInputs = [ cacert pcre ]
++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
hardeningDisable = [ "all" ];
prePatch = ''
patchShebangs ./ # replace /bin/bash
# This source produces shell script at run time,
# and thus it is not corrected by patchShebangs.
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
rm src/net/{listen,parse}_test.go
rm src/syscall/exec_linux_test.go
# !!! substituteInPlace does not seems to be effective.
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
# Disable the unix socket test
sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
# Disable the hostname test
sed -i '/TestHostname/areturn' src/os/os_test.go
# ParseInLocation fails the test
sed -i '/TestParseInSydney/areturn' src/time/format_test.go
# Remove the api check as it never worked
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
# Remove the coverage test as we have removed this utility
sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go
# Remove the timezone naming test
sed -i '/TestLoadFixed/areturn' src/time/time_test.go
# Remove disable setgid test
sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go
# Remove cert tests that conflict with NixOS's cert resolution
sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_test.go
# TestWritevError hangs sometimes
sed -i '/TestWritevError/areturn' src/net/writev_test.go
# TestVariousDeadlines fails sometimes
sed -i '/TestVariousDeadlines/areturn' src/net/timeout_test.go
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
# Disable cgo lookup tests not works, they depend on resolver
rm src/net/cgo_unix_test.go
'' + optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isAarch32 ''
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
echo '#!${stdenv.shell}' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''
substituteInPlace src/race.bash --replace \
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
sed -i '/TestCredentialNoSetGroups/areturn' src/os/exec/exec_posix_test.go
sed -i '/TestCurrent/areturn' src/os/user/user_test.go
sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
sed -i '/TestRead0/areturn' src/os/os_test.go
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
sed -i '1 a\exit 0' misc/cgo/errors/test.bash
'';
patches =
[ ./remove-tools-1.9.patch
./ssl-cert-file-1.9.patch
./creds-test-1.9.patch
./remove-test-pie-1.9.patch
./go-1.9-skip-flaky-19608.patch
./go-1.9-skip-flaky-20072.patch
];
postPatch = optionalString stdenv.isDarwin ''
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
'';
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "386"
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
# Hopefully avoids test timeouts on Hydra
GO_TEST_TIMEOUT_SCALE = 3;
# The go build actually checks for CC=*/clang and does something different, so we don't
# just want the generic `cc` here.
CC = if stdenv.isDarwin then "clang" else "cc";
configurePhase = ''
mkdir -p $out/share/go/bin
export GOROOT=$out/share/go
export GOBIN=$GOROOT/bin
export PATH=$GOBIN:$PATH
ulimit -a
'';
postConfigure = optionalString stdenv.isDarwin ''
export PATH=${clangHack}/bin:$PATH
'';
installPhase = ''
cp -r . $GOROOT
( cd $GOROOT/src && ./all.bash )
'';
preFixup = ''
rm -r $out/share/go/pkg/bootstrap
ln -s $out/share/go/bin $out/bin
'';
setupHook = ./setup-hook.sh;
disallowedReferences = [ go_bootstrap ];
meta = with stdenv.lib; {
branch = "1.9";
homepage = http://golang.org/;
description = "The Go Programming language";
license = licenses.bsd3;
maintainers = with maintainers; [ cstrahan orivej ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -1,14 +0,0 @@
diff -ru -x '*~' ./result/src/syscall/creds_test.go go-go1.7.4-src/src/syscall/creds_test.go
--- ./result/src/syscall/creds_test.go 1970-01-01 01:00:01.000000000 +0100
+++ go-go1.7.4-src/src/syscall/creds_test.go 2016-12-21 14:06:39.559932164 +0100
@@ -62,8 +62,8 @@
if sys, ok := err.(*os.SyscallError); ok {
err = sys.Err
}
- if err != syscall.EPERM {
- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
+ if err != syscall.EPERM && err != syscall.EINVAL {
+ t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err)
}
}

View File

@@ -1,26 +0,0 @@
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 73432d31ea..3310f5298d 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -510,21 +510,6 @@ func (t *tester) registerTests() {
})
}
- // Test internal linking of PIE binaries where it is supported.
- if t.goos == "linux" && t.goarch == "amd64" && !isAlpineLinux() {
- // Issue 18243: We don't have a way to set the default
- // dynamic linker used in internal linking mode. So
- // this test is skipped on Alpine.
- t.tests = append(t.tests, distTest{
- name: "pie_internal",
- heading: "internal linking of -buildmode=pie",
- fn: func(dt *distTest) error {
- t.addCmd(dt, "src", "go", "test", "reflect", "-short", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60), t.tags(), t.runFlag(""))
- return nil
- },
- })
- }
-
// sync tests
t.tests = append(t.tests, distTest{
name: "sync_cpu",

View File

@@ -3,4 +3,7 @@ import ./shared.nix {
minorVersion = "7";
maintenanceVersion = "0";
src_sha256 = "1j57569qm2ii8ddzsp08hds2navpk7acdz83kh27dvk44axhwj6f";
libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
libuvSha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
}

View File

@@ -3,4 +3,7 @@ import ./shared.nix {
minorVersion = "0";
maintenanceVersion = "3";
src_sha256 = "0666chsc19wx02k5m1yilf6wbc9bw27ay8p1d00jkh8m0jkrpf7l";
libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
libuvSha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
}

View File

@@ -0,0 +1,9 @@
import ./shared.nix {
majorVersion = "1";
minorVersion = "1";
maintenanceVersion = "0";
src_sha256 = "08fyck4qcdv9nnrdqh1wb7lb8pkkikh67xx5lc872sjl9w3p0sak";
libuvVersion = "2348256acf5759a544e5ca7935f638d2bc091d60";
libuvSha256 = "1363f4vqayfcv5zqg07qmzjff56yhad74k16c22ian45lram8mv8";
}

View File

@@ -2,6 +2,9 @@
, minorVersion
, maintenanceVersion
, src_sha256
# source deps
, libuvVersion
, libuvSha256
}:
{ stdenv, fetchurl, fetchzip
# build tools
@@ -34,10 +37,9 @@ let
sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42";
};
libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
libuv = fetchurl {
url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}";
sha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
sha256 = libuvSha256;
};
rmathVersion = "0.1";

View File

@@ -1,14 +1,14 @@
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
let
version = "1.3.11";
version = "1.3.20";
in stdenv.mkDerivation rec {
inherit version;
name = "kotlin-${version}";
src = fetchurl {
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
sha256 = "02d4x65z6kp20hmf5ri56zmq4rq45yc9br0awqrn9ls99cd0zph3";
sha256 = "1w7k09sxlvyy53p4mxnl4qsnsyivpabhsmradbybfgf50nsmyl1d";
};
propagatedBuildInputs = [ jre ] ;

View File

@@ -4,13 +4,13 @@ with lib;
mkDerivation rec {
pname = "psc-package";
version = "0.4.2";
version = "0.5.1";
src = fetchFromGitHub {
owner = "purescript";
repo = pname;
rev = "v${version}";
sha256 = "0xvnmpfj4c6h4gmc2c3d4gcs44527jrgfl11l2fs4ai1mc69w5zg";
sha256 = "1zadbph1vha3b5hvmjvs138dcwbab49f3v63air1l6r4cvpb6831";
};
isLibrary = false;

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, writeText, sbclBootstrap
{ stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
@@ -10,28 +10,16 @@
stdenv.mkDerivation rec {
name = "sbcl-${version}";
version = "1.4.15";
version = "1.4.16";
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
sha256 = "0bipl4gsvpcifi6vkqm5636i3219mk1bl99px4xh5l1q2g7knv28";
sha256 = "1myg4wkxnbfn5nz38xy62r1jhjy07x3h0b04vg858n41chdsv4wd";
};
buildInputs = [texinfo];
patches = [
# 1.4.15 bug, run-program thread safety, remove for 1.4.16
(fetchpatch {
url = "https://github.com/sbcl/sbcl/commit/c80672bedb1e4bc16124d0d01d7e37f94dd17a5a.patch";
sha256 = "0pjm9yajwij59gdkqhid7sbgmb8z57cz8zrsikxg7yzfgr7sa7hy";
})
];
patchPhase = ''
for patch in ${toString patches}; do
patch -Np1 -i "$patch"
done
echo '"${version}.nixos"' > version.lisp-expr
echo "
(lambda (features)
@@ -80,7 +68,8 @@ stdenv.mkDerivation rec {
else
# Fix software version retrieval
''
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
src/code/run-program.lisp
''
);