2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-12-02 08:20:57 +00:00
|
|
|
pname = "nelua";
|
2024-06-24 18:47:55 +00:00
|
|
|
version = "0-unstable-2024-06-16";
|
2022-12-02 08:20:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edubart";
|
|
|
|
repo = "nelua-lang";
|
2024-06-24 18:47:55 +00:00
|
|
|
rev = "4b2c75f8fe5c1d11a966b2fe8974a256868749a6";
|
|
|
|
hash = "sha256-98QKg9eKBDEobmARpH3FAS2C32iViSsBs71n1E8uI2s=";
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lualib/nelua/version.lua \
|
|
|
|
--replace "NELUA_GIT_HASH = nil" "NELUA_GIT_HASH = '${src.rev}'" \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace "NELUA_GIT_DATE = nil" "NELUA_GIT_DATE = '${lib.removePrefix "0-unstable-" version}'"
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ luaPackages.luacheck ];
|
2022-12-02 08:20:57 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
# no releases, only stale "latest" tag
|
|
|
|
hardcodeZeroVersion = true;
|
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
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;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
}
|