From 1799ddf7f035aa54271f296023470477b2d49a8d Mon Sep 17 00:00:00 2001 From: sterni Date: Fri, 19 Mar 2021 18:49:51 +0100 Subject: fix(gs/xanthous): update xanthous.cabal, make CI catch such errors Since xanthous has a checked-in package.yaml and cabal file, the haskellPackages build infrastructure will use the package.yaml file for all builds. The resulting problem is that our CI won't actually catch build failures that would be observable with cabal or when building from the sdist. We fix that by filtering out the package.yaml file in pkg.nix additionally to the filters specified in .gitignore. For this we need gitignoreFilter from gitignore.nix which we expose as part of a functor set from third_party.gitignoreSource to maintain interface compatibility. Change-Id: I337185f484d2027341f38031dcd78898706904eb Reviewed-on: https://cl.tvl.fyi/c/depot/+/2609 Tested-by: BuildkiteCI Reviewed-by: glittershark Reviewed-by: tazjin --- users/glittershark/xanthous/pkg.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'users/glittershark/xanthous/pkg.nix') diff --git a/users/glittershark/xanthous/pkg.nix b/users/glittershark/xanthous/pkg.nix index fc303a3eda06..98a9b9b6a6b1 100644 --- a/users/glittershark/xanthous/pkg.nix +++ b/users/glittershark/xanthous/pkg.nix @@ -1,7 +1,16 @@ { pkgs ? (import ../../../. {}).third_party }: +let + ignore = pkgs.gitignoreSource.gitignoreFilter ./.; +in + import (pkgs.haskellPackages.haskellSrc2nix { name = "xanthous"; - src = pkgs.gitignoreSource ./.; + src = builtins.path { + name = "xanthous-source"; + path = ./.; + filter = path: type: ignore path type + || builtins.baseNameOf path == "package.yaml"; + }; extraCabal2nixOptions = "--hpack"; }) -- cgit 1.4.1