Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

jechol/nix-beam

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Linux macOS Cachix Cache

Nix Packages for Erlang, Elixir

Installation

Nix

You must have installed nix. See NixOS install for more information.

Save compile time with binary cache:

$ nix-env -iA cachix -f https://cachix.org/api/v1/install
$ cachix use trevorite

Configuration

Include NUR(Nix User Repository) to ~/.config/nixpkgs/config.nix:

{
  packageOverrides = pkgs: {
    nur = import (builtins.fetchTarball
      "https://github.com/nix-community/NUR/archive/master.tar.gz") {
        inherit pkgs;

        repoOverrides = {
          beam = import (builtins.fetchTarball
            "https://github.com/trevorite/nix-beam/archive/master.tar.gz") { };
        };
      };
  };
}

How to use

Packages can be installed from the nur namespace:

$ nix-env -iA nur.repos.beam.erlang.v24_0
$ erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().'  -noshell
"24"

$ nix-env -iA nur.repos.beam.pkg.v23_3.elixir.v1_11_4
$ elixir --version
Erlang/OTP 23 [erts-10.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.11.4 (compiled with Erlang/OTP 23)

See? You can use Erlang 24.0 and Elixir 1.11.4 on Erlang 23.3 at the same time!

Available packages

See available packages with

$ nix-env -qaP -f https://github.com/trevorite/nix-beam/archive/master.tar.gz