blob: f0331e3a2b60bc6ab9360f36511c881cb99fc516 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
diff --git a/Data/GraphViz/Commands.hs b/Data/GraphViz/Commands.hs
index 20e7dbe..514c29d 100644
--- a/Data/GraphViz/Commands.hs
+++ b/Data/GraphViz/Commands.hs
@@ -63,14 +63,14 @@ import System.IO (Handle, hPutStrLn, hSetBinaryMode, stderr)
-- -----------------------------------------------------------------------------
showCmd :: GraphvizCommand -> String
-showCmd Dot = "dot"
-showCmd Neato = "neato"
-showCmd TwoPi = "twopi"
-showCmd Circo = "circo"
-showCmd Fdp = "fdp"
-showCmd Sfdp = "sfdp"
-showCmd Osage = "osage"
-showCmd Patchwork = "patchwork"
+showCmd Dot = "@graphviz@/bin/dot"
+showCmd Neato = "@graphviz@/bin/neato"
+showCmd TwoPi = "@graphviz@/bin/twopi"
+showCmd Circo = "@graphviz@/bin/circo"
+showCmd Fdp = "@graphviz@/bin/fdp"
+showCmd Sfdp = "@graphviz@/bin/sfdp"
+showCmd Osage = "@graphviz@/bin/osage"
+showCmd Patchwork = "@graphviz@/bin/patchwork"
-- | The default command for directed graphs.
dirCommand :: GraphvizCommand
@@ -312,8 +312,11 @@ runGraphvizCanvas' d = runGraphvizCanvas (commandFor d) d
-- | Is the Graphviz suite of tools installed? This is determined by
-- whether @dot@ is available in the @PATH@.
+--
+-- Note: With nixpkgs, this will always return 'True' as graphviz'
+-- store paths are hardcoded instead of looking at @PATH@.
isGraphvizInstalled :: IO Bool
-isGraphvizInstalled = liftM isJust . findExecutable $ showCmd Dot
+isGraphvizInstalled = pure True -- :)
-- | If Graphviz does not seem to be available, print the provided
-- error message and then exit fatally.
|