In the previous post, we learned how to get started with managing and building a Haskell project with Nix. In this post, we learn how to easily create statically-linked executables for Haskell projects with Nix. This post was originally published on abhinavsarkar.net. This post is a part of the series: Nix for Haskell. Getting Started Static Builds 👈 ContentsStatic BuildsEnabling Static Builds in GHCConfiguring the ApplicationRooting Static Build DependenciesFinaleBonus: Building a Docker ImageConclusion I recommend going through the previous post, because we are going to start off from where we left last time (ignoring the bonus sections). This is how our project’s directory tree looks at this point: . ├─ app │ └─ Main.hs ├─ ftr.cabal ├─ nix │ ├─ nixpkgs.nix │ ├─ sources.json │ └─ sources.nix ├─ package.nix └─ shell.nix Main.hs is the default generated main file that prints “Hello, Haskell!”. ftr.cabal is the default generated Cabal file. sources.(json|nix) are generated by Niv to…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.