nix/templates/gleam/flake.nix

28 lines
751 B
Nix
Raw Permalink Normal View History

2024-05-28 10:14:04 -05:00
{
2024-08-13 14:35:09 -05:00
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = {
self,
nixpkgs,
...
}: let
systems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
forSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: (import nixpkgs {inherit system;}).extend self.outputs.overlays.default;
genPkgs = func: (forSystems (system: func (pkgsFor system)));
in {
overlays.default = final: prev: {
erlangPackages = prev.beam.packagesWith prev.erlang_27;
2024-05-28 10:41:54 -05:00
erlang = final.erlangPackages.erlang;
};
2024-08-13 14:35:09 -05:00
devShells = genPkgs (pkgs: {
2024-05-28 10:14:04 -05:00
default = pkgs.mkShell {
buildInputs = with pkgs; [
2024-05-28 10:41:54 -05:00
erlang
2024-05-28 10:14:04 -05:00
gleam
2024-05-28 22:09:32 -05:00
rebar3
2024-05-28 10:14:04 -05:00
];
};
});
};
}