From 474c6e9ab033d605ec753ecb9041e3953778002f Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Mon, 11 Jan 2016 12:16:42 +0100 Subject: Add `cabal` as a build-tool for Nix --- Setup.hs | 4 +++- cabal-helper.cabal | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Setup.hs b/Setup.hs index ecb7539..e07b084 100644 --- a/Setup.hs +++ b/Setup.hs @@ -6,6 +6,7 @@ import Distribution.Simple.Install import Distribution.Simple.Register import Distribution.Simple.InstallDirs as ID import Distribution.Simple.LocalBuildInfo +import Distribution.Simple.Program import Distribution.PackageDescription import Control.Applicative @@ -17,7 +18,8 @@ import System.FilePath main :: IO () main = defaultMainWithHooks $ simpleUserHooks { instHook = inst, - copyHook = copy + copyHook = copy, + hookedPrograms = [ simpleProgram "cabal" ] } -- mostly copypasta from 'defaultInstallHook' diff --git a/cabal-helper.cabal b/cabal-helper.cabal index ac5f55d..b25a62c 100644 --- a/cabal-helper.cabal +++ b/cabal-helper.cabal @@ -89,6 +89,7 @@ Test-Suite spec Main-Is: Spec.hs Hs-Source-Dirs: tests, . GHC-Options: -Wall + Build-Tools: cabal Build-Depends: base >= 4.5 && < 5 , cabal-helper , extra -- cgit v1.2.3