Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Elm is written in Haskell and has a very sane package manager. It shouldn't be too hard to be able to deploy all Elm packages with Nix.
I don't have enough free time to program this atm, but I'd like to drop my research here how I'd do it.
Generating all packages
Elm serves a single JSON (per Elm release) that returns all packages registered upstream:
http://package.elm-lang.org/all-packages (Elm 0.18)
We'd have to create a storage (git repository) with the following metadata per package:
As usual, we'd then build all packages and provide binaries (probably not on hydra.nixos.org).
It would use Elm haskell API to determine the latest versions based on local elm-package.json and generate
Functions for generating versions and names:
Logic that determines if file should be downloaded (and thus where to unpack Nixified elm packages): https://github.com/elm-lang/elm-package/blob/master/src/Install/Fetch.hs#L137
Nix integration would just unpack packages to folders like
This one is tricky, as it's impossible to be able to be up to date without some delay unless a user was able to generate a new set or be able to override (manual work).
We'd have to research if elm install does lookup local folders first and just use those instead of the very latest upon installation.
My estimate is about a few days of work to get a prototype working :)
Nov 21, 2016
referenced this issue
Nov 21, 2016
I would be -1 on having this information in
I find it more and more that when working on different project you also need to pick different revision of
for those interested in Elm. there actually already is elm2nix command but you need to check the files and comments in
I'll wait for Elm 0.19 before automating this, since it's going to help a lot: https://groups.google.com/forum/#!topic/elm-dev/qdu3NqOqGrY