This commit add nix support for development shells. The developer can use `nix develop` to setup a complete and reproducable devleopment environment using Nix.
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{
|
|
description = "Prymn";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay }:
|
|
let
|
|
#supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [
|
|
(final: prev: {
|
|
elixir = prev.beam.packages.erlang_26.elixir_1_15;
|
|
elixir-ls = prev.beam.packages.erlang_26.elixir-ls.override { elixir = final.elixir; };
|
|
protoc-gen-elixir = prev.callPackage ./protoc-gen-elixir.nix { elixir = final.elixir; };
|
|
})
|
|
|
|
(import rust-overlay)
|
|
];
|
|
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
in
|
|
{
|
|
devShells.${system}.default = with pkgs; mkShell {
|
|
packages = [
|
|
elixir
|
|
elixir-ls
|
|
protobuf
|
|
protoc-gen-elixir
|
|
rust-bin.stable.latest.default
|
|
] ++ lib.optionals stdenv.isLinux [ inotify-tools ];
|
|
|
|
inputsFrom = [
|
|
protoc-gen-elixir
|
|
];
|
|
};
|
|
};
|
|
}
|