bazel-runfiles: Locate Bazel runfiles location

[ apache, build-tool, library, program ] [ Propose Tags ]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],, 0.12
Dependencies base (>=4.7 && <5), bazel-runfiles, directory, filepath, transformers [details]
License Apache-2.0
Copyright 2018 Tweag I/O Limited
Author Tweag I/O Limited
Category Build Tool
Home page
Bug tracker
Source repo head: git clone
Uploaded by MathieuBoespflug at 2020-04-25T19:57:55Z
Distributions LTSHaskell:0.12, NixOS:0.12, Stackage:0.12
Executables bazel-runfiles-exe
Downloads 2583 total (24 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-04-25 [all 1 reports]

Readme for bazel-runfiles-0.12

[back to package description]

Bazel Runfiles

This is a small utility to enable discovery of the Bazel runfiles location. This is useful in tests for example.

module Main (main) where

import qualified Bazel.Runfiles as Runfiles
import Control.Monad (when)
import System.Process (callProcess)

main :: IO ()
main = do
    r <- Runfiles.create
    foo <- readFile (Runfiles.rlocation r "rules_haskell/tools/runfiles/test-data.txt")
    when (lines foo /= ["foo"]) -- ignore trailing newline
        $ error $ "Incorrect contents: got: " ++ show foo
    callProcess (Runfiles.rlocation r "rules_haskell/tools/runfiles/bin") []