Video Tutorial: How to Fix Broken Haskell Packages in Nix

I created a brief video tutorial that shows how to fix a broken Haskell package build. I hope it might be useful to others. I’ll appreciate any constructive feedback, questions, or suggestions for other How-To videos to make. :slight_smile:

Here is the link: https://www.youtube.com/watch?v=KLhkAEk8I20

Peter

14 Likes

This is really great! Also, I think you have a nice voice for narrating videos.

suggestions for other How-To videos to make

One thing I personally would really like to see is a video explaining how you update the haskell-updates branch. I imagine it involves running hackage2nix, but seeing you talk through all the steps would be really nice. Also, if https://github.com/peti/ci is involved in the process, hearing how that all works out would be really interesting.

Here’s some other ideas for things that I’ve had trouble with in the past, and I’ve seen other users ask about as well:

  • How to use callCabal2nix, callHackage, and callHackageDirect to easily build Haskell packages that may not be on Hackage. Maybe building local packages as well?
  • How to use shellFor to easily setup a development environment (additionally with tools like cabal and ghcid available).
  • The difference between configuration-common.nix, configuration-nix.nix, and configuration-ghc-*.*.x.nix and examples of when to put overrides in each.
  • The different ways of overriding/adding packages in the Haskell package sets. (packageOverrides vs overrides)
1 Like

I don’t know for python but lua and vim have scripts embedded in nixpkgs, which make it easy to regenerate the nix files, experiment a bit. the haskell ecosystem is huge with some specifities so I understand that we don’t necessarily want the whole infra in nixpkgs, but integrating this small script https://github.com/NixOS/nixpkgs/pull/62105 would already allow to play a bit, unbreak some packages without having to clone an extra repo.

1 Like

Excellent work @peti. Only thing I’d add is a macro for {^_^} so we can point newbies at this thread when they ask about broken haskell packages on IRC.

<s>You forgot to ask people to like, comment and subscribe, and didn’t have a 25-second introduction before you started showing anything useful.</s>

1 Like

Awesome! I learned a lot. It would be good to have this as a blog post as well, so one could copy-paste the commands, and read at one’s own pace.

1 Like

Thank you very much for the extensive list of suggestions, @cdepillabout. I’ll need a while to get through that, but I’ll give it a shot. :slight_smile:

2 Likes