I am attempting to run Haskell executables from the command line, following the example of this blog. My machine runs NixOS.
The blog is about compiling markdown literate haskell into html for publishing blog posts. One step in that process is to run the haskell program hscolour on the .lhs file to create a .mkd file with the code syntax-highlighted via html and css.
cat blah.lhs | hscolour -lit -css > blah.mkd
When I try to run this command, however, I get the following command not found error.
$ cat blah.lhs | hscolour -lit -css > blah.mkd
hscolour: command not found
I'm not sure whether this issue I'm having is specific to NixOS, or with making haskell executables available to the command line more broadly. How do I make haskell executables such as hscolour available from the command line?
I have tried running this command from within a nix-shell in which hscolour has been built. The hscolour command still was not found.
$ nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [hscolour])"
$ cat functor-proofs.lhs | hscolour -li
hscolour: command not found