Skip to content

Commit 48ee0a4

Browse files
More minimization
1 parent a5e3b75 commit 48ee0a4

6 files changed

Lines changed: 2 additions & 391 deletions

File tree

BUILD.bazel

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
load(
2-
"@bazel_gazelle//:def.bzl",
3-
"DEFAULT_LANGUAGES",
4-
"gazelle",
5-
"gazelle_binary",
6-
)
71
load(
82
"@rules_haskell//haskell:defs.bzl",
93
"ghc_plugin",
@@ -14,37 +8,13 @@ load(
148

159
exports_files(["nixpkgs.nix"])
1610

17-
# gazelle:exclude {benchmarks,examples,jvm-streaming,jvm-batching}
18-
# gazelle:resolve gazelle_cabal jvm @openjdk//:lib
19-
2011
cc_library(
2112
name = "bctable",
2213
srcs = ["cbits/bctable.c"],
2314
hdrs = ["cbits/bctable.h"],
2415
strip_include_prefix = "cbits",
2516
)
2617

27-
ghc_plugin(
28-
name = "inline-java-plugin",
29-
args = ["$(JAVABASE)/bin/javac"],
30-
module = "Language.Java.Inline.Plugin",
31-
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
32-
tools = ["@bazel_tools//tools/jdk:current_java_runtime"],
33-
visibility = ["//visibility:public"],
34-
deps = [":inline-java"],
35-
)
36-
37-
gazelle(
38-
name = "gazelle",
39-
gazelle = ":gazelle_binary",
40-
)
41-
42-
gazelle_binary(
43-
name = "gazelle_binary",
44-
languages = DEFAULT_LANGUAGES + ["@io_tweag_gazelle_cabal//gazelle_cabal"],
45-
)
46-
47-
# rule generated from inline-java.cabal by gazelle_cabal
4818
haskell_library(
4919
name = "inline-java",
5020
# cbits/bctable.h is included here so it can be found by Plugin.hs
@@ -60,6 +30,5 @@ haskell_library(
6030
":bctable", # keep
6131
"@stackage//:base",
6232
"@stackage//:bytestring",
63-
"@stackage//:template-haskell",
6433
],
6534
)

WORKSPACE

Lines changed: 0 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ http_archive(
2929
urls = ["https://github.com/tweag/rules_nixpkgs/releases/download/v0.13.0/rules_nixpkgs-0.13.0.tar.gz"],
3030
)
3131

32-
33-
http_archive(
34-
name = "rules_nixpkgs_go",
35-
sha256 = "30271f7bd380e4e20e4d7132c324946c4fdbc31ebe0bbb6638a0f61a37e74397",
36-
strip_prefix = "rules_nixpkgs-0.13.0/toolchains/go",
37-
urls = ["https://github.com/tweag/rules_nixpkgs/releases/download/v0.13.0/rules_nixpkgs-0.13.0.tar.gz"],
38-
)
39-
40-
4132
load("@rules_nixpkgs_core//:nixpkgs.bzl", "nixpkgs_local_repository")
4233

4334
nixpkgs_local_repository(
@@ -64,88 +55,10 @@ load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
6455
stack_snapshot(
6556
name = "stackage",
6657
packages = [
67-
"Cabal",
68-
"aeson",
69-
"async",
7058
"base",
7159
"bytestring",
72-
"choice",
73-
"constraints",
74-
"containers",
75-
"criterion",
76-
"deepseq",
77-
"directory",
78-
"distributed-closure",
79-
"exceptions",
80-
"filemanip",
81-
"filepath",
82-
"ghc",
83-
"hspec",
84-
"hspec-discover",
85-
"inline-c",
86-
"language-java",
87-
"monad-logger",
88-
"mtl",
89-
"process",
90-
"QuickCheck",
91-
"quickcheck-text",
92-
"quickcheck-unicode",
93-
"split",
94-
"streaming",
95-
"template-haskell",
96-
"temporary",
97-
"text",
98-
"time",
99-
"vector",
100-
"unix",
101-
# dependencies of th-desugar
102-
"fail",
103-
"ghc-prim",
104-
"linear-base",
105-
"ordered-containers",
106-
"semigroups",
107-
"singletons",
108-
"singletons-base",
109-
"stm",
110-
"syb",
111-
"th-abstraction",
112-
"th-lift",
113-
"th-orphans",
114-
"transformers-compat",
115-
# dependencies of singletons
116-
"ghc-boot-th",
117-
"pretty",
118-
"transformers",
119-
# gazelle_cabal dependencies
120-
"json", # keep
121-
"path", # keep
122-
"path-io", # keep
12360
],
124-
extra_deps =
125-
{
126-
"zlib" : ["@zlib.dev//:zlib"],
127-
"streaming-commons" : ["@zlib.dev//:zlib"],
128-
},
129-
130-
# disable calling pkg-config
131-
flags = {"zlib": ["-pkg-config"]},
132-
133-
components_dependencies = {
134-
"attoparsec": """{"lib:attoparsec": ["lib:attoparsec-internal"]}""",
135-
},
136-
components =
137-
{
138-
"attoparsec": [
139-
"lib",
140-
"lib:attoparsec-internal",
141-
],
142-
"hspec-discover": [
143-
"lib",
144-
"exe",
145-
],
146-
},
14761
local_snapshot = "//:snapshot-9.6.7.yaml",
148-
# stack = "@stack_ignore_global_hints//:bin/stack" if ghc_version == "9.0.1" else None,
14962
)
15063

15164
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")
@@ -178,12 +91,6 @@ haskell_register_ghc_nixpkgs(
17891
],
17992
)
18093

181-
nixpkgs_package(
182-
name = "hspec-discover",
183-
attribute_path = "haskellPackages.hspec-discover",
184-
repository = "@nixpkgs",
185-
)
186-
18794
nixpkgs_package(
18895
name = "nixpkgs_zlib",
18996
attribute_path = "zlib",
@@ -211,125 +118,3 @@ cc_library(
211118
""",
212119
)
213120

214-
nixpkgs_package(
215-
name = "openjdk",
216-
attribute_path = "openjdk11",
217-
repository = "@nixpkgs",
218-
build_file_content = """
219-
filegroup(
220-
name = "bin",
221-
srcs = ["bin/javac"],
222-
visibility = ["//visibility:public"],
223-
)
224-
225-
filegroup(
226-
name = "libjvm",
227-
srcs = select(
228-
{ "@bazel_tools//src/conditions:darwin": ["lib/server/libjvm.dylib"],
229-
"@bazel_tools//src/conditions:linux_x86_64": ["lib/openjdk/lib/server/libjvm.so"],
230-
}),
231-
visibility = ["//visibility:public"],
232-
)
233-
234-
cc_library(
235-
name = "lib",
236-
srcs = [":libjvm"],
237-
hdrs = ["include/jni.h", "include/jni_md.h"],
238-
strip_include_prefix = "include",
239-
linkstatic = 1,
240-
visibility = ["//visibility:public"],
241-
)
242-
243-
# XXX Temporary workaround for
244-
# https://github.com/bazelbuild/bazel/issues/8180.
245-
genrule(
246-
name = "rpath",
247-
srcs = ["@openjdk//:libjvm"],
248-
cmd = "libjvm=$(location :libjvm); echo -rpath $$(dirname $$(realpath $$libjvm)) > $@",
249-
outs = ["openjdk_response_file"],
250-
visibility = ["//visibility:public"],
251-
)
252-
""",
253-
)
254-
255-
RULES_JVM_EXTERNAL_TAG = "3.3"
256-
RULES_JVM_EXTERNAL_SHA = "d85951a92c0908c80bd8551002d66cb23c3434409c814179c0ff026b53544dab"
257-
258-
http_archive(
259-
name = "rules_jvm_external",
260-
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
261-
sha256 = RULES_JVM_EXTERNAL_SHA,
262-
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
263-
)
264-
265-
load("@rules_jvm_external//:defs.bzl", "maven_install")
266-
267-
maven_install(
268-
artifacts = [
269-
"org.apache.commons:commons-collections4:4.1",
270-
"com.wizzardo:http:0.4",
271-
"com.wizzardo:epoll:0.3.4",
272-
"com.wizzardo:reactive-pg-client:0.10.2.1",
273-
"com.wizzardo.tools:tools-collections:0.23",
274-
"com.wizzardo.tools:tools-interfaces:0.23",
275-
],
276-
repositories = [
277-
"https://maven.google.com",
278-
"https://repo1.maven.org/maven2",
279-
],
280-
)
281-
282-
# gazelle setup
283-
284-
http_archive(
285-
name = "io_bazel_rules_go",
286-
sha256 = "130739704540caa14e77c54810b9f01d6d9ae897d53eedceb40fd6b75efc3c23",
287-
urls = [
288-
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.54.1/rules_go-v0.54.1.zip",
289-
"https://github.com/bazelbuild/rules_go/releases/download/v0.54.1/rules_go-v0.54.1.zip",
290-
],
291-
)
292-
293-
load("@rules_nixpkgs_go//:go.bzl", "nixpkgs_go_configure")
294-
295-
nixpkgs_go_configure(repository = "@nixpkgs")
296-
297-
298-
http_archive(
299-
name = "bazel_gazelle",
300-
sha256 = "49b14c691ceec841f445f8642d28336e99457d1db162092fd5082351ea302f1d",
301-
urls = [
302-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.44.0/bazel-gazelle-v0.44.0.tar.gz",
303-
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.44.0/bazel-gazelle-v0.44.0.tar.gz",
304-
],
305-
)
306-
307-
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
308-
309-
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
310-
311-
go_rules_dependencies()
312-
313-
314-
# go_repository added due to: https://github.com/bazelbuild/bazel-gazelle/issues/1217
315-
go_repository(
316-
name = "org_golang_x_xerrors",
317-
importpath = "golang.org/x/xerrors",
318-
sum = "h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=",
319-
version = "v0.0.0-20200804184101-5ec99f83aff1",
320-
)
321-
322-
gazelle_dependencies()
323-
324-
325-
http_archive(
326-
name = "io_tweag_gazelle_cabal",
327-
strip_prefix = "gazelle_cabal-ca8f68e250bea33815fb373320f9610582c42083",
328-
sha256 = "bd2ee67943007723b3425bf2fcbdb6b41b269c7bc03f01e40683d4b5f3984b3b",
329-
url = "https://github.com/tweag/gazelle_cabal/archive/ca8f68e.zip",
330-
)
331-
332-
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
333-
load("@io_tweag_gazelle_cabal//:defs.bzl", "gazelle_cabal_dependencies")
334-
gazelle_cabal_dependencies()
335-

inline-java.cabal

Lines changed: 0 additions & 37 deletions
This file was deleted.

shell-stack.nix

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)