base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / ne / nelua / package.nix
blob2a3bd7a768ef1112ac9b42fc69f5fceceec14d01
1 { lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
3 stdenv.mkDerivation rec {
4   pname = "nelua";
5   version = "0-unstable-2024-10-18";
7   src = fetchFromGitHub {
8     owner = "edubart";
9     repo = "nelua-lang";
10     rev = "038c45f19842d7b18c32b6b4f7e631e15d77d453";
11     hash = "sha256-Qnr+A4nYPnBLUxNGRbUwEwuw2POV0AKXtpKKYcLtF1M=";
12   };
14   postPatch = ''
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}'"
18   '';
20   makeFlags = [ "PREFIX=$(out)" ];
22   nativeCheckInputs = [ luaPackages.luacheck ];
24   doCheck = true;
26   passthru.updateScript = unstableGitUpdater {
27     # no releases, only stale "latest" tag
28     hardcodeZeroVersion = true;
29   };
31   meta = with lib; {
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;
36     maintainers = [ ];
37   };