From 2028c2f3ff000f94abd5df82459c74cdf9493cb8 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 14 Jun 2022 19:12:18 +0800 Subject: [PATCH] go: Apply package exclusion equally The exclusion logic was moved out of getGoDirs but only buildPhase was updated causing checkPhase to possibly fail. This happened in golint as it has go files in testdata that are meant as testdata files and not go packages to test which caused the checkPhase to fail. This is a port of https://github.com/NixOS/nixpkgs/commit/ddcc7c67d280eb0ea76a9079c49c9f70c6cc2e4f --- builder/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builder/default.nix b/builder/default.nix index c64a012..f6a07b8 100644 --- a/builder/default.nix +++ b/builder/default.nix @@ -298,7 +298,7 @@ let if [ -n "$subPackages" ]; then echo "$subPackages" | sed "s,\(^\| \),\1./,g" else - find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique + find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique | grep -v "$exclude" fi } @@ -315,7 +315,6 @@ let export NIX_BUILD_CORES=1 fi for pkg in $(getGoDirs ""); do - grep -q "$exclude" <<<$pkg && continue echo "Building subPackage $pkg" buildGoDir install "$pkg" done