46 lines
1.5 KiB
Nix
46 lines
1.5 KiB
Nix
{
|
|
description = "CentralCloud unified portal (Elixir/Phoenix umbrella)";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
nixConfig = {
|
|
extra-substituters = [
|
|
"https://cache.centralcloud.com/default"
|
|
];
|
|
extra-trusted-public-keys = [
|
|
"default:ywfU21WX06iOn2Ec2lae1jYh4w8LO4IQkmp06vJzsk8="
|
|
];
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
# Elixir 1.20-rc.4 — definition exists in nixpkgs but not yet exposed as elixir_1_20
|
|
elixir_1_20_rc4 = pkgs.callPackage
|
|
"${pkgs.path}/pkgs/development/interpreters/elixir/1.20.nix"
|
|
{ erlang = pkgs.erlang_28; };
|
|
in {
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
elixir_1_20_rc4 # 1.20.0-rc.4 — full type inference, built from source
|
|
erlang_28 # OTP 28.5
|
|
gleam # ready when we want type-safe core modules
|
|
nodejs_22 # for Phoenix asset pipeline
|
|
inotify-tools # LiveReload on Linux
|
|
];
|
|
|
|
shellHook = ''
|
|
export MIX_HOME=$HOME/.mix
|
|
export HEX_HOME=$HOME/.hex
|
|
export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH
|
|
echo "Elixir $(elixir --version | head -1)"
|
|
echo "Mix $(mix --version)"
|
|
'';
|
|
};
|
|
});
|
|
}
|