Ya, docs on nix mostly suck. It is one of the reasons I wanted to write that article, as a common easy starting point for Haskellers. A lot of learning, beyond that, happens by trial and error, reading other people's code, etc.
You don't happen to have any pointer to any documentation on how I can control the build when using pkgs.haskellPackages.developPackage?
For instance I have no use for profiling or docs at the moment.
You check in files generated by
cabal2nix
too?cabal2nix? That's old school. Don't use it.
developPackage
succeeds it (it usescallCabal2nix
underneath).Sure, but where do I found out stuff like that?
The only docs I've read so far are Gabriel's and yours.
Maybe the most pressing issue right now is how the f**k do I get
nix-shell
to start my choice of shell? :grinning_face_with_smiling_eyes:Ya, docs on nix mostly suck. It is one of the reasons I wanted to write that article, as a common easy starting point for Haskellers. A lot of learning, beyond that, happens by trial and error, reading other people's code, etc.
Try
nix-shell . --command fish
Hmm, no way of avoiding having to pass the shell explicitly all the time?
No way to get
nix-shell
to honour$SHELL
?Not sure. I don't stay long in nix-shell to bother finding anyway. :-) Usually I do one-off runs with
nix-shell --run
Typically that's either
nix-shell --run ghcid
ornix-shell --run 'cabal new-repl'
Yes, good point, I'll have to see what patterns emerge as I drink the Nix koolaid I guess.
I very often use
nix-shell --run
even to run non-Haskell programs. Likenix-shell -p tree --run 'tree -d'
. I don't even bother installing the package.You don't happen to have any pointer to any documentation on how I can control the build when using
pkgs.haskellPackages.developPackage
?For instance I have no use for profiling or docs at the moment.
Use
dontHaddock
(similar todontCheck
for disabling unit tests). I think for profiling it isdisableLibraryProfiling
anddisableExecutableProfiling
. cf. https://github.com/srid/rib/blob/master/default.nix#L40-L45I'm not really sure how/where to set
dontHaddock
though...