I am using bazel 3.7.2 (the same project works OK with bazel 3.3.1)
In my build file I use:
cc_library( name = "xft", hdrs = ["@nixpkg