Merge pull request #295077 from katexochen/go120/remove

This commit is contained in:
Sandro 2024-03-19 17:13:16 +01:00 committed by GitHub
commit 7eefea6d32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 81 additions and 264 deletions

View File

@ -15,6 +15,13 @@ buildGoModule rec {
subPackages = [ "." ];
checkFlags = [
# Test fails with:
# 'x509_test.go:201: server did not report bad certificate error;
# instead errored with [...] tls: unknown certificate authority (*url.Error)'
"-skip=^TestUntrustedClientCert$"
];
meta = {
homepage = "https://decred.org";
description = "A secure Decred wallet daemon written in Go (golang)";

View File

@ -36,8 +36,10 @@ buildGoModule rec {
passthru.tests = { inherit (nixosTests) magnetico; };
meta = with lib; {
# Build fails with Go >=1.21, couldn't be fixed by updating module dependencies.
broken = true;
description = "Autonomous (self-hosted) BitTorrent DHT search engine suite";
homepage = "https://github.com/boramalper/magnetico";
homepage = "https://github.com/ireun/magnetico";
license = licenses.agpl3;
badPlatforms = platforms.darwin;
maintainers = with maintainers; [ rnhmjoj ];

View File

@ -36,6 +36,12 @@ buildGoModule rec {
doCheck = false;
meta = with lib; {
# butler cannot be build with Go >=1.21
# See https://github.com/itchio/butler/issues/256
# and https://github.com/itchio/dmcunrar-go/issues/1
# The dependency causing the issue is marked as 'no maintainence intended'.
# Last butler release is from 05/2021.
broken = true;
description = "Command-line itch.io helper";
homepage = "https://github.com/itchio/butler";
license = licenses.mit;

View File

@ -1,5 +1,5 @@
{ lib
, buildGo120Module
, buildGoModule
, fetchFromGitHub
, substituteAll
, v2ray-domain-list-community
@ -11,18 +11,18 @@ let
geosite_data = "${v2ray-domain-list-community}/share/v2ray/geosite.dat";
};
in
buildGo120Module {
buildGoModule {
pname = "sing-geosite";
inherit (v2ray-domain-list-community) version;
src = fetchFromGitHub {
owner = "SagerNet";
repo = "sing-geosite";
rev = "4a32d56c1705f77668beb5828df0b0a051efdeb9";
hash = "sha256-P/EBcwJI2G9327BNi84R+q6BABx9DEKpN6ETTp8Q4NU=";
rev = "bbd9f11bb9245463bf9d5614b74014fe5803b989";
hash = "sha256-UQChYKgN5JZk+KZ2c5Ffh/rQi6/TVeFQkbH6mpLx4x8=";
};
vendorHash = "sha256-uQOmUXT2wd40DwwTCMnFFKd47eu+BPBDjiCGtUNFoKY=";
vendorHash = "sha256-C6idJDUp6AFe50tQ+4mmZsxuOKH8JSeC1p7XVRZ224E=";
patchPhase = ''
sed -i -e '/func main()/,/^}/d' -e '/"io"/a "io/ioutil"' main.go

View File

@ -1,5 +1,6 @@
{ lib
, stdenvNoCC
, fetchpatch
, fetchFromGitHub
, pkgsBuildBuild
, jq
@ -8,18 +9,18 @@
}:
let
generator = pkgsBuildBuild.buildGo120Module {
generator = pkgsBuildBuild.buildGoModule rec {
pname = "v2ray-geoip";
version = "unstable-2023-10-11";
version = "202403140037";
src = fetchFromGitHub {
owner = "v2fly";
repo = "geoip";
rev = "3182dda7b38c900f28505b91a44b09ec486e6f36";
hash = "sha256-KSRgof78jScwnUeMtryj34J0mBsM/x9hFE4H9WtZUuM=";
rev = version;
hash = "sha256-nqobjgeDvD5RYvCVVd14XC/tb/+SVfvdQUFZ3gfeDrI=";
};
vendorHash = "sha256-rlRazevKnWy/Ig143s8TZgV3JlQMlHID9rnncLYhQDc=";
vendorHash = "sha256-cuKcrYAzjIt6Z4wYg5R6JeL413NDwTub2fZndXEKdTo=";
meta = with lib; {
description = "GeoIP for V2Ray";

View File

@ -1,189 +0,0 @@
{ lib
, stdenv
, fetchurl
, tzdata
, substituteAll
, iana-etc
, Security
, Foundation
, xcbuild
, mailcap
, buildPackages
, pkgsBuildTarget
, threadsCross
, testers
, skopeo
, buildGo120Module
}:
let
useGccGoBootstrap = stdenv.buildPlatform.isMusl || stdenv.buildPlatform.isRiscV;
goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap117.nix { };
skopeoTest = skopeo.override { buildGoModule = buildGo120Module; };
goarch = platform: {
"aarch64" = "arm64";
"arm" = "arm";
"armv5tel" = "arm";
"armv6l" = "arm";
"armv7l" = "arm";
"i686" = "386";
"mips" = "mips";
"mips64el" = "mips64le";
"mipsel" = "mipsle";
"powerpc64le" = "ppc64le";
"riscv64" = "riscv64";
"s390x" = "s390x";
"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,
# to handle the cross-building case where build != host == target
targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
isCross = stdenv.buildPlatform != stdenv.targetPlatform;
in
stdenv.mkDerivation (finalAttrs: {
pname = "go";
version = "1.20.14";
src = fetchurl {
url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
hash = "sha256-Gu8yGg4+OLfpHS1+tkBAZmyr3Md9OD3jyVItDWm2f04=";
};
strictDeps = true;
buildInputs = [ ]
++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ];
depsBuildTarget = lib.optional isCross targetCC;
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross.package;
postPatch = ''
patchShebangs .
'';
patches = [
(substituteAll {
src = ./iana-etc-1.17.patch;
iana = iana-etc;
})
# Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix
(substituteAll {
src = ./mailcap-1.17.patch;
inherit mailcap;
})
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
(substituteAll {
src = ./tzdata-1.19.patch;
inherit tzdata;
})
./remove-tools-1.11.patch
./go_no_vendor_checks-1.16.patch
];
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 isCross then
"${targetCC}/bin/${targetCC.targetPrefix}cc"
else
null;
CXX_FOR_TARGET =
if isCross then
"${targetCC}/bin/${targetCC.targetPrefix}c++"
else
null;
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;
GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
buildPhase = ''
runHook preBuild
export GOCACHE=$TMPDIR/go-cache
# this is compiled into the binary
export GOROOT_FINAL=$out/share/go
export PATH=$(pwd)/bin:$PATH
${lib.optionalString isCross ''
# Independent from host/target, CC should produce code for the building system.
# We only set it when cross-compiling.
export CC=${buildPackages.stdenv.cc}/bin/cc
''}
ulimit -a
pushd src
./make.bash
popd
runHook postBuild
'';
preInstall = ''
# 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.system != stdenv.hostPlatform.system) then ''
mv bin/*_*/* bin
rmdir bin/*_*
${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
rm -rf pkg/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH} pkg/tool/${finalAttrs.GOHOSTOS}_${finalAttrs.GOHOSTARCH}
''}
'' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) ''
rm -rf bin/*_*
${lib.optionalString (!(finalAttrs.GOHOSTARCH == finalAttrs.GOARCH && finalAttrs.GOOS == finalAttrs.GOHOSTOS)) ''
rm -rf pkg/${finalAttrs.GOOS}_${finalAttrs.GOARCH} pkg/tool/${finalAttrs.GOOS}_${finalAttrs.GOARCH}
''}
'');
installPhase = ''
runHook preInstall
mkdir -p $GOROOT_FINAL
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
mkdir -p $out/bin
ln -s $GOROOT_FINAL/bin/* $out/bin
runHook postInstall
'';
disallowedReferences = [ goBootstrap ];
passthru = {
inherit goBootstrap skopeoTest;
tests = {
skopeo = testers.testVersion { package = skopeoTest; };
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "go version";
version = "go${finalAttrs.version}";
};
};
};
meta = with lib; {
changelog = "https://go.dev/doc/devel/release#go${lib.versions.majorMinor finalAttrs.version}";
description = "The Go Programming language";
homepage = "https://go.dev/";
license = licenses.bsd3;
maintainers = teams.golang.members;
platforms = platforms.darwin ++ platforms.linux;
mainProgram = "go";
};
})

View File

@ -2,18 +2,18 @@
buildGoModule rec {
pname = "goconvey";
version = "1.8.1";
version = "1.8.1-unstable-2024-03-06";
excludedPackages = "web/server/watch/integration_testing";
src = fetchFromGitHub {
owner = "smartystreets";
repo = "goconvey";
rev = "v${version}";
hash = "sha256-6SrlPsOqRxNNwEYx2t1v+rEHnQ58GvJtjo87SZo/Omk=";
rev = "a50310f1e3e53e63e2d23eb904f853aa388a5988";
hash = "sha256-w5eX/n6Wu2gYgCIhgtjqH3lNckWIDaN4r80cJW3JqFo=";
};
vendorHash = "sha256-020bxa0LErrvRKe3HirCWZDaBQFfKsWgl4mxfLtl1lg=";
vendorHash = "sha256-P4J/CZY95ks08DC+gSqG+eanL3zoiaoz1d9/ZvBoc9Q=";
ldflags = [ "-s" "-w" ];

View File

@ -2,17 +2,16 @@
buildGoModule rec {
pname = "gomacro";
rev = "b4c3ab9b218fd12f22759354f4f3e37635828d1f";
version = "20210131-${lib.strings.substring 0 7 rev}";
version = "2.7-unstable-2024-01-07";
src = fetchFromGitHub {
owner = "cosmos72";
repo = "gomacro";
inherit rev;
hash = "sha256-zxiEt/RR7g5Q0wMLuRaybnT5dFfPCyvt0PvDjL9BJDI=";
rev = "bf232d031933810d4a5382e17ce6c4b042a24304";
hash = "sha256-16u3eByFmnY12M2CEhSJKLIT0KP9nbvTv+BnqWwNTcg=";
};
vendorHash = "sha256-fQYuav0pT+/fGq0fmOWlsiVxA9tGV4JV8X7G3E6BZMU=";
vendorHash = "sha256-ok71QlBHGasGVt+CGwGqhgmx5JLkQcdlU/KX+W1A5Ws=";
subPackages = [ "." ];

View File

@ -16,6 +16,10 @@ buildGoModule rec {
doCheck = false;
meta = with lib; {
# Won't build with Go >1.20 because of outdated quic-go dependency and interface mismatches on update.
# https://github.com/libp2p/go-libp2p-daemon/issues/291
broken = true;
description = "a libp2p-backed daemon wrapping the functionalities of go-libp2p for use in other languages";
homepage = "https://github.com/libp2p/go-libp2p-daemon";
license = licenses.mit;
maintainers = with maintainers; [ fare ];

View File

@ -5,12 +5,12 @@
}:
let
version = "0.4.9";
version = "0.4.10";
src = fetchFromGitHub {
owner = "zinclabs";
repo = "zincsearch";
rev = "v${version}";
hash = "sha256-NIrLhbtpk1mFbWRFPxkH1r4mBiwT488MYBjRgIV7igE=";
hash = "sha256-lScwnmu4hM78Va7Yi5HA0E5f2WQXrZaeqjRYJYxnQ5E=";
};
webui = buildNpmPackage {
@ -40,7 +40,7 @@ buildGoModule rec {
cp -r ${webui}/share/zinc-ui web/dist
'';
vendorHash = "sha256-kP7QlES7VpZrOS4TGOFB9qciXGBEUVqzVLhz+2KiK98=";
vendorHash = "sha256-SZG5/ISGblpcwwR/HOKxFl9SthXpE+IYS0S+4HYtHos=";
subPackages = [ "cmd/zincsearch" ];
ldflags = [
@ -52,7 +52,7 @@ buildGoModule rec {
meta = with lib; {
description = "A lightweight alternative to elasticsearch that requires minimal resources, written in Go";
mainProgram = "zincsearch";
homepage = "https://zinc.dev";
homepage = "https://zincsearch-docs.zinc.dev/";
license = licenses.asl20;
maintainers = with maintainers; [ dit7ya ];
};

View File

@ -2,6 +2,7 @@
, stdenv
, buildGoModule
, fetchFromGitHub
, fetchpatch
, trezor-udev-rules
, AppKit
}:
@ -21,6 +22,13 @@ buildGoModule rec {
vendorHash = "sha256-wXgAmZEXdM4FcMCQbAs+ydXshCAMu7nl/yVv/3sqaXE=";
patches = [
(fetchpatch {
url = "https://github.com/trezor/trezord-go/commit/616473d53a8ae49f1099e36ab05a2981a08fa606.patch";
hash = "sha256-yKTwgqWr4L6XEPV85A6D1wpRdpef8hkIbl4LrRmOyuo=";
})
];
propagatedBuildInputs = lib.optionals stdenv.isLinux [ trezor-udev-rules ]
++ lib.optionals stdenv.isDarwin [ AppKit ];

View File

@ -2,24 +2,24 @@
buildGoModule rec {
pname = "gost";
version = "2.11.5";
version = "2.11.5-unstable-2024-02-02";
src = fetchFromGitHub {
owner = "ginuerzh";
repo = "gost";
rev = "v${version}";
sha256 = "sha256-UBjrWeBw9+qKQ/+1T1W/3e0vrigp540URIyM2d9iCE8=";
rev = "fd57e80709aba9581757b1cd63b7d8f75e2385d2";
sha256 = "sha256-GkXsiUcH5hppgkkt4ddVMLm5riUDORVhjWBGHZXti5A=";
};
patches = [
# Add go1.20 support. Remove with the next release.
# Bump quic-go to v0.41.0 for go 1.22 compatibility.
(fetchpatch {
url = "https://github.com/ginuerzh/gost/commit/0f7376bd10c913c7e6b1e7e02dd5fd7769975d78.patch";
hash = "sha256-pQNCvl7/huNrkM3+XHkGnvLYCzdjbMV6nef1KcMnKEw=";
url = "https://github.com/ginuerzh/gost/pull/1016/commits/c2e3f7e493bbb6ff1bc348f36e1a148d9d0c16ad.patch";
hash = "sha256-9OtuPIzzCymMAVbrDuhhPcxcac69gjAUm4ykXbH/pbo=";
})
];
vendorHash = "sha256-wAdNfhSPj9JUcI6Gcja6nRy68bVhV8B4PARR0WS9rjQ=";
vendorHash = "sha256-mq95eHyW8XkqyLApSqVB3bv5VFSu6FuPap/mTQj8a9M=";
postPatch = ''
substituteInPlace http2_test.go \

View File

@ -1,6 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
, installShellFiles
}:
@ -15,9 +16,18 @@ buildGoModule rec {
hash = "sha256-84t7qhLafNyPLgHmFQUsizEn6Us44dDTercGEm9lup4=";
};
patches = [
# Fix build failure with Go 1.21 by updating go4.org/unsafe/assume-no-moving-gc
# See https://github.com/labctl/labctl/pull/4
(fetchpatch {
url = "https://github.com/labctl/labctl/commit/615d05e94b991362beddce71c7ee34eae7fc93ff.patch";
hash = "sha256-4JrXSsg8rfuH6i8XyLd/qO6AibkRMDBIpfT8r1yS75c=";
})
];
nativeBuildInputs = [ installShellFiles ];
vendorHash = "sha256-vJ9aTMVwKrqjckdfCMvheTSG+gEtMLLQuBCz8Wc5blE=";
vendorHash = "sha256-Ycr/IZckIFysS9Goes58hhgh96UMRHjYWfWlQU23mXk=";
ldflags = [
"-X=github.com/labctl/labctl/app.version=${version}"

View File

@ -27,6 +27,9 @@ buildGoModule rec {
'';
meta = with lib; {
# Doesn't build with Go >=1.21
# https://github.com/norouter/norouter/issues/165
broken = true;
description = "Tool to handle unprivileged networking by using multiple loopback addresses";
homepage = "https://github.com/norouter/norouter";
license = licenses.asl20;

View File

@ -1735,7 +1735,6 @@ with pkgs;
butler = callPackage ../by-name/bu/butler/package.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
buildGoModule = buildGo120Module;
};
carbon-now-cli = callPackage ../tools/typesetting/carbon-now-cli { };
@ -2556,9 +2555,7 @@ with pkgs;
lab = callPackage ../applications/version-management/lab { };
labctl = callPackage ../tools/networking/labctl {
buildGoModule = buildGo120Module;
};
labctl = callPackage ../tools/networking/labctl { };
legit = callPackage ../applications/version-management/legit { };
@ -8712,9 +8709,7 @@ with pkgs;
goreplay = callPackage ../tools/networking/goreplay { };
gost = callPackage ../tools/networking/gost {
buildGoModule = buildGo120Module; # go 1.21 build failure
};
gost = callPackage ../tools/networking/gost { };
gource = callPackage ../applications/version-management/gource { };
@ -13935,7 +13930,6 @@ with pkgs;
trezord = callPackage ../servers/trezord {
inherit (darwin.apple_sdk.frameworks) AppKit;
buildGoModule = buildGo120Module;
};
trezor-agent = with python3Packages; toPythonApplication trezor-agent;
@ -15113,9 +15107,7 @@ with pkgs;
zip = callPackage ../tools/archivers/zip { };
zincsearch = callPackage ../servers/search/zincsearch {
buildGoModule = buildGo120Module;
};
zincsearch = callPackage ../servers/search/zincsearch { };
zkfuse = callPackage ../tools/filesystems/zkfuse { };
@ -25564,17 +25556,6 @@ with pkgs;
buildGoModule = buildGo121Module;
buildGoPackage = buildGo121Package;
# requires a newer Apple SDK
go_1_20 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.20.nix {
inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security;
};
buildGo120Module = darwin.apple_sdk_11_0.callPackage ../build-support/go/module.nix {
go = buildPackages.go_1_20;
};
buildGo120Package = darwin.apple_sdk_11_0.callPackage ../build-support/go/package.nix {
go = buildPackages.go_1_20;
};
# requires a newer Apple SDK
go_1_21 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.21.nix {
inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security;
@ -26011,7 +25992,6 @@ with pkgs;
engelsystem = callPackage ../servers/web-apps/engelsystem { };
envoy = callPackage ../servers/http/envoy {
go = go_1_20;
jdk = openjdk11_headless;
gn = gn1924;
};
@ -28012,9 +27992,7 @@ with pkgs;
goconst = callPackage ../development/tools/goconst { };
goconvey = callPackage ../development/tools/goconvey {
buildGoModule = buildGo120Module;
};
goconvey = callPackage ../development/tools/goconvey { };
go-callvis = callPackage ../development/tools/go-callvis { };
@ -28070,9 +28048,7 @@ with pkgs;
go-mod-graph-chart = callPackage ../development/tools/go-mod-graph-chart { };
gomacro = callPackage ../development/tools/gomacro {
buildGoModule = buildGo120Module;
};
gomacro = callPackage ../development/tools/gomacro { };
gomodifytags = callPackage ../development/tools/gomodifytags { };
@ -31026,9 +31002,7 @@ with pkgs;
gigalixir = callPackage ../tools/misc/gigalixir { };
go-libp2p-daemon = callPackage ../servers/go-libp2p-daemon {
buildGoModule = buildGo120Module;
};
go-libp2p-daemon = callPackage ../servers/go-libp2p-daemon { };
go-motion = callPackage ../development/tools/go-motion { };
@ -33102,9 +33076,7 @@ with pkgs;
markscribe = callPackage ../tools/text/markscribe { };
magnetico = callPackage ../applications/networking/p2p/magnetico {
buildGoModule = buildGo120Module;
};
magnetico = callPackage ../applications/networking/p2p/magnetico { };
mastodon-bot = nodePackages.mastodon-bot;
@ -33449,11 +33421,7 @@ with pkgs;
normalize = callPackage ../applications/audio/normalize { };
norouter = callPackage ../tools/networking/norouter {
# doesn't build with go 1.21
# https://github.com/norouter/norouter/issues/165
buildGoModule = buildGo120Module;
};
norouter = callPackage ../tools/networking/norouter { };
nqptp = callPackage ../tools/networking/nqptp { };
@ -36540,9 +36508,7 @@ with pkgs;
dcrctl = callPackage ../applications/blockchains/dcrctl { };
dcrd = callPackage ../applications/blockchains/dcrd { };
dcrwallet = callPackage ../applications/blockchains/dcrwallet {
buildGoModule = buildGo120Module;
};
dcrwallet = callPackage ../applications/blockchains/dcrwallet { };
eclair = callPackage ../applications/blockchains/eclair { };