I’m totally new at Haskell, and I’m trying to start it using Nix. I was hoping to get some hints regarding these three issues I get.
what works
with import <nixpkgs> {};
let
ghc = haskellPackages.ghcWithHoogle (ps: with ps; [
protolude
cabal-install hlint
hdevtools
stylish-haskell
hindent
]);
in
stdenv.mkDerivation {
name = "myenv";
buildInputs = [ ghc ];
}
what doesn’t
ghc-mod
Adding ghc-mod
to the package list I get:
Using Parsec parser
Configuring cabal-helper-0.8.1.2...
CallStack (from HasCallStack):
die', called at ./Distribution/Simple/Configure.hs:958:20 in Cabal-2.2.0.1-FmPcs9btIHM2Dcb9OsF5gI:Distribution.Simple.Configure
configureFinalizedPackage, called at ./Distribution/Simple/Configure.hs:462:12 in Cabal-2.2.0.1-FmPcs9btIHM2Dcb9OsF5gI:Distribution.Simple.Configure
configure, called at ./Distribution/Simple.hs:596:20 in Cabal-2.2.0.1-FmPcs9btIHM2Dcb9OsF5gI:Distribution.Simple
confHook, called at ./Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.2.0.1-FmPcs9btIHM2Dcb9OsF5gI:Distribution.Simple.UserHooks
configureAction, called at ./Distribution/Simple.hs:178:19 in Cabal-2.2.0.1-FmPcs9btIHM2Dcb9OsF5gI:Distribution.Simple
defaultMainHelper, called at ./Distribution/Simple.hs:115:27 in Cabal-2.2.0.1-FmPcs9btIHM2Dcb9OsF5gI:Distribution.Simple
defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing dependencies:
pretty-show >=1.8.1 && <1.9, temporary >=1.2.1 && <1.3
emailparse
Adding emailparse
I get:
Setup: Encountered missing dependencies:
QuickCheck ==2.10.*,
base ==4.10.*,
either >=4.4.0 && <4.5,
tasty ==0.11.*,
tasty-hunit ==0.9.*,
tasty-quickcheck ==0.9.*
purebread-email
This library is, according to Hackage, provided in Nix, but I don’t find it in NixPackages.
Am I missing something?
I guess the first two problems can be solved by some overlay magic. I’d be grateful for an example on one of them, so then I can try my hands at the other.
The third, I can try to write my derivation, but I’m curious how the integration with Hackage is manager, and how tight it is.
Maybe a fourth question would be: are these typical problems I’d have also using just vanilla cabal
and stack
, or does Nix get in the way “a lot” usually?
I just don’t want to add Nix pain on top of the inevitable, though initial, Haskell pains