From 138265ac84680c2113e5ce87249e754f28c1e079 Mon Sep 17 00:00:00 2001 From: vrom911 Date: Sat, 19 Aug 2017 18:13:24 +0300 Subject: [PATCH] Add no-js option for building --- Setup.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Setup.hs b/Setup.hs index 50eddcf..03cb1be 100644 --- a/Setup.hs +++ b/Setup.hs @@ -1,9 +1,14 @@ import Distribution.Simple import System.Process +import System.Environment (lookupEnv) main = do - hooks <- buildJS simpleUserHooks - defaultMainWithHooks hooks + js <- lookupEnv "NO_JS" + case js of + Just "true" -> defaultMain + _ -> do + hooks <- buildJS simpleUserHooks + defaultMainWithHooks hooks buildJS hooks = do let originalPostBuild = postBuild hooks