Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

185 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua Packages for poly-repo Nixpkgs

Central location to curate Lua packages (luarocks and others) for the ekala poly-repo nixpkgs fork.

Structure

default.nix         # Entry point
pins.nix            # Pinned external dependencies (core-pkgs, nix-lib)
pkgs-module.nix     # Module wiring: creates overlays from pkgs/
lua-packages.nix    # System dependency overrides for Lua packages
top-level.nix       # Non-Lua top-level package overrides
pkgs/               # Auto-discovered Lua package expressions

Adding a package

Create pkgs/<name>/default.nix:

{
  buildLuarocksPackage,
  fetchurl,
  fetchFromGitHub,
  luaOlder,
}:

buildLuarocksPackage {
  pname = "example";
  version = "1.0.0-1";

  knownRockspec = (fetchurl {
    url = "mirror://luarocks/example-1.0.0-1.rockspec";
    sha256 = "...";
  }).outPath;

  src = fetchFromGitHub {
    owner = "...";
    repo = "...";
    tag = "v1.0.0";
    hash = "...";
  };

  disabled = luaOlder "5.1";

  propagatedBuildInputs = [
    # other lua packages from this scope
  ];

  meta = {
    homepage = "...";
    description = "...";
    license.fullName = "MIT";
  };
}

The package is automatically available via lua.pkgs.<name> and lua.withPackages (ps: [ ps.<name> ]).

System dependency overrides

If a package needs system libraries (openssl, zlib, etc.), add an override in lua-packages.nix:

final: prev: {
  mypackage = prev.mypackage.overrideAttrs (old: {
    buildInputs = (old.buildInputs or []) ++ [ final.pkgs.openssl ];
  });
}

Evaluation

nix-build -A lua.pkgs.luafilesystem
nix-build -E '(import ./. {}).lua.withPackages (ps: [ ps.lpeg ps.luafilesystem ])'

About

Lua package repository for ekapkgs

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages