Skip to content

Proposal: Reorganize Nix packages (lem as full-featured, lem-ncurses as minimal) #2030

@cxxxr

Description

@cxxxr

Background

In PR #2024, @tani suggested merging lem-webview into lem-cli:

do you have any plan to contain merge lem-webview nix package into lem-cli? I prefer do that.

#2024 (review)

Current Structure

Package Contents
lem (lem-cli) ncurses + SDL2
lem-webview WebKit GUI

Proposed Structure

Package Contents Use Case
lem ncurses + SDL2 + webview Desktop users (full-featured)
lem-ncurses ncurses only Server / minimal environments

Benefits

  1. Intuitive naming: lem provides all features out of the box
  2. Addresses @tani's feedback: Integration of frontends
  3. Lightweight option available: lem-ncurses for minimal environments
  4. Simple: 2 packages cover all use cases

Concerns

  1. Heavier default: nix run github:lem-project/lem would download WebKitGTK (~hundreds of MB)
  2. macOS compatibility: WebKitGTK is Linux-focused. May need conditional logic:
    lem = if pkgs.stdenv.isLinux 
          then lem-full      # Linux: all frontends
          else lem-cli;      # macOS: SDL2 + ncurses only
  3. SDL2-only option: Users who want SDL2 without ncurses or webview would need a separate package

Alternative: 3-package structure

Package Contents Notes
lem ncurses + SDL2 Current default, most portable
lem-ncurses ncurses only Minimal
lem-full All frontends Linux only

Questions for Discussion

  1. Should lem be the full-featured package or stay as ncurses + SDL2?
  2. Do we need a SDL2-only package?
  3. How should we handle macOS where webview may not work?

/cc @tani

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions