TestPhoenixLiveView/flake.nix

34 lines
925 B
Nix

{
description = "Test Phoenix Live View";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem flake-utils.lib.allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
customElixir = pkgs.elixir_1_16.override {
erlang = pkgs.erlang_26;
};
basePackages = [
customElixir
pkgs.git
];
buildInputs = basePackages
++ pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.inotify-tools ]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ pkgs.CoreFoundation pkgs.CoreServices ]);
in
{
devShells = rec {
default = pkgs.mkShell {
buildInputs = buildInputs;
};
};
});
}