Skip to content

Comamoca/gleam-overlay

Repository files navigation

Last commit Repository Stars Issues Open Issues Bug Issues

gleam logo

gleam-overlay

A Nix overlay providing Gleam packages for multiple versions and platforms.

✨ Features

  • 🚀 Latest Gleam releases with automatic updates
  • 🏗️ Multiple architecture support (x86_64/aarch64 Linux/macOS)
  • 📦 Easy integration with Nix flakes and traditional overlays
  • 🔄 Binary distributions for faster installation

🚀 Usage

With Nix Flakes

Add this overlay to your flake inputs:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    gleam-overlay.url = "github:Comamoca/gleam-overlay";
  };

  outputs =
    inputs@{ self, nixpkgs, ... }:
    let
      systems = [
        "aarch64-darwin"
        "aarch64-linux"
        "x86_64-darwin"
        "x86_64-linux"
      ];

      forAllSystems =
        f:
        builtins.listToAttrs (
          map (system: {
            name = system;
            value = f system;
          }) systems
        );
    in
    {
      devShells = forAllSystems (
        system:
        let
          pkgs = import nixpkgs {
            inherit system;
            overlays = [
              inputs.gleam-overlay.overlays.default
            ];
          };
        in
        {
          default = pkgs.mkShell {
            packages = with pkgs; [
              pkgs.gleam.bin.latest # Latest version
            ];
            shellHook = '''';
          };
        }
      );
    };
}

With Traditional Overlays

let
  gleam-overlay = import (fetchTarball "https://github.com/Comamoca/gleam-overlay/archive/main.tar.gz");
  pkgs = import <nixpkgs> { overlays = [ gleam-overlay ]; };
in
{
  environment.systemPackages = [
    pkgs.gleamPackage.bin.latest
    # pkgs.gleamPackage.bin.nightly
  ];
}

Direct Usage

# Run the latest version
nix run github:Comamoca/gleam-overlay
nix run github:Comamoca/gleam-overlay#nightly

# Use in a shell
nix shell github:Comamoca/gleam-overlay

Build cache

gleam-overlay provides a cache via cachix. In environments with cachix cli, you can use the cache during builds with the following command:

cachix use gleam-overlay

🏗️ Supported Platforms

  • aarch64-darwin
  • aarch64-linux
  • x86_64-darwin
  • x86_64-linux

📋 Version & Platform Compatibility

Version aarch64-darwin aarch64-linux x86_64-darwin x86_64-linux
1.16.0
1.16.0-rc4
1.16.0-rc3
1.16.0-rc2
1.16.0-rc1
1.15.4
1.15.3
1.15.2
1.15.1
1.15.0
1.15.0-rc2
1.15.0-rc1
1.14.0
1.14.0-rc3
1.14.0-rc2
1.14.0-rc1
1.13.0
1.13.0-rc2
1.13.0-rc1
1.12.0
1.12.0-rc3
1.12.0-rc2
1.12.0-rc1
1.11.1
1.11.0
1.11.0-rc2
1.11.0-rc1
1.10.0
1.10.0-rc1
1.9.1
nightly

⛏️ Development

Prerequisites

nix develop
# or
direnv allow

Updating Releases

cd scripts
python fetch_gleam_releases.py

This will update gleam_hashes.json with the latest Gleam releases and their checksums.

Building Manually

# Build the latest version
nix build

# Build and test
nix flake check

📜 License

MIT License - see LICENSE for details.

🙏 Acknowledgments

  • Gleam - A friendly language for building type-safe, scalable systems
  • The Nix community for excellent tooling and patterns

About

A Nix overlay providing Gleam packages for multiple versions and platforms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors