1 { lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
3 stdenv.mkDerivation rec {
5 version = "0-unstable-2024-10-18";
7 src = fetchFromGitHub {
10 rev = "038c45f19842d7b18c32b6b4f7e631e15d77d453";
11 hash = "sha256-Qnr+A4nYPnBLUxNGRbUwEwuw2POV0AKXtpKKYcLtF1M=";
15 substituteInPlace lualib/nelua/version.lua \
16 --replace "NELUA_GIT_HASH = nil" "NELUA_GIT_HASH = '${src.rev}'" \
17 --replace "NELUA_GIT_DATE = nil" "NELUA_GIT_DATE = '${lib.removePrefix "0-unstable-" version}'"
20 makeFlags = [ "PREFIX=$(out)" ];
22 nativeCheckInputs = [ luaPackages.luacheck ];
26 passthru.updateScript = unstableGitUpdater {
27 # no releases, only stale "latest" tag
28 hardcodeZeroVersion = true;
32 description = "Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code";
33 homepage = "https://nelua.io/";
34 license = licenses.mit;
35 platforms = platforms.all;