jeslie0 / mkElmDerivation

A nix flake for simplifiying the packaging of elm projects, inspired by elm2nix.
https://github.com/jeslie0/mkElmDerivation/
MIT License
27 stars 2 forks source link
elm flake haskell nix

+title: mkElmDerivation

[[https://img.shields.io/badge/built%20with-Haskell-8f4e8b.svg]] [[https://img.shields.io/badge/built%20for-Elm-60b6cd.svg]] [[https://img.shields.io/github/license/jeslie0/mkelmderivation.svg]] [[https://img.shields.io/github/actions/workflow/status/jeslie0/mkElmDerivation/CI.yml.svg]]

This repository provides an unopinionated, general approach to packaging Elm projects. An overlay is provided, giving a function =mkElmDerivation= which is an overloaded version of nixpkgs's =mkDerivation=, but with all of your elm dependencies downloaded and stored in the right place. This allows you to package normal Elm projects, but also things like elm-spa and elm-watch apps. All of this is done by using your project's =elm.json= file, and requires no updating of nix files when you update your dependencies.

We aren't restricted to just using Elm, however. Since this is just wrapper around =mkDerivation=, you can use whatever build inputs and build commands you want. See the [[./tests][tests]] directory for some more examples.