utdemir / hs-nix-template

A Haskell project template that uses Nix and comes with cabal-install, ghcid, ormolu, haskell-language-server and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding some workflow examples

Skyfold opened this issue · comments

My plan is to add:

  • How to add new development tool or dependency with niv (and link back to niv repo)
  • Note about keeping a nix-shell open while changing default.nix or using lorri
  • link how to setup docker builds

Let me know if I'm putting too much information.

I noticed that hoogle was missing from the resulting shell and pinned it down to an issue in nixos-20.03, see issue. In my next commit I'll switch it back to nixos-19.09.

I've also been playing around with a few different ways to set it up. I'll make a pull request for those changes since its quite a bit different.

Hey, thank you for doing this!

I think there is no harm adding a lot of information. If having all of them in README.md becomes unwieldy (we can decide this in future), we can always create a docs/ directory and link it from the README.

I'd be more concerned about downgrading the nixos version. Correct me if I'm wrong, but the issue is that usually the Hackage databases update less frequently there so we can end up with older versions of the libraries. I guess it's fine temporarily, but I think our objective should be to get the upstream issue fixed so we can use a more up-to-date branch.

You have a point, downgrading is not ideal. Instead we can use the nixos-unstable branch for now, that will have the latest package sets and their updates.

There is another issue I've been having with niv not updating sha256 when calling niv update. I'll test out the latest version and see if I need to make another bug report.

Not technically a bug with niv, I was just expecting it to realize the rev didn't match the url. Essentially niv assumes you never touch the sources.json. However, the version of niv in unstable has a bug with fetching sources so I added the latest to sources.json.

There are a lot of changes so I've made this pull request #6

All that is missing is a cachx build to make it fast for people to try.

@Skyfold is this issue mostly done? It looks to me like only the binary cache is left. We can create a separate issue for that and close this one.