elixir devshell: better flake

This commit is contained in:
Barna Máté 2025-01-21 18:35:41 +01:00
parent fe1a62d205
commit 173ee08316

View file

@ -1,9 +1,13 @@
{
description = "Elixir devshel";
description = "Development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
@ -15,14 +19,18 @@
flake-utils.lib.eachDefaultSystem (
system:
let
inherit (nixpkgs.lib) optional;
pkgs = import nixpkgs { inherit system; };
elixir = pkgs.beam.packages.erlang.elixir;
elixir-ls = pkgs.beam.packages.erlang.elixir_ls;
in
{
devShells.default =
with pkgs;
mkShell {
packages = [ beam.packages.erlang_26.elixir_1_15 ];
};
devShell = pkgs.mkShell {
buildInputs = [
elixir
];
};
}
);
}