build-image icon indicating copy to clipboard operation
build-image copied to clipboard

Add support for Haskell

Open evanrelf opened this issue 6 years ago • 10 comments

It would be really cool if there was support for Haskell so that people could build their Hakyll static sites through Netlify!

evanrelf avatar Jan 24 '19 03:01 evanrelf

That would be very cool. Although I have to tell you @evanrelf that I've just switched from Hakyll to hugo and so far it seems to be better in almost every way (which makes me a bit sad as a haskeller) :-(

commandodev avatar Jan 25 '19 07:01 commandodev

Glad to hear Hugo is working for you! I’ve looked into Hugo in the past, but it doesn’t allow me to configure and customize routing and compilation as much as I can with Hakyll. I also value Hakyll’s integration with Pandoc, and the fact that I can import any Haskell library to extend the functionality of my site.

I know Haskell support is a long shot since other static site generators are more popular, but I thought I’d mention it anyway just in case.

On Jan 24, 2019, at 11:36 PM, Ben Ford [email protected] wrote:

That would be very cool. Although I have to tell you @evanrelf that I've just switched from Hakyll to hugo and so far it seems to be better in almost every way (which makes me a bit sad as a haskeller) :-(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

evanrelf avatar Jan 25 '19 16:01 evanrelf

This would make @biilmann happy :)

bcomnes avatar Feb 01 '19 19:02 bcomnes

+1 for this, but for a different reason: I want to build a site with the static site generator Rib.

JonathanReeve avatar Dec 22 '19 02:12 JonathanReeve

Alternatively, add Nix support (so users can use whatever language including Haskell): https://github.com/netlify/build-image/pull/187

srid avatar Jan 22 '20 16:01 srid

It doesn't look like this issue is getting a lot of love, and I remember a Netlify employee previously mentioning Haskell/Hakyll builds should be possible, so I shall say as well: +1

I've resorted to building it on CircleCI and then pushing to Netlify, but I don't get to take advantage of all the branch goodies Netlify has :)

And then, if I may say so, you have Erlang, but not Haskell? For Serum? If it's that, then: Hakyll probably has 10x more developers working with it.

justuswilhelm avatar May 16 '20 10:05 justuswilhelm

I personally now believe that adding Nix support is the right way to go. Once that's added, the entirety of Nixpkgs becomes available, making all other languages and tools available. Adding things piecemeal is a never-ending uphill battle.

evanrelf avatar May 28 '20 05:05 evanrelf

Nix support would also allow building neuron sites.

srid avatar May 28 '20 13:05 srid

I personally now believe that adding Nix support is the right way to go. Once that's added, the entirety of Nixpkgs becomes available, making all other languages and tools available. Adding things piecemeal is a never-ending uphill battle.

I see your point and I also agree that adding nix despite the additional learning curve sounds like a good idea long term. The way both files Dockerfile and run-build.sh look like right now is a complete nightmare. On the other hand a way to do it could be by specifying custom docker files perhaps? Either way, just appending more and more packages/installers/setup scripts to a Dockerfile and/or run-build.sh will just deteriorate the build experience.

Looking at the recent addition of Swift (why Swift and Elixir, but not Haskell? 🤣 ) https://github.com/netlify/build-image/commit/1c486becec13e0dc2329ab328bbdd17548dc0da2 makes it obvious that every time a language is added one more unskippable piece of code is added to the shell script that can easily add another 50-100 ms to build times. So once Netlify supports another 20 languages or build environments the build will be slowed down noticeably.

Because I'm not too familiar with Nix, one thing that I would be curious about is how to implement caching.

justuswilhelm avatar May 29 '20 03:05 justuswilhelm

Because I'm not too familiar with Nix, one thing that I would be curious about is how to implement caching.

For instant builds, you probably want to persist /nix between builds. Failing that, you can push to/ pull from a remote cache like cachix, but this will take substantial time fetching / pushing derivations.

srid avatar May 29 '20 03:05 srid