abarbu / matplotlib-haskell

Haskell bindings for Python's Matplotlib
Other
85 stars 12 forks source link

nix module not loading python correctly #19

Open patrickaldis opened 1 year ago

patrickaldis commented 1 year ago

currently have a file script.hs containing only the following:

#!/usr/bin/env nix-shell
#!nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (pkgs: [ pkgs.matplotlib])"

import Graphics.Matplotlib
main = onscreen $ contourF (\a b -> sin (a*pi/180.0) + cos (b*pi/180.0)) (-100) 100 (-200) 200 10

However, the only output I get is:

env: 'python3': No such file or directory

Maybe my undestanding of setting up a nix environment is wrong? Appreciate any help

patrickaldis commented 1 year ago

I can also add python3 with matplotlib, scipy manually - and this works!, by just adding another package to nix-shell. But I was under the impression this was what the nix-shell was for (#9)