name:                   nix-paths
version:                1.0.1
synopsis:               Knowledge of Nix's installation directories.
description:            This module provides full paths to various Nix
                        utilities, like @nix-store@, @nix-instantiate@, and
                        @nix-env@.
category:               Distribution, Nix
homepage:               https://github.com/peti/nix-paths
bug-reports:            https://github.com/peti/nix-paths/issues
author:                 Peter Simons
maintainer:             simons@cryp.to
license:                BSD3
license-file:           LICENSE
build-type:             Custom
cabal-version:          >= 1.10
tested-with:            GHC > 7.2 && < 8.3

flag allow-relative-paths
  description:          If any of the required Nix tools are missing at
                        build-time, compile a run-time $PATH dependent
                        variant of this library instead of failing. This is
                        useful for test environment such as Travis-CI, which
                        may not have Nix installed.
  default:              False
  manual:               True

source-repository head
  type: git
  location: https://github.com/peti/nix-paths

library
  default-language:     Haskell2010
  hs-source-dirs:       src
  exposed-modules:      Nix.Paths, Nix.FindFile
  build-depends:        base < 5, process
  if !flag(allow-relative-paths)
    build-tools:        nix-instantiate, nix-build, nix-env, nix-store, nix-hash