Giter VIP home page Giter VIP logo

Comments (6)

edwtjo avatar edwtjo commented on September 16, 2024 1

Since this is still open; I use the following shell.nix and it correctly detects the libraries, i.e. you just need to wrap diagrams-pandoc. I typically do nix-env -i -f shell.nix && nix-shell to invoke it.

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 > "
  '';
}

from diagrams-pandoc.

bergey avatar bergey commented on September 16, 2024

Can you be more specific about how you installed these things? Is it like nix-env -i or do you have some nix-shell environment within which the packages are in scope?

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.

from diagrams-pandoc.

YPares avatar YPares commented on September 16, 2024

I tried both. Both the nix-shell and the installation with nix-env -i had the same issue.
But ideally I'd like to use it through a nix-shell, like you did, yes.

from diagrams-pandoc.

bergey avatar bergey commented on September 16, 2024

OK, thank you for clarifying. I'll dust off my .nix files and add an
example of Nix usage. I probably won't get to it before Sunday.

On 2015-11-24 at 12:49, "Yves Parès (Ywen)" [email protected] wrote:

I tried both. Both the nix-shell and the installation with nix-env -i had
the same issue.
But ideally I'd like to use it through a nix-shell, like you do, yes.

2015-11-23 22:55 GMT+01:00 Daniel Bergey [email protected]:

Can you be more specific about how you installed these things? Is it like nix-env
-i or do you have some nix-shell environment within which the packages
are in scope?

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.


Reply to this email directly or view it on GitHub
#7 (comment)
.


Reply to this email directly or view it on GitHub:
#7 (comment)

from diagrams-pandoc.

epsilonhalbe avatar epsilonhalbe commented on September 16, 2024

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

from diagrams-pandoc.

alsam avatar alsam commented on September 16, 2024

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 cabal install SVGFonts - details on the package are here:
http://hackage.haskell.org/package/SVGFonts
the problem has been resolved for me - even succeeded in producing .pdf file with
pandoc -t latex diagrams_pandoc_example.md --filter diagrams-pandoc -o diagrams_pandoc_example.pdf -s
You might need to install other additional packages via cabal, say diagrams.

from diagrams-pandoc.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.