Workspace rules (Nixpkgs)
Bazel

Workspace rules (Nixpkgs)


haskell_register_ghc_nixpkgs

haskell_register_ghc_nixpkgs(version, build_file, build_file_content, compiler_flags, compiler_flags_select, haddock_flags, repl_ghci_args, locale_archive, attribute_path, nix_file, nix_file_deps, locale, repositories, nix_file_content)

Register a package from Nixpkgs as a toolchain.

Toolchains can be used to compile Haskell code. To have this toolchain selected during toolchain resolution, set a host platform that includes the @io_tweag_rules_haskell//haskell/platforms:nixpkgs constraint value.

Attributes

version

Unknown; Required

build_file

Unknown; Optional

build_file_content

Unknown; Optional

compiler_flags

Unknown; Optional

compiler_flags_select

Unknown; Optional

haddock_flags

Unknown; Optional

repl_ghci_args

Unknown; Optional

locale_archive

Unknown; Optional

attribute_path

String; Optional

nix_file

Unknown; Optional

nix_file_deps

List of strings; Optional

locale

Unknown; Optional

repositories

Unknown; Optional

nix_file_content

String; Optional

Examples

haskell_register_ghc_nixpkgs(
    locale_archive = "@glibc_locales//:locale-archive",
    atttribute_path = "haskellPackages.ghc",
    version = "1.2.3",   # The version of GHC
)

Setting the host platform can be done on the command-line like in the following:

[email protected]_tweag_rules_haskell//haskell/platforms:linux_x86_64_nixpkgs