GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cachix/elm2nix: Convert Elm project into Nix expressions

BranchesTags
Open more actions menu

Latest commit

 

History

135 Commits
135 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
data
data
 
 
elm2nix
elm2nix
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
.envrc
.envrc
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Setup.hs
Setup.hs
 
 
devenv.lock
devenv.lock
 
 
devenv.nix
devenv.nix
 
 
devenv.yaml
devenv.yaml
 
 
elm2nix.cabal
elm2nix.cabal
 
 

Repository files navigation

elm2nix

Build status Hackage

Convert an Elm project into Nix expressions.

It consists of multiple commands:

  • elm2nix convert: Given elm.json in current directory, all dependencies are parsed and their sha256sum calculated
  • elm2nix snapshot: Reads packages from elm.json and writes them to binary cache file registry.dat used by elm-compiler.
  • elm2nix init: Generates default.nix that glues everything together

Assumptions

Supports Elm 0.19.1

Installation

It's already included in devenv when using Elm:

{
  langauges.elm.enable = true;

  tasks = {
    "frontend:elm2nix" = {
      exec = "cd frontend && elm2nix convert > elm-srcs.nix && elm2nix snapshot";
      execIfModified = [ "frontend/elm.json" ];
      before = [ "devenv:enterShell" ];
    };
  };

}

Running tests (as per CI)

$ ./scripts/tests.sh

FAQ

Why is mkDerivation inlined into default.nix?

As it's considered experimental, it's generated for now. Might change in the future.

How do I use elm2nix with ParcelJS and Yarn?

Instead of running elm2nix init, create a default.nix with the following derivation:

#49 (comment)

About

Convert Elm project into Nix expressions

Topics

elmelm-langhaskellnix

Resources

Readme
BSD-3-Clause license
Activity
Custom properties

Stars

126 stars

Watchers

7 watching

Forks

17 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.