I'm using nix, stack and http-client-tls to GET/POST data from/to HTTPS in Haskell.
The problem is, stack exec project-exec fails with:
project-exe: security: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
However, if I setup pure: false for nix in stack.yaml, it can work normally.
So did I lose something in my nix env? How can I solve this?
main.hs:
{-# LANGUAGE OverloadedStrings #-}
--
module Main where
--
import qualified Data.ByteString.Lazy as B
--
import Network.HTTP.Client
import Network.HTTP.Client.TLS
--
url = "https://www.google.com.tw/search?q=test"
--
main :: IO ()
main = do
mgt <- newManager tlsManagerSettings
request <- parseRequest url
res <- httpLbs request mgt :: IO (Response B.ByteString)
print res
stack.yaml:
resolver: lts-14.11
packages:
- .
nix:
enable: true
pure: true
# shell-file: shell.nix
# packages: [ ]