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