Skip to content

Commit

Permalink
Don't import boot packages from nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Mattia committed Jan 23, 2019
1 parent 513b14c commit 5d38dff
Show file tree
Hide file tree
Showing 51 changed files with 148 additions and 130 deletions.
12 changes: 5 additions & 7 deletions tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ haskell_proto_toolchain(
plugin = "@hackage-proto-lens-protoc//:bin/proto-lens-protoc",
protoc = "@com_google_protobuf//:protoc",
deps = [
"@hackage//:base",
"@hackage//:bytestring",
"@hackage//:containers",
"//tests/hackage:base",
"//tests/hackage:bytestring",
"//tests/hackage:containers",
"//tests/hackage:text",
"@hackage//:data-default-class",
"@hackage//:deepseq",
"@hackage//:lens-family",
"@hackage//:lens-family-core",
"@hackage//:lens-labels",
"@hackage//:mtl",
"@hackage//:proto-lens",
"@hackage//:text",
],
)

Expand Down Expand Up @@ -133,9 +133,7 @@ rule_test(
name = "test-haddock",
size = "small",
generates = [
"haddock/base-4.12.0.0",
"haddock/index",
"haddock/template-haskell-2.14.0.0",
"haddock/testsZShaddockZShaddock-lib-a",
"haddock/testsZShaddockZShaddock-lib-b",
"haddock/testsZShaddockZShaddock-lib-deep",
Expand Down Expand Up @@ -365,7 +363,7 @@ haskell_binary(
name = "run-tests",
srcs = ["RunTests.hs"],
deps = [
"@hackage//:base",
"//tests/hackage:base",
"@hackage//:hspec",
"@hackage//:hspec-core",
"@hackage//:process",
Expand Down
6 changes: 3 additions & 3 deletions tests/BUILD.zlib
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ haskell_library(
]),
deps = [
":zlib-import",
"@hackage//:base",
"@hackage//:bytestring",
"@hackage//:ghc-prim",
"//tests/hackage:base",
"//tests/hackage:bytestring",
"//tests/hackage:ghc-prim",
],
)
2 changes: 1 addition & 1 deletion tests/binary-dynamic/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ haskell_test(
srcs = ["Main.hs"],
linkstatic = False,
visibility = ["//visibility:public"],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)
6 changes: 3 additions & 3 deletions tests/binary-indirect-cbits/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ haskell_binary(
srcs = ["Main.hs"],
linkstatic = False,
deps = [
"//tests/hackage:base",
"//tests/library-with-cbits",
"@hackage//:base",
],
)

Expand All @@ -19,8 +19,8 @@ haskell_binary(
srcs = ["Main.hs"],
linkstatic = False,
deps = [
"//tests/hackage:base",
"//tests/library-with-cbits:library-with-cbits-static",
"@hackage//:base",
],
)

Expand All @@ -29,7 +29,7 @@ haskell_binary(
srcs = ["Main.hs"],
linkstatic = True,
deps = [
"//tests/hackage:base",
"//tests/library-with-cbits:library-with-cbits-static",
"@hackage//:base",
],
)
6 changes: 3 additions & 3 deletions tests/binary-linkstatic-flag/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ haskell_library(
name = "HsLib",
srcs = ["HsLib.hs"],
deps = [
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -28,7 +28,7 @@ haskell_test(
deps = [
":HsLib",
":c-lib",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -39,7 +39,7 @@ haskell_test(
deps = [
":HsLib",
":c-lib",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand Down
8 changes: 1 addition & 7 deletions tests/binary-simple/BUILD
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
load(
"@io_tweag_rules_haskell//haskell:haskell.bzl",
"haskell_import",
"haskell_test",
)

package(default_testonly = 1)

haskell_import(
name = "base_pkg",
package = "base",
)

haskell_test(
name = "binary-simple",
srcs = ["Main.hs"],
visibility = ["//visibility:public"],
deps = [":base_pkg"],
deps = ["//tests/hackage:base"],
)
2 changes: 1 addition & 1 deletion tests/binary-with-compiler-flags/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ haskell_test(
"-with-rtsopts=-N2 -qg -I0 -n2m -A128m",
"-XLambdaCase",
],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)
4 changes: 2 additions & 2 deletions tests/binary-with-data/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ haskell_test(
# Regular file input:
data = ["bin1-input"],
visibility = ["//visibility:public"],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)

haskell_test(
Expand All @@ -21,7 +21,7 @@ haskell_test(
data = [":bin1"],
visibility = ["//visibility:public"],
deps = [
"@hackage//:base",
"//tests/hackage:base",
"@hackage//:process",
],
)
2 changes: 1 addition & 1 deletion tests/binary-with-lib-dynamic/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ haskell_test(
visibility = ["//visibility:public"],
deps = [
":lib",
"@hackage//:base",
"//tests/hackage:base",
],
)
2 changes: 1 addition & 1 deletion tests/binary-with-lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ haskell_test(
visibility = ["//visibility:public"],
deps = [
":lib",
"@hackage//:base",
"//tests/hackage:base",
],
)
2 changes: 1 addition & 1 deletion tests/binary-with-link-flags/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ haskell_test(
srcs = ["Main.hs"],
compiler_flags = ["-threaded"],
visibility = ["//visibility:public"],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)
2 changes: 1 addition & 1 deletion tests/binary-with-main/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ haskell_test(
srcs = ["MainIsHere.hs"],
main_function = "MainIsHere.this",
visibility = ["//visibility:public"],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)
4 changes: 2 additions & 2 deletions tests/binary-with-prebuilt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ haskell_test(
srcs = ["Main.hs"],
visibility = ["//visibility:public"],
deps = [
"@hackage//:base",
"//tests/hackage:base",
"//tests/hackage:template-haskell",
"@hackage//:streaming",
"@hackage//:template-haskell",
"@hackage//:void",
],
)
2 changes: 1 addition & 1 deletion tests/binary-with-sysdeps/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ haskell_test(
visibility = ["//visibility:public"],
deps = [
":zlib",
"@hackage//:base",
"//tests/hackage:base",
],
)
2 changes: 1 addition & 1 deletion tests/c-compiles-still/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ haskell_library(
srcs = ["Foo.hs"],
deps = [
"//tests/data:ourclibrary",
"@hackage//:base",
"//tests/hackage:base",
],
)
4 changes: 2 additions & 2 deletions tests/c-compiles/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ haskell_library(
srcs = ["Lib.hs"],
deps = [
"//tests/data:ourclibrary",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -21,6 +21,6 @@ haskell_test(
visibility = ["//visibility:public"],
deps = [
":hs-lib",
"@hackage//:base",
"//tests/hackage:base",
],
)
2 changes: 1 addition & 1 deletion tests/c2hs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ haskell_library(
":foo",
"@c2hs_repo//:baz",
],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)
4 changes: 2 additions & 2 deletions tests/cc_haskell_import/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ haskell_library(
srcs = ["LibA.hs"],
deps = [
"//tests/data:ourclibrary",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -20,7 +20,7 @@ haskell_library(
srcs = ["LibB.hs"],
deps = [
":hs-lib-a",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand Down
6 changes: 3 additions & 3 deletions tests/cpp_macro_conflict/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package(default_testonly = 1)
haskell_library(
name = "bytestring",
srcs = ["BS.hs"],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)

# This depends on two packages "bytestring"
Expand All @@ -30,7 +30,7 @@ haskell_test(
}),
deps = [
":bytestring",
"@hackage//:base",
"@hackage//:bytestring",
"//tests/hackage:base",
"//tests/hackage:bytestring",
],
)
4 changes: 2 additions & 2 deletions tests/encoding/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ haskell_test(
"unicode.txt",
],
deps = [
"@hackage//:base",
"@hackage//:template-haskell",
"//tests/hackage:base",
"//tests/hackage:template-haskell",
],
)
8 changes: 4 additions & 4 deletions tests/extra-source-files/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ haskell_library(
"ld-options.txt",
],
deps = [
"@hackage//:base",
"@hackage//:template-haskell",
"//tests/hackage:base",
"//tests/hackage:template-haskell",
],
)

Expand All @@ -38,7 +38,7 @@ haskell_test(
"ld-options.txt",
],
deps = [
"@hackage//:base",
"@hackage//:template-haskell",
"//tests/hackage:base",
"//tests/hackage:template-haskell",
],
)
10 changes: 5 additions & 5 deletions tests/failures/transitive-deps/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package(default_testonly = 1)
haskell_library(
name = "lib-a",
srcs = ["LibA.hs"],
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)

haskell_library(
Expand All @@ -17,7 +17,7 @@ haskell_library(
visibility = ["//visibility:private"],
deps = [
":lib-a",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -40,7 +40,7 @@ haskell_library(
srcs = ["LibC.hs"],
deps = [
":lib-b",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -51,7 +51,7 @@ haskell_library(
tags = ["manual"],
deps = [
":lib-b",
"@hackage//:base",
"//tests/hackage:base",
],
)

Expand All @@ -61,6 +61,6 @@ haskell_library(
deps = [
":lib-a",
":lib-b",
"@hackage//:base",
"//tests/hackage:base",
],
)
6 changes: 3 additions & 3 deletions tests/generated-modules/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ haskell_library(
name = "GenModule",
srcs = [":generate-genmodule"],
src_strip_prefix = "src",
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)

genrule(
Expand All @@ -33,7 +33,7 @@ haskell_library(
name = "BinModule",
srcs = [":generate-binmodule"],
src_strip_prefix = "src",
deps = ["@hackage//:base"],
deps = ["//tests/hackage:base"],
)

genrule(
Expand All @@ -51,6 +51,6 @@ haskell_test(
deps = [
":BinModule",
":GenModule",
"@hackage//:base",
"//tests/hackage:base",
],
)
Loading

0 comments on commit 5d38dff

Please sign in to comment.