From 71e9c225ad35bb4308caa70296ace2a7725d6b1b Mon Sep 17 00:00:00 2001
From: Daniel Firth <dan.firth@homotopic.tech>
Date: Sat, 5 Nov 2022 09:06:01 +0000
Subject: [PATCH] lua: init at t2.2.1

---
 manifest.dhall |  1 +
 overlay.nix    |  2 ++
 pkgs/lua.nix   | 24 ++++++++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 pkgs/lua.nix

diff --git a/manifest.dhall b/manifest.dhall
index 097d50ae..e0de96e6 100644
--- a/manifest.dhall
+++ b/manifest.dhall
@@ -322,6 +322,7 @@ in  [ callHackage "Cabal" "3.8.1.0"
         (None Text)
     , callHackage "lsp-types" "1.6.0.0"
     , callHackage "lsp" "1.6.0.0"
+    , callHackage "lua" "2.2.1"
     , callHackage "lucid-alpine" "0.1.0.7"
     , callHackage "lucid-aria" "0.1.0.1"
     , callHackage "lucid-svg" "0.7.1"
diff --git a/overlay.nix b/overlay.nix
index aa05d99e..e55a4395 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -375,6 +375,8 @@ final: prev: with pkgs.haskell.lib; {
 
   lsp-types = prev.callPackage (./pkgs/lsp-types.nix) { };
 
+  lua = prev.callPackage (./pkgs/lua.nix) { };
+
   lucid = prev.callPackage (./pkgs/lucid.nix) { };
 
   lucid-alpine = prev.callPackage (./pkgs/lucid-alpine.nix) { };
diff --git a/pkgs/lua.nix b/pkgs/lua.nix
new file mode 100644
index 00000000..68938317
--- /dev/null
+++ b/pkgs/lua.nix
@@ -0,0 +1,24 @@
+{ mkDerivation, base, lib, lua5_4, tasty, tasty-hunit }:
+mkDerivation {
+  pname = "lua";
+  version = "2.2.1";
+  sha256 = "85546fb11ee349d3182ce11bd3046e644c2964fcfc39c797c2cd1a12e588961f";
+  configureFlags = [ "-fsystem-lua" "-f-use-pkgconfig" ];
+  isLibrary = true;
+  isExecutable = false;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [ base ];
+  librarySystemDepends = [ lua5_4 ];
+  testHaskellDepends = [ base tasty tasty-hunit ];
+  enableLibraryProfiling = false;
+  enableExecutableProfiling = false;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  homepage = "https://hslua.org/";
+  description = "Lua, an embeddable scripting language";
+  license = lib.licenses.mit;
+  broken = false;
+}
-- 
GitLab