summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-07-04T10·19+0100
committerVincent Ambo <tazjin@google.com>2019-07-04T10·19+0100
commit0bc731ee1b0d065c5c39445372286d16a407cd31 (patch)
tree0371084d647aaca6191f7eae5d16919e13cceccc
parent64275e446e442c9a0a860969501158ed93058441 (diff)
feat(build): Add WORKSPACE configuration for Bazel r/19
This sets up Haskell & Nix rules in the workspace.
-rw-r--r--WORKSPACE39
1 files changed, 39 insertions, 0 deletions
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 000000000000..bb69b80a3c56
--- /dev/null
+++ b/WORKSPACE
@@ -0,0 +1,39 @@
+# -*- mode: bazel; -*-
+#
+# This workspace configuration loads all Bazel rule sets that need to
+# be available in the entire repository.
+
+workspace(name = "tazjin_monorepo")
+
+# SECTION: Nix
+
+local_repository(
+  name = "io_tweag_rules_nixpkgs",
+  path = "third_party/bazel/rules_nixpkgs",
+)
+
+load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_local_repository", "nixpkgs_package")
+
+# SECTION: Haskell
+
+local_repository(
+  name = "io_tweag_rules_haskell",
+  path = "third_party/bazel/rules_haskell",
+)
+
+load(
+    "@io_tweag_rules_haskell//haskell:repositories.bzl",
+    "haskell_repositories"
+)
+
+haskell_repositories()
+
+load(
+    "@io_tweag_rules_haskell//haskell:nixpkgs.bzl",
+    "haskell_register_ghc_nixpkgs",
+)
+
+haskell_register_ghc_nixpkgs(
+    version = "8.6.4",
+    repositories = { "nixpkgs": "default.nix" }
+)