bazel-runfiles: Locate Bazel runfiles location

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

Please see the README on GitHub at https://github.com/tweag/rules_haskell/blob/master/tools/runfiles/README.md


[Skip to Readme]
Versions 0.7.0.0, 0.7.0.1
Dependencies base (>=4.7 && <5), bazel-runfiles, directory, filepath [details]
License Apache-2.0
Copyright 2018 Tweag I/O Limited
Author Tweag I/O Limited
Maintainer m@tweag.io
Category Build Tool
Home page https://github.com/tweag/rules_haskell#readme
Bug tracker https://github.com/tweag/rules_haskell/issues
Source repo head: git clone https://github.com/tweag/rules_haskell
Uploaded by shmish111 at Fri Nov 2 11:53:03 UTC 2018
Distributions NixOS:0.7.0.1, Stackage:0.7.0.1
Executables bazel-runfiles-exe
Downloads 64 total (64 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-11-02 [all 1 reports]
Hackage Matrix CI

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for bazel-runfiles-0.7.0.1

[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 "io_tweag_rules_haskell/tools/runfiles/test-data.txt")
    when (lines foo /= ["foo"]) -- ignore trailing newline
        $ error $ "Incorrect contents: got: " ++ show foo
    callProcess (Runfiles.rlocation r "io_tweag_rules_haskell/tools/runfiles/bin") []