Last active
February 12, 2024 18:03
-
-
Save ejpcmac/8a2fe3f3e01ad3b9cc54d4b541784ed0 to your computer and use it in GitHub Desktop.
Example shell.nix for Elixir projects using a preversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
elixir_1_7_0_rc_1 = { mkDerivation }: | |
mkDerivation rec { | |
version = "1.7.0-rc.1"; | |
# Use `nix-prefetch-github --rev <version> elixir-lang elixir` to update. | |
sha256 = "1hp1zdscq7h2qcgcfbzw5dx1wxy05bqlrxvv5kcl8414c69inx8g"; | |
minimumOTPVersion = "19"; | |
}; | |
erl = beam.packages.erlangR21; | |
erlang = erl.erlang; | |
rebar = erl.rebar; | |
elixir = beam.lib.callElixir elixir_1_7_0_rc_1 { | |
inherit erlang rebar; | |
debugInfo = true; | |
}; | |
in | |
stdenv.mkDerivation { | |
name = "test"; | |
buildInputs = [ elixir ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment