turnon: 2.0.0 -> 2.3.1 (#370430)
[NixPkgs.git] / pkgs / by-name / ne / nelua / package.nix
blob0f8a63ea787b98341d087baeba8cdea1da43aabb
1 { lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
3 stdenv.mkDerivation rec {
4   pname = "nelua";
5   version = "0-unstable-2024-12-14";
7   src = fetchFromGitHub {
8     owner = "edubart";
9     repo = "nelua-lang";
10     rev = "a69a12d1e1e5ee0bfab299350e5d707ff7b2e744";
11     hash = "sha256-Du6fRfAdHvdNWWkpd8dR4ZwkCETN9FWsEgq5JkwW0DY=";
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   };