bazel-runfiles-0.12: Locate Bazel runfiles location

Safe HaskellSafe
LanguageHaskell2010

Bazel.Runfiles

Description

This module enables finding data dependencies ("runfiles") of Haskell binaries at runtime.

For more information, see: https://github.com/bazelbuild/bazel/issues/4460

Synopsis

Documentation

data Runfiles Source #

Reference to Bazel runfiles, runfiles root or manifest file.

Instances
Show Runfiles Source # 
Instance details

Defined in Bazel.Runfiles

create :: HasCallStack => IO Runfiles Source #

Locate the runfiles directory or manifest for the current binary.

This behaves according to the specification in: https://docs.google.com/document/d/e/2PACX-1vSDIrFnFvEYhKsCMdGdD40wZRBX3m3aZ5HhVj4CtHPmiXKDCxioTUbYsDydjKtFDAzER5eg7OjJWs3V/pub

rlocation :: Runfiles -> FilePath -> FilePath Source #

Construct a path to a data dependency within the given runfiles.

For example: rlocation "myworkspace/mypackage/myfile.txt"

env :: Runfiles -> [(String, String)] Source #

Set environmental variables for locating the given runfiles directory.

Note that Bazel will set these automatically when it runs tests (bazel test). However, it will not automatically set them during "bazel run"; thus, non-test binaries should set the environment manually for processes that they call.