about summary refs log tree commit diff
path: root/pkgs/development/interpreters/nelua
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-11-23 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2023-11-23 04:20:00 +0000
commit81b30e41be72dc3ea3fb0a0230302c2068b62266 (patch)
treefb9df1cb987dc7390e573ee2e3507670d0e9e0af /pkgs/development/interpreters/nelua
parent3ccf35fa5339d4d21f649db625305f1886d12cb9 (diff)
nelua: unstable-2023-09-16 -> unstable-2023-11-19
Diff: https://github.com/edubart/nelua-lang/compare/596fcca5c77932da8a07c249de59a9dff3099495...e82695abf0a68a30a593cefb0bf1143cf9e14b6b
Diffstat (limited to 'pkgs/development/interpreters/nelua')
-rw-r--r--pkgs/development/interpreters/nelua/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/nelua/default.nix b/pkgs/development/interpreters/nelua/default.nix
index fe4448c2f8d61..5871d166c7db8 100644
--- a/pkgs/development/interpreters/nelua/default.nix
+++ b/pkgs/development/interpreters/nelua/default.nix
@@ -1,22 +1,30 @@
-{ lib, stdenv, fetchFromGitHub, luaPackages }:
+{ lib, stdenv, fetchFromGitHub, luaPackages, unstableGitUpdater }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "nelua";
-  version = "unstable-2023-09-16";
+  version = "unstable-2023-11-19";
 
   src = fetchFromGitHub {
     owner = "edubart";
     repo = "nelua-lang";
-    rev = "596fcca5c77932da8a07c249de59a9dff3099495";
-    hash = "sha256-gXTlAxW7s3VBiC1fGU0aUlGspHlvyY7FC5KLeU2FyGQ=";
+    rev = "e82695abf0a68a30a593cefb0bf1143cf9e14b6b";
+    hash = "sha256-Srgoq07JQirxmZcDvw4UdfoYZ5HFT0PbYPoHY99BW/c=";
   };
 
+  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/";