depot/third_party/nixpkgs/pkgs/development/interpreters/nelua/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

35 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
stdenv.mkDerivation rec {
pname = "nelua";
version = "unstable-2024-01-02";
src = fetchFromGitHub {
owner = "edubart";
repo = "nelua-lang";
rev = "4d4b2b187675522a3cf4584ef734a9f8df201159";
hash = "sha256-0ct4DG7ws16PrjmYfcAsr08zIO9cpb1Vtbm2OxcQcfY=";
};
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 "unstable-" version}'"
'';
makeFlags = [ "PREFIX=$(out)" ];
nativeCheckInputs = [ luaPackages.luacheck ];
doCheck = true;
passthru.updateScript = unstableGitUpdater { };
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 = [ maintainers.marsam ];
};
}