Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nelua";
|
|
version = "0-unstable-2024-10-18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "edubart";
|
|
repo = "nelua-lang";
|
|
rev = "038c45f19842d7b18c32b6b4f7e631e15d77d453";
|
|
hash = "sha256-Qnr+A4nYPnBLUxNGRbUwEwuw2POV0AKXtpKKYcLtF1M=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace lualib/nelua/version.lua \
|
|
--replace "NELUA_GIT_HASH = nil" "NELUA_GIT_HASH = '${src.rev}'" \
|
|
--replace "NELUA_GIT_DATE = nil" "NELUA_GIT_DATE = '${lib.removePrefix "0-unstable-" version}'"
|
|
'';
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
nativeCheckInputs = [ luaPackages.luacheck ];
|
|
|
|
doCheck = true;
|
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
# no releases, only stale "latest" tag
|
|
hardcodeZeroVersion = true;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code";
|
|
homepage = "https://nelua.io/";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = [ ];
|
|
};
|
|
}
|