Merge branch 'staging-next' into staging
This commit is contained in:
@@ -13,10 +13,14 @@ assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
|
||||
, curl
|
||||
}:
|
||||
let pname = if type == "aspnetcore" then "aspnetcore-runtime" else if type == "netcore" then "dotnet-runtime" else "dotnet-sdk";
|
||||
suffix = {
|
||||
x86_64-linux = "x64";
|
||||
aarch64-linux = "arm64";
|
||||
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
urls = {
|
||||
aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-linux-x64.tar.gz";
|
||||
netcore = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-linux-x64.tar.gz";
|
||||
sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-linux-x64.tar.gz";
|
||||
aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-linux-${suffix}.tar.gz";
|
||||
netcore = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-linux-${suffix}.tar.gz";
|
||||
sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-linux-${suffix}.tar.gz";
|
||||
};
|
||||
descriptions = {
|
||||
aspnetcore = "ASP .NET Core runtime ${version}";
|
||||
@@ -30,7 +34,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = builtins.getAttr type urls;
|
||||
inherit sha512;
|
||||
sha512 = sha512."${stdenv.hostPlatform.system}" or (throw "Missing hash for host system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
@@ -61,7 +65,7 @@ in stdenv.mkDerivation rec {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://dotnet.github.io/";
|
||||
description = builtins.getAttr type descriptions;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ kuznero ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
||||
@@ -5,27 +5,37 @@ dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_2_2 sdk_
|
||||
{ callPackage }:
|
||||
let
|
||||
buildDotnet = attrs: callPackage (import ./buildDotnet.nix attrs) {};
|
||||
buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; } );
|
||||
buildNetCore = attrs: buildDotnet (attrs // { type = "netcore"; } );
|
||||
buildNetCoreSdk = attrs: buildDotnet (attrs // { type = "sdk"; } );
|
||||
in rec {
|
||||
buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
|
||||
buildNetCore = attrs: buildDotnet (attrs // { type = "netcore"; });
|
||||
buildNetCoreSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
|
||||
in
|
||||
rec {
|
||||
combinePackages = attrs: callPackage (import ./combinePackages.nix attrs) {};
|
||||
|
||||
# v2.1.15 (LTS)
|
||||
|
||||
aspnetcore_2_1 = buildAspNetCore {
|
||||
version = "2.1.16";
|
||||
sha512 = "0awdzi8dysbg8xcy4l8wx2sb8gaaklphmwv61qxh7dj6ih4nla34l02xdax1l8nw41znnnqzsa77avglnrz36pckm9mc52m7wc7877h";
|
||||
sha512 = {
|
||||
x86_64-linux = "0awdzi8dysbg8xcy4l8wx2sb8gaaklphmwv61qxh7dj6ih4nla34l02xdax1l8nw41znnnqzsa77avglnrz36pckm9mc52m7wc7877h";
|
||||
aarch64-linux = null; # no aarch64 version of this package is available
|
||||
};
|
||||
};
|
||||
|
||||
netcore_2_1 = buildNetCore {
|
||||
version = "2.1.16";
|
||||
sha512 = "07vvmza32hsblpw4zpcksm2gicy4agh0d1fwradqj16y6xbh3frdp87mqgbj5m54mmyfp5bc8c46v1w6dfm1w3y80v2y46aynild45l";
|
||||
sha512 = {
|
||||
x86_64-linux = "07vvmza32hsblpw4zpcksm2gicy4agh0d1fwradqj16y6xbh3frdp87mqgbj5m54mmyfp5bc8c46v1w6dfm1w3y80v2y46aynild45l";
|
||||
aarch64-linux = "27ab982vz9rn2vzpq68dqfzhryfixq3s0apx7vi0cwiray3scgfmf45fm7qj63k9mvaqnk5g69i339109yasw3q5vpvpyjc1ykbi710";
|
||||
};
|
||||
};
|
||||
|
||||
sdk_2_1 = buildNetCoreSdk {
|
||||
version = "2.1.804";
|
||||
sha512 = "1kbzxcdgyvs94kkm6ikr1j0p0k3zq30d10sl69ig0rgbqbqm4rpqi6dq94jjbw7q3jlwz83vgq3549q38d2s9kalmzv9lmddn2kkc42";
|
||||
sha512 = {
|
||||
x86_64-linux = "1kbzxcdgyvs94kkm6ikr1j0p0k3zq30d10sl69ig0rgbqbqm4rpqi6dq94jjbw7q3jlwz83vgq3549q38d2s9kalmzv9lmddn2kkc42";
|
||||
aarch64-linux = "2d97xvhxnkdgghqlichkwdxxh641dzkd9hq5xgffgvbqv1qsh31k9yib2q1nsarpnbx0d758bdn2jm2wvsj7nx0gpxlb3nab0b3hc2g";
|
||||
};
|
||||
};
|
||||
|
||||
# v2.2
|
||||
@@ -36,33 +46,51 @@ in rec {
|
||||
|
||||
aspnetcore_3_0 = buildAspNetCore {
|
||||
version = "3.0.3";
|
||||
sha512 = "342v6kxxbxky09d1c392vvr9rm30lf75wccka1bk2h4advlcga5nlgv93g7vrq48bsyxfi5gc36r3b0dlwl1g409g5mlk1042n6d0yq";
|
||||
sha512 = {
|
||||
x86_64-linux = "342v6kxxbxky09d1c392vvr9rm30lf75wccka1bk2h4advlcga5nlgv93g7vrq48bsyxfi5gc36r3b0dlwl1g409g5mlk1042n6d0yq";
|
||||
aarch64-linux = "2xkg4q88q5jw6jdz6cxj8vsjr475nd0fcvifkv1shdm2j9dsjy233hwpxbr140m5n5ggyh6z99238z9j4kp2az977y8y8irz8m8ppvf";
|
||||
};
|
||||
};
|
||||
|
||||
netcore_3_0 = buildNetCore {
|
||||
version = "3.0.3";
|
||||
sha512 = "32ykpcw2xx708r2lxcwcbxnmy4sk159rlfjfvkw990qh7n79pm3lm2qwa3zhqcslznmpg18kwxz8qb5fgsa0h49g843xx4kyai0n7rx";
|
||||
sha512 = {
|
||||
x86_64-linux = "32ykpcw2xx708r2lxcwcbxnmy4sk159rlfjfvkw990qh7n79pm3lm2qwa3zhqcslznmpg18kwxz8qb5fgsa0h49g843xx4kyai0n7rx";
|
||||
aarch64-linux = "1lp8din7d5jv5fkyq1a7m01i1xg9jwpiljvam1kcyzsnwzvi0cb4ji336cfx4lqrn95gvc75gkzi6q8b4fz0h21gvk6z6kmlcr63nyg";
|
||||
};
|
||||
};
|
||||
|
||||
sdk_3_0 = buildNetCoreSdk {
|
||||
version = "3.0.103";
|
||||
sha512 = "2diiplgxs92fkb6ym68b02d79z4qn63x5qlky5lvr757c1zkh0vfpk3khawdg94kdn4qkn6dmyqr0msxqgmiqyhp63cadzqq4vx7b12";
|
||||
sha512 = {
|
||||
x86_64-linux = "2diiplgxs92fkb6ym68b02d79z4qn63x5qlky5lvr757c1zkh0vfpk3khawdg94kdn4qkn6dmyqr0msxqgmiqyhp63cadzqq4vx7b12";
|
||||
aarch64-linux = "32843q2lj7dgciq62g9v1q31vwfjyv5vaxrz712d942mcg5lyzjygwri106bv4naq3a22131ldzwnsifbdn2vq1iz60raqdb7ss9vnf";
|
||||
};
|
||||
};
|
||||
|
||||
# v3.1.1 (LTS)
|
||||
|
||||
aspnetcore_3_1 = buildAspNetCore {
|
||||
version = "3.1.2";
|
||||
sha512 = "27708bk5liz8r39p4dzs41clgq298d49g8ipzdj56pz613vkfyv7bp91666ydz36aazm265j2g9ji3sk1f9kbgv6024zwrly5w9vqrm";
|
||||
sha512 = {
|
||||
x86_64-linux = "27708bk5liz8r39p4dzs41clgq298d49g8ipzdj56pz613vkfyv7bp91666ydz36aazm265j2g9ji3sk1f9kbgv6024zwrly5w9vqrm";
|
||||
aarch64-linux = "2sm5yf376w5dm0za3gbcj251kc909fmlasmlyn70zhqp2jiii075vcqh40racjlwlhsfydx32cw7kgnv238lad5mw5jxy143zql5xl3";
|
||||
};
|
||||
};
|
||||
|
||||
netcore_3_1 = buildNetCore {
|
||||
version = "3.1.2";
|
||||
sha512 = "3zwg1anrcni9kagmjxn485bpjvb146hkm7irmikq3v879gjhd2fgpscg226ds83l4pxll3r7lwris6ij952xmy8lsqraapd9111ba14";
|
||||
sha512 = {
|
||||
x86_64-linux = "3zwg1anrcni9kagmjxn485bpjvb146hkm7irmikq3v879gjhd2fgpscg226ds83l4pxll3r7lwris6ij952xmy8lsqraapd9111ba14";
|
||||
aarch64-linux = "3hf61d5adlfffy51627ypp36qc5r55g9xwgfxqd0c7vj9bqmpiph673bvqqpr189df9shxr21p94cwrc5n36z72a37vw4ic8ks2yayx";
|
||||
};
|
||||
};
|
||||
|
||||
sdk_3_1 = buildNetCoreSdk {
|
||||
version = "3.1.102";
|
||||
sha512 = "0lmz8ac5j0i4zcq4904kr6qibvyjcm2ckfg27kqyqfii00qmm80xb5sk3i7f06xqkbgkrqkbg9rsldk75akw6m5dxg932j602bxrb4w";
|
||||
sha512 = {
|
||||
x86_64-linux = "0lmz8ac5j0i4zcq4904kr6qibvyjcm2ckfg27kqyqfii00qmm80xb5sk3i7f06xqkbgkrqkbg9rsldk75akw6m5dxg932j602bxrb4w";
|
||||
aarch64-linux = "34k6cm69gxm7vcd9m6bp47sdx96j32z6lfhb2vjcdznc6xgs2wy8zcang3b1mjm5919dq7v6iysm6ffcpgjhhphy7prlnaqa69q5mks";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
{ stdenv, fetchurl, tzdata, iana-etc, runCommand
|
||||
, perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation
|
||||
, mailcap, runtimeShell
|
||||
, buildPackages, pkgsTargetTarget
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
inherit (stdenv.lib) optionals optionalString;
|
||||
|
||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||
mkdir $out
|
||||
cp -rf ${buildPackages.go_bootstrap}/* $out/
|
||||
chmod -R u+w $out
|
||||
find $out -name "*.c" -delete
|
||||
cp -rf $out/bin/* $out/share/go/bin/
|
||||
'';
|
||||
|
||||
goarch = platform: {
|
||||
i686 = "386";
|
||||
x86_64 = "amd64";
|
||||
aarch64 = "arm64";
|
||||
arm = "arm";
|
||||
armv5tel = "arm";
|
||||
armv6l = "arm";
|
||||
armv7l = "arm";
|
||||
}.${platform.parsed.cpu.name} or (throw "Unsupported system");
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "go";
|
||||
version = "1.12.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.google.com/go/go${version}.src.tar.gz";
|
||||
sha256 = "09cbl90maxry713wd18jdqrms3ivbvcm472csnxc78rsqhc851yy";
|
||||
};
|
||||
|
||||
# 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 ];
|
||||
|
||||
depsTargetTargetPropagated = 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' '#!${runtimeShell}'
|
||||
|
||||
# Patch the mimetype database location which is missing on NixOS.
|
||||
substituteInPlace src/mime/type_unix.go \
|
||||
--replace '/etc/mime.types' '${mailcap}/etc/mime.types'
|
||||
|
||||
# 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
|
||||
|
||||
# Disable TestGcSys because it's flakey in our tests, but the failure is not
|
||||
# reproducible by multiple people in other environments.
|
||||
# See https://github.com/NixOS/nixpkgs/issues/68361#issuecomment-537849272 and following
|
||||
# NOTE: Try re-enabling for releases newer than 1.12.9
|
||||
sed -i '/TestGcSys/areturn' src/runtime/gc_test.go
|
||||
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
'' + optionalString stdenv.isAarch32 ''
|
||||
echo '#!${runtimeShell}' > 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 '/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
|
||||
|
||||
# TestCurrent fails because Current is not implemented on Darwin
|
||||
sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
|
||||
sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
|
||||
|
||||
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./remove-tools-1.11.patch
|
||||
./ssl-cert-file-1.12.1.patch
|
||||
./remove-test-pie.patch
|
||||
./creds-test.patch
|
||||
./go-1.9-skip-flaky-19608.patch
|
||||
./go-1.9-skip-flaky-20072.patch
|
||||
./skip-external-network-tests.patch
|
||||
./skip-nohup-tests.patch
|
||||
] ++ [
|
||||
# breaks under load: https://github.com/golang/go/issues/25628
|
||||
(if stdenv.isAarch32
|
||||
then ./skip-test-extra-files-on-aarch32.patch
|
||||
else ./skip-test-extra-files-on-386.patch)
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
find . -name '*.orig' -exec rm {} ';'
|
||||
'';
|
||||
|
||||
GOOS = stdenv.targetPlatform.parsed.kernel.name;
|
||||
GOARCH = goarch stdenv.targetPlatform;
|
||||
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
|
||||
# Go will nevertheless build a for host system that we will copy over in
|
||||
# the install phase.
|
||||
GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name;
|
||||
GOHOSTARCH = goarch stdenv.buildPlatform;
|
||||
|
||||
# {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
|
||||
# to be different from CC/CXX
|
||||
CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
|
||||
"${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc"
|
||||
else
|
||||
null;
|
||||
CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
|
||||
"${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}c++"
|
||||
else
|
||||
null;
|
||||
|
||||
GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
CGO_ENABLED = 1;
|
||||
# Hopefully avoids test timeouts on Hydra
|
||||
GO_TEST_TIMEOUT_SCALE = 3;
|
||||
|
||||
# Indicate that we are running on build infrastructure
|
||||
# Some tests assume things like home directories and users exists
|
||||
GO_BUILDER_NAME = "nix";
|
||||
|
||||
GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
|
||||
|
||||
postConfigure = ''
|
||||
export GOCACHE=$TMPDIR/go-cache
|
||||
# this is compiled into the binary
|
||||
export GOROOT_FINAL=$out/share/go
|
||||
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
|
||||
# Independent from host/target, CC should produce code for the building system.
|
||||
export CC=${buildPackages.stdenv.cc}/bin/cc
|
||||
ulimit -a
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
(cd src && ./make.bash)
|
||||
'';
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
(cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
rm -r pkg/{bootstrap,obj}
|
||||
# Contains the wrong perl shebang when cross compiling,
|
||||
# since it is not used for anything we can deleted as well.
|
||||
rm src/regexp/syntax/make_perl_groups.pl
|
||||
'' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then ''
|
||||
mv bin/*_*/* bin
|
||||
rmdir bin/*_*
|
||||
${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
|
||||
rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH}
|
||||
''}
|
||||
'' else if (stdenv.hostPlatform != stdenv.targetPlatform) then ''
|
||||
rm -rf bin/*_*
|
||||
${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
|
||||
rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}
|
||||
''}
|
||||
'' else "");
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $GOROOT_FINAL
|
||||
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
|
||||
ln -s $GOROOT_FINAL/bin $out/bin
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
disallowedReferences = [ goBootstrap ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.12";
|
||||
homepage = "http://golang.org/";
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan orivej mic92 rvolosatovs Frostman ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
--- source.org/src/cmd/dist/test.go 2018-02-22 10:40:40.089632339 +0000
|
||||
+++ source/src/cmd/dist/test.go 2018-02-22 10:56:53.075193788 +0000
|
||||
@@ -526,21 +526,6 @@
|
||||
})
|
||||
}
|
||||
|
||||
- // Test internal linking of PIE binaries where it is supported.
|
||||
- if goos == "linux" && 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", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
|
||||
- return nil
|
||||
- },
|
||||
- })
|
||||
- }
|
||||
-
|
||||
// sync tests
|
||||
t.tests = append(t.tests, distTest{
|
||||
name: "sync_cpu",
|
||||
@@ -1,59 +0,0 @@
|
||||
diff -Naur a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go
|
||||
--- a/src/crypto/x509/root_cgo_darwin.go 2019-03-15 11:33:55.920232337 -0700
|
||||
+++ b/src/crypto/x509/root_cgo_darwin.go 2019-03-15 11:34:53.323180897 -0700
|
||||
@@ -270,11 +270,20 @@
|
||||
import "C"
|
||||
import (
|
||||
"errors"
|
||||
+ "io/ioutil"
|
||||
+ "os"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func loadSystemRoots() (*CertPool, error) {
|
||||
roots := NewCertPool()
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
|
||||
var data C.CFDataRef = 0
|
||||
var untrustedData C.CFDataRef = 0
|
||||
diff -Naur a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go
|
||||
--- a/src/crypto/x509/root_darwin.go 2019-03-15 11:33:55.920232337 -0700
|
||||
+++ b/src/crypto/x509/root_darwin.go 2019-03-15 11:36:21.205123541 -0700
|
||||
@@ -92,6 +92,14 @@
|
||||
verifyCh = make(chan rootCandidate)
|
||||
)
|
||||
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Using 4 goroutines to pipe into verify-cert seems to be
|
||||
// about the best we can do. The verify-cert binary seems to
|
||||
// just RPC to another server with coarse locking anyway, so
|
||||
diff -Naur a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
|
||||
--- a/src/crypto/x509/root_unix.go 2019-03-15 11:33:55.920232337 -0700
|
||||
+++ b/src/crypto/x509/root_unix.go 2019-03-15 11:37:15.737326340 -0700
|
||||
@@ -38,6 +38,13 @@
|
||||
|
||||
func loadSystemRoots() (*CertPool, error) {
|
||||
roots := NewCertPool()
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
|
||||
files := certFiles
|
||||
if f := os.Getenv(certFileEnv); f != "" {
|
||||
@@ -0,0 +1,67 @@
|
||||
{ stdenvNoCC, fetchurl, qemu, expect, writeScript, ncurses }:
|
||||
|
||||
let
|
||||
|
||||
# We execute the installer in qemu-user, because otherwise the
|
||||
# installer fails to open itself due to a failed stat() call. This
|
||||
# seems like an incompatibility of new Linux kernels to run this
|
||||
# ancient binary.
|
||||
performInstall = writeScript "perform-ow-install" ''
|
||||
#!${expect}/bin/expect -f
|
||||
|
||||
spawn env TERMINFO=${ncurses}/share/terminfo TERM=vt100 ${qemu}/bin/qemu-i386 [lindex $argv 0]
|
||||
|
||||
# Wait for button saying "I agree" with escape sequences.
|
||||
expect "gree"
|
||||
|
||||
# Navigate to "I Agree!" and hit enter.
|
||||
send "\t\t\n"
|
||||
|
||||
expect "Install Open Watcom"
|
||||
|
||||
# Where do we want to install to.
|
||||
send "$env(out)\n"
|
||||
|
||||
expect "will be installed"
|
||||
|
||||
# Select Full Installation, Next
|
||||
send "fn"
|
||||
|
||||
expect "Setup will now copy"
|
||||
|
||||
# Next
|
||||
send "n"
|
||||
|
||||
expect "completed successfully"
|
||||
send "\n"
|
||||
'';
|
||||
|
||||
in
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "open-watcom-bin";
|
||||
version = "1.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ftp.openwatcom.org/install/open-watcom-c-linux-${version}";
|
||||
sha256 = "1wzkvc6ija0cjj5mcyjng5b7hnnc5axidz030c0jh05pgvi4nj7p";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
installPhase = ''
|
||||
cp ${src} install-bin
|
||||
chmod +x install-bin
|
||||
|
||||
${performInstall} install-bin
|
||||
'';
|
||||
|
||||
meta = with stdenvNoCC.lib; {
|
||||
description = "A C/C++ Compiler (binary distribution)";
|
||||
homepage = "http://www.openwatcom.org/";
|
||||
license = licenses.watcom;
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
maintainers = [ maintainers.blitz ];
|
||||
};
|
||||
}
|
||||
@@ -4,18 +4,18 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "unison-code-manager";
|
||||
milestone_id = "M1j";
|
||||
milestone_id = "M1l";
|
||||
version = "1.0.${milestone_id}-alpha";
|
||||
|
||||
src = if (stdenv.isDarwin) then
|
||||
fetchurl {
|
||||
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-osx.tar.gz";
|
||||
sha256 = "1pvdjmasgl22inbr8nlizsg8s5zagn8bzwhaxqmwafkpsskz0hsg";
|
||||
sha256 = "0qbxakrp3p3k3k8a1m2g24ivs3c8j5rj7ij84i7k548505rva9qr";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-linux64.tar.gz";
|
||||
sha256 = "1xpblx405cp3mv0vrhcqwjlxvrhgmc77mxbvcy93srxja3qai1af";
|
||||
sha256 = "152yzv7j4nyp228ngzbhki9fid1xdqrjvl1rwxc05wq30jwwqx0x";
|
||||
};
|
||||
|
||||
# The tarball is just the prebuilt binary, in the archive root.
|
||||
|
||||
Reference in New Issue
Block a user