-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules not found when installed via Nix #7
Comments
Can you be more specific about how you installed these things? Is it like I think I used to have a shell.nix file that loaded all the necessary packages, within which I could run diagrams-pandoc. Getting HSE and Nix to work together is always tricky, though. |
I tried both. Both the nix-shell and the installation with nix-env -i had the same issue. |
OK, thank you for clarifying. I'll dust off my .nix files and add an On 2015-11-24 at 12:49, "Yves Parès (Ywen)" [email protected] wrote:
|
I experience the same thing with stack/cabal sandbox - I've created a new user and used per user global cabal install - then it worked |
I've stumbled upon the same problem: Error while interpreting
example = circle 1
/tmp/Diagram1804289383846930886.hs:9:8:
Could not find module ‘Graphics.SVGFonts’
Use -v to see a list of the files searched for. but after |
Since this is still open; I use the following with (import (fetchTarball
https://github.com/NixOS/nixpkgs/archive/2a83412f2a15a6eb416473a37140fe9d9fac8e3b.tar.gz){}).pkgs;
let
ext = self: with self; [ diagrams diagrams-contrib diagrams-pandoc pandoc SVGFonts ];
wrappedGhc = haskell.packages.lts-5.ghcWithPackages ext;
ghcVersion = wrappedGhc.version;
in
stdenv.mkDerivation rec {
pname = "DPENV";
version = "0.1";
name = pname + "-" + version;
buildInputs = [ makeWrapper ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
makeWrapper \
"${wrappedGhc}/bin/diagrams-pandoc" \
"$out/bin/diagrams-pandoc" \
--set NIX_GHC ${wrappedGhc}/bin/ghc \
--set NIX_GHC_LIBDIR ${wrappedGhc}/lib/ghc-${ghcVersion}
'';
shellHook = ''
export PS1="DP > "
'';
} |
Hi,
when trying to run the example, I get:
whereas when I run ghci manually, I can import Diagrams.Prelude without any problem.
(I installed GHC, pandoc and diagrams-pandoc through Nix, but as I said, ghci has no problem finding the required modules)
The text was updated successfully, but these errors were encountered: