module Reanimate.Driver.Magick
( magickCmd
) where
import System.IO.Unsafe (unsafePerformIO)
import System.Directory (findExecutable)
{-# NOINLINE magickCmd #-}
magickCmd :: String
magickCmd :: String
magickCmd = IO String -> String
forall a. IO a -> a
unsafePerformIO (IO String -> String) -> IO String -> String
forall a b. (a -> b) -> a -> b
$ do
Maybe String
mPath <- String -> IO (Maybe String)
findExecutable String
"magick"
String -> IO String
forall (f :: * -> *) a. Applicative f => a -> f a
pure (String -> IO String) -> String -> IO String
forall a b. (a -> b) -> a -> b
$ String -> (String -> String) -> Maybe String -> String
forall b a. b -> (a -> b) -> Maybe a -> b
maybe String
"convert" (String -> String -> String
forall a b. a -> b -> a
const String
"magick") Maybe String
mPath