about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/scripts/luarocks-packages.csv1
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix20
-rw-r--r--pkgs/top-level/lua-packages.nix30
3 files changed, 21 insertions, 30 deletions
diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index df403296ccd2d..fbd358e1b2db2 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -14,6 +14,7 @@ lua-cmsgpack,
 lua_cliargs,
 lua-term,
 luaevent,
+luacheck
 luaffi,http://luarocks.org/dev,
 luuid,
 penlight,
diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix
index 494a0e34a386d..defff849a2bec 100644
--- a/pkgs/development/lua-modules/generated-packages.nix
+++ b/pkgs/development/lua-modules/generated-packages.nix
@@ -346,6 +346,26 @@ luaevent = buildLuarocksPackage {
     };
   };
 };
+luacheck = buildLuarocksPackage {
+  pname = "luacheck";
+  version = "0.23.0-1";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/luacheck-0.23.0-1.src.rock;
+      sha256 = "0akj61c7k1na2mggsckvfn9a3ljfp4agnmr9gp3mac4vin99a1cl";
+   };
+  disabled = ( luaOlder "5.1") || ( luaAtLeast "5.4");
+  propagatedBuildInputs = [lua argparse luafilesystem  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "https://github.com/mpeterv/luacheck";
+    description="A static analyzer and a linter for Lua";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
 luaffi = buildLuarocksPackage {
   pname = "luaffi";
   version = "scm-1";
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index 347393511e6ae..4e890662477a6 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -236,36 +236,6 @@ with self; {
     };
   };
 
-  luacheck = buildLuaPackage rec {
-    pname = "luacheck";
-    version = "0.20.0";
-    name = "${pname}-${version}";
-
-    src = fetchFromGitHub {
-      owner = "mpeterv";
-      repo = "luacheck";
-      rev = "${version}";
-      sha256 = "0ahfkmqcjhlb7r99bswy1sly6d7p4pyw5f4x4fxnxzjhbq0c5qcs";
-    };
-
-    propagatedBuildInputs = [ lua ];
-
-    # No Makefile.
-    dontBuild = true;
-
-    installPhase = ''
-      ${lua}/bin/lua install.lua $out
-    '';
-
-    meta = with stdenv.lib; {
-      description = "A tool for linting and static analysis of Lua code";
-      homepage = https://github.com/mpeterv/luacheck;
-      license = licenses.mit;
-      maintainers = with maintainers; [ vyp ];
-      platforms = platforms.unix;
-    };
-  };
-
   luacyrussasl = buildLuaPackage rec {
     version = "1.1.0";
     name = "lua-cyrussasl-${version}";