go: format with nixpkgs-fmt

This commit is contained in:
zowoq 2021-06-04 13:18:06 +10:00
parent 155ae682a5
commit 3a365e0e50
4 changed files with 99 additions and 32 deletions

View File

@ -1,6 +1,20 @@
{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand
, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation
, mailcap, runtimeShell
{ lib
, stdenv
, fetchurl
, tzdata
, iana-etc
, runCommand
, perl
, which
, pkg-config
, patch
, procps
, pcre
, cacert
, Security
, Foundation
, mailcap
, runtimeShell
, buildPackages
, pkgsBuildTarget
, fetchpatch
@ -15,7 +29,7 @@ let
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
@ -183,16 +197,18 @@ stdenv.mkDerivation rec {
# {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
CC_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}cc"
else
null;
CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
CXX_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}c++"
else
null;
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
GOARM = toString (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
@ -202,7 +218,7 @@ stdenv.mkDerivation rec {
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
postConfigure = ''
export GOCACHE=$TMPDIR/go-cache

View File

@ -1,6 +1,20 @@
{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand
, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation
, mailcap, runtimeShell
{ lib
, stdenv
, fetchurl
, tzdata
, iana-etc
, runCommand
, perl
, which
, pkg-config
, patch
, procps
, pcre
, cacert
, Security
, Foundation
, mailcap
, runtimeShell
, buildPackages
, pkgsBuildTarget
, fetchpatch
@ -15,7 +29,7 @@ let
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
@ -186,16 +200,18 @@ stdenv.mkDerivation rec {
# {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
CC_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}cc"
else
null;
CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
CXX_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}c++"
else
null;
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
GOARM = toString (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
@ -205,7 +221,7 @@ stdenv.mkDerivation rec {
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
postConfigure = ''
export GOCACHE=$TMPDIR/go-cache

View File

@ -1,6 +1,21 @@
{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand
, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation, xcbuild
, mailcap, runtimeShell
{ lib
, stdenv
, fetchurl
, tzdata
, iana-etc
, runCommand
, perl
, which
, pkg-config
, patch
, procps
, pcre
, cacert
, Security
, Foundation
, xcbuild
, mailcap
, runtimeShell
, buildPackages
, pkgsBuildTarget
, fetchpatch
@ -15,7 +30,7 @@ let
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
@ -181,16 +196,18 @@ stdenv.mkDerivation rec {
# {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
CC_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}cc"
else
null;
CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
CXX_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}c++"
else
null;
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
# Hopefully avoids test timeouts on Hydra
@ -200,7 +217,7 @@ stdenv.mkDerivation rec {
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
postConfigure = ''
export GOCACHE=$TMPDIR/go-cache

View File

@ -1,6 +1,22 @@
{ pkgs, lib, stdenv, fetchurl, fetchgit, tzdata, iana-etc, runCommand
, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation
, mailcap, runtimeShell
{ pkgs
, lib
, stdenv
, fetchurl
, fetchgit
, tzdata
, iana-etc
, runCommand
, perl
, which
, pkg-config
, patch
, procps
, pcre
, cacert
, Security
, Foundation
, mailcap
, runtimeShell
, buildPackages
, pkgsBuildTarget
, fetchpatch
@ -13,7 +29,7 @@ let
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
@ -178,16 +194,18 @@ stdenv.mkDerivation rec {
# {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
CC_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}cc"
else
null;
CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
CXX_FOR_TARGET =
if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}c++"
else
null;
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
# Hopefully avoids test timeouts on Hydra
@ -197,7 +215,7 @@ stdenv.mkDerivation rec {
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
postConfigure = ''
export GOCACHE=$TMPDIR/go-cache