summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tutorial/WORKSPACE
blob: 21d25c247207249b6c69105b789c802c22aa6530 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
workspace(name = "io_tweag_rules_haskell_tutorial")

local_repository(
    name = "io_tweag_rules_haskell",
    path = "..",
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@io_tweag_rules_haskell//haskell:repositories.bzl", "haskell_repositories")

haskell_repositories()

rules_nixpkgs_version = "0.5.2"

http_archive(
    name = "io_tweag_rules_nixpkgs",
    sha256 = "5a384daa57b49abf9f0b672852f1a66a3c52aecf9d4d2ac64f6de0fd307690c8",
    strip_prefix = "rules_nixpkgs-%s" % rules_nixpkgs_version,
    urls = ["https://github.com/tweag/rules_nixpkgs/archive/v%s.tar.gz" % rules_nixpkgs_version],
)

load(
    "@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
    "nixpkgs_cc_configure",
)

nixpkgs_cc_configure(
    nix_file = "@io_tweag_rules_haskell//nixpkgs:cc-toolchain.nix",
    repository = "@io_tweag_rules_haskell//nixpkgs:default.nix",
)

load(
    "@io_tweag_rules_haskell//haskell:nixpkgs.bzl",
    "haskell_register_ghc_nixpkgs",
)

haskell_register_ghc_nixpkgs(
    repositories = {
        "nixpkgs": "@io_tweag_rules_haskell//nixpkgs:default.nix",
    },
    version = "8.6.4",
)

load(
    "@io_tweag_rules_haskell//haskell:haskell.bzl",
    "haskell_register_ghc_bindists",
)

haskell_register_ghc_bindists(version = "8.6.4")