go: convert alternating regex string to list of packages to exclude

This is just easier to read.
This commit is contained in:
Manuel Mendez 2022-02-26 10:01:37 -05:00 committed by zowoq
parent 64ca089436
commit 10d3e3a0f4
11 changed files with 11 additions and 13 deletions

View file

@ -15,7 +15,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
excludedPackages = "\\(tools\\|docgen\\)";
excludedPackages = [ "tools" "docgen" ];
ldflags =
let t = "github.com/rancher/k3d/v5/version"; in

View file

@ -19,7 +19,7 @@ buildGoModule rec {
# third_party/VENDOR-LICENSE breaks build/check as go files are still included
# docs is a tool for generating docs
excludedPackages = "\\(third_party\\|cmd/docs\\)";
excludedPackages = [ "third_party" "cmd/docs" ];
preCheck = ''
# some tests try to write to the home dir

View file

@ -24,7 +24,7 @@ buildGoPackage rec {
++ lib.optional stdenv.hostPlatform.isx86_64 dclxvi
++ lib.optionals gui [ wrapGAppsHook ];
tags = lib.optionals (!gui) [ "nogui" ];
excludedPackages = "\\(appengine\\|bn256cgo\\)";
excludedPackages = [ "appengine" "bn256cgo" ];
postPatch = lib.optionalString stdenv.hostPlatform.isx86_64 ''
grep -r 'bn256' | awk -F: '{print $1}' | xargs sed -i \
-e "s,golang.org/x/crypto/bn256,github.com/agl/pond/bn256cgo,g" \

View file

@ -11,7 +11,7 @@ buildGoPackage rec {
rev = "210d2dc333e90c7e3eedf4f2242507a8e83ed4ab";
goPackagePath = "github.com/tsenart/deadcode";
excludedPackages = "\\(cmd/fillswitch/test-fixtures\\)";
excludedPackages = "cmd/fillswitch/test-fixtures";
src = fetchFromGitHub {
inherit rev;

View file

@ -5,7 +5,7 @@ buildGoPackage rec {
version = "1.8.1";
goPackagePath = "github.com/go-delve/delve";
excludedPackages = "\\(_fixtures\\|scripts\\|service/test\\)";
excludedPackages = [ "_fixtures" "scripts" "service/test" ];
src = fetchFromGitHub {
owner = "go-delve";

View file

@ -4,7 +4,7 @@ buildGoModule rec {
pname = "gauge";
version = "1.4.3";
excludedPackages = ''\(build\|man\)'';
excludedPackages = [ "build" "man" ];
src = fetchFromGitHub {
owner = "getgauge";

View file

@ -14,7 +14,7 @@ buildGoModule rec {
# integration tests expect more file changes
# types tests are missing CodeLocation
excludedPackages = "\\(integration\\|types\\)";
excludedPackages = [ "integration" "types" ];
meta = with lib; {
homepage = "https://onsi.github.io/ginkgo/";

View file

@ -39,9 +39,7 @@ buildGoModule rec {
export GOTOOLDIR=$out/bin
'';
excludedPackages = "\\("
+ lib.concatStringsSep "\\|" ([ "vet" "cover" ])
+ "\\)";
excludedPackages = [ "vet" "cover" ];
# Set GOTOOLDIR for derivations adding this to buildInputs
postInstall = ''

View file

@ -12,7 +12,7 @@ buildGoModule rec {
doCheck = false;
excludedPackages = "\\(cmd/fillswitch/test-fixtures\\)";
excludedPackages = "cmd/fillswitch/test-fixtures";
src = fetchFromGitHub {
inherit rev;

View file

@ -4,7 +4,7 @@ buildGoModule rec {
pname = "grafana";
version = "8.4.2";
excludedPackages = "\\(alert_webhook_listener\\|clean-swagger\\|release_publisher\\|slow_proxy\\|slow_proxy_mac\\|macaron\\)";
excludedPackages = [ "alert_webhook_listener" "clean-swagger" "release_publisher" "slow_proxy" "slow_proxy_mac" "macaron" ];
src = fetchFromGitHub {
rev = "v${version}";

View file

@ -18,7 +18,7 @@ buildGoModule rec {
vendorSha256 = "sha256-d3aOX4iMlhlxgYbqCHCIFKXunVha0Fw4ZBmy4OA6EhI=";
excludedPackages = "\\(sample\\|webhook\\|help\\)";
excludedPackages = [ "sample" "webhook" "help" ];
tags = [] ++ lib.optionals pivKeySupport [ "pivkey" ] ++ lib.optionals pkcs11Support [ "pkcs11key" ];