Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Utility function for finding a directory relative to the package root directory.
Copied from https://github.com/input-output-hk/cardano-wallet/blob/master/lib/test-utils/src/Test/Utils/Paths.hs
Synopsis
- getGoldenDir ∷ Q Exp
- getRelPath ∷ FilePath → Q Exp
- inNixBuild ∷ IO Bool
Documentation
getGoldenDir ∷ Q Exp Source #
A TH function to get the path corresponding to the golden output directory relative to the package root directory.
getRelPath ∷ FilePath → Q Exp Source #
A TH function to get the path corresponding to the given FilePath
which
is relative to the package root directory.
It combines the current source file location and cabal file to locate the package directory in such a way that works in both the stack/cabal package build and ghci.
For the Nix build, rather than baking in a path that starts with /build
, it
makes the test data path relative to the current directory.
inNixBuild ∷ IO Bool Source #
Infer from environment variables whether we are running within a Nix build (and not just a nix-shell).