Skip to content

Instantly share code, notes, and snippets.

@alvivi
Created December 15, 2022 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvivi/a26218dcc2eb49d189db19c3fa6c6c1e to your computer and use it in GitHub Desktop.
Save alvivi/a26218dcc2eb49d189db19c3fa6c6c1e to your computer and use it in GitHub Desktop.
Pinning Elixir and Erlang altogether
{
description = "Pinning Elixir & Erlang altogether";
# https://github.com/erlang/otp/archive/refs/tags/OTP-${VERSION}.zip
# https://github.com/elixir-lang/elixir/archive/refs/tags/v${VERSION}.zip
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { flake-utils, nixpkgs, ... }: flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
(self: super: rec {
erlang = super.beam.interpreters.erlangR25.override {
version = "25.2";
sha256 = "138xyqaa114fgv3gk01rawz9asg86maffj8yrhikgd8zsb8a57nd";
};
elixir = (super.beam.packagesWith erlang).elixir.override {
version = "1.14.2";
sha256 = "1w0wda304bk3j220n76bmv4yv0pkl9jca8myipvz7lm6fnsvw500";
};
})
];
pkgs = import nixpkgs { inherit system; inherit overlays; };
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
erlang
elixir
];
};
formatter = pkgs.nixpkgs-fmt;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment