go: minor cleanup

This commit is contained in:
zowoq 2022-08-04 13:40:29 +10:00
parent eec7444d4b
commit 6f38b43c8c
3 changed files with 24 additions and 39 deletions

View file

@ -17,13 +17,9 @@
, runtimeShell
, buildPackages
, pkgsBuildTarget
, callPackage
, threadsCross ? null # for MinGW
, threadsCross
}:
# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
let
go_bootstrap = buildPackages.callPackage ./bootstrap116.nix { };
@ -36,19 +32,19 @@ let
'';
goarch = platform: {
"i686" = "386";
"x86_64" = "amd64";
"aarch64" = "arm64";
"arm" = "arm";
"armv5tel" = "arm";
"armv6l" = "arm";
"armv7l" = "arm";
"i686" = "386";
"mips" = "mips";
"mips64el" = "mips64le";
"mipsel" = "mipsle";
"powerpc64le" = "ppc64le";
"riscv64" = "riscv64";
"s390x" = "s390x";
"powerpc64le" = "ppc64le";
"mips64el" = "mips64le";
"x86_64" = "amd64";
}.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
# We need a target compiler which is still runnable at build time,
@ -57,7 +53,6 @@ let
isCross = stdenv.buildPlatform != stdenv.targetPlatform;
in
stdenv.mkDerivation rec {
pname = "go";
version = "1.17.13";
@ -80,7 +75,7 @@ stdenv.mkDerivation rec {
depsBuildTarget = lib.optional isCross targetCC;
depsTargetTarget = lib.optional (threadsCross != null) threadsCross;
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross;
hardeningDisable = [ "all" ];
@ -283,10 +278,10 @@ stdenv.mkDerivation rec {
disallowedReferences = [ goBootstrap ];
meta = with lib; {
homepage = "https://go.dev/";
description = "The Go Programming language";
homepage = "https://go.dev/";
license = licenses.bsd3;
maintainers = teams.golang.members;
platforms = platforms.linux ++ platforms.darwin;
platforms = platforms.darwin ++ platforms.linux;
};
}

View file

@ -18,13 +18,9 @@
, runtimeShell
, buildPackages
, pkgsBuildTarget
, callPackage
, threadsCross ? null # for MinGW
, threadsCross
}:
# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
let
go_bootstrap = buildPackages.callPackage ./bootstrap116.nix { };
@ -37,19 +33,19 @@ let
'';
goarch = platform: {
"i686" = "386";
"x86_64" = "amd64";
"aarch64" = "arm64";
"arm" = "arm";
"armv5tel" = "arm";
"armv6l" = "arm";
"armv7l" = "arm";
"i686" = "386";
"mips" = "mips";
"mips64el" = "mips64le";
"mipsel" = "mipsle";
"powerpc64le" = "ppc64le";
"riscv64" = "riscv64";
"s390x" = "s390x";
"powerpc64le" = "ppc64le";
"mips64el" = "mips64le";
"x86_64" = "amd64";
}.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
# We need a target compiler which is still runnable at build time,
@ -58,7 +54,6 @@ let
isCross = stdenv.buildPlatform != stdenv.targetPlatform;
in
stdenv.mkDerivation rec {
pname = "go";
version = "1.18.4";
@ -81,7 +76,7 @@ stdenv.mkDerivation rec {
depsBuildTarget = lib.optional isCross targetCC;
depsTargetTarget = lib.optional (threadsCross != null) threadsCross;
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross;
hardeningDisable = [ "all" ];
@ -288,10 +283,10 @@ stdenv.mkDerivation rec {
disallowedReferences = [ goBootstrap ];
meta = with lib; {
homepage = "https://go.dev/";
description = "The Go Programming language";
homepage = "https://go.dev/";
license = licenses.bsd3;
maintainers = teams.golang.members;
platforms = platforms.linux ++ platforms.darwin;
platforms = platforms.darwin ++ platforms.linux;
};
}

View file

@ -17,13 +17,9 @@
, runtimeShell
, buildPackages
, pkgsBuildTarget
, callPackage
, threadsCross ? null # for MinGW
, threadsCross
}:
# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
let
go_bootstrap = buildPackages.callPackage ./bootstrap116.nix { };
@ -36,19 +32,19 @@ let
'';
goarch = platform: {
"i686" = "386";
"x86_64" = "amd64";
"aarch64" = "arm64";
"arm" = "arm";
"armv5tel" = "arm";
"armv6l" = "arm";
"armv7l" = "arm";
"i686" = "386";
"mips" = "mips";
"mips64el" = "mips64le";
"mipsel" = "mipsle";
"powerpc64le" = "ppc64le";
"riscv64" = "riscv64";
"s390x" = "s390x";
"powerpc64le" = "ppc64le";
"mips64el" = "mips64le";
"x86_64" = "amd64";
}.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
# We need a target compiler which is still runnable at build time,
@ -57,7 +53,6 @@ let
isCross = stdenv.buildPlatform != stdenv.targetPlatform;
in
stdenv.mkDerivation rec {
pname = "go";
version = "1.19";
@ -80,7 +75,7 @@ stdenv.mkDerivation rec {
depsBuildTarget = lib.optional isCross targetCC;
depsTargetTarget = lib.optional (threadsCross != null) threadsCross;
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross;
hardeningDisable = [ "all" ];
@ -276,10 +271,10 @@ stdenv.mkDerivation rec {
disallowedReferences = [ goBootstrap ];
meta = with lib; {
homepage = "https://go.dev/";
description = "The Go Programming language";
homepage = "https://go.dev/";
license = licenses.bsd3;
maintainers = teams.golang.members;
platforms = platforms.linux ++ platforms.darwin;
platforms = platforms.darwin ++ platforms.linux;
};
}