From 3a365e0e506068ff30a261b486942a199312dc76 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 4 Jun 2021 13:18:06 +1000 Subject: [PATCH] go: format with nixpkgs-fmt --- pkgs/development/compilers/go/1.14.nix | 32 +++++++++++++++++------ pkgs/development/compilers/go/1.15.nix | 32 +++++++++++++++++------ pkgs/development/compilers/go/1.16.nix | 33 ++++++++++++++++++------ pkgs/development/compilers/go/2-dev.nix | 34 +++++++++++++++++++------ 4 files changed, 99 insertions(+), 32 deletions(-) diff --git a/pkgs/development/compilers/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index 92c1cbdfc18b..f1b52ff1e596 100644 --- a/pkgs/development/compilers/go/1.14.nix +++ b/pkgs/development/compilers/go/1.14.nix @@ -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 diff --git a/pkgs/development/compilers/go/1.15.nix b/pkgs/development/compilers/go/1.15.nix index 58cd616728c3..f5e0aed4d397 100644 --- a/pkgs/development/compilers/go/1.15.nix +++ b/pkgs/development/compilers/go/1.15.nix @@ -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 diff --git a/pkgs/development/compilers/go/1.16.nix b/pkgs/development/compilers/go/1.16.nix index 93c9fa5c7788..0b8341d816b8 100644 --- a/pkgs/development/compilers/go/1.16.nix +++ b/pkgs/development/compilers/go/1.16.nix @@ -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 diff --git a/pkgs/development/compilers/go/2-dev.nix b/pkgs/development/compilers/go/2-dev.nix index 4b541e8990e2..ec4ac1037490 100644 --- a/pkgs/development/compilers/go/2-dev.nix +++ b/pkgs/development/compilers/go/2-dev.nix @@ -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