about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2019-02-12 21:19:11 +0000
committerGitHub <noreply@github.com>2019-02-12 21:19:11 +0000
commit2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9 (patch)
treeb7150f8afff03f7d5a673b4d7285ea11eac0c742
parentcfe6277e62f66a554f92c33f6bbcaf72e55d5c90 (diff)
parent71b2e1f554f0a4283aac173fd9426f7e640baf8e (diff)
downloadnixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.tar
nixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.tar.gz
nixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.tar.bz2
nixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.tar.lz
nixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.tar.xz
nixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.tar.zst
nixlib-2a2cf5bf29555d115b62f2e0f3bafdf9296e00f9.zip
Merge pull request #55305 from teto/lua_whitelist
Lua: moving some package to the luarocks whitelist
-rw-r--r--maintainers/scripts/luarocks-packages.csv5
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix128
-rw-r--r--pkgs/development/lua-modules/overrides.nix24
-rw-r--r--pkgs/top-level/lua-packages.nix138
4 files changed, 143 insertions, 152 deletions
diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index e6817a060560..1144bc723254 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -1,7 +1,12 @@
 ansicolors,
 argparse,
+basexx,
+cqueues
 dkjson
+fifo
 inspect
+lgi
+lpeg_patterns
 lrexlib-gnu,
 lrexlib-posix,
 ltermbox,
diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix
index dc15a7a9ad67..b7224aa334db 100644
--- a/pkgs/development/lua-modules/generated-packages.nix
+++ b/pkgs/development/lua-modules/generated-packages.nix
@@ -50,6 +50,46 @@ argparse = buildLuarocksPackage {
     };
   };
 };
+basexx = buildLuarocksPackage {
+  pname = "basexx";
+  version = "0.4.0-1";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/basexx-0.4.0-1.src.rock;
+      sha256 = "1px8yrxg1qkk3kzdqj3siry742jdv4ysp2dmicxi15mkynqpjlzz";
+   };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [lua  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "https://github.com/aiq/basexx";
+    description="A base2, base16, base32, base64 and base85 library for Lua";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
+cqueues = buildLuarocksPackage {
+  pname = "cqueues";
+  version = "20171014.52-0";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/cqueues-20171014.52-0.src.rock;
+      sha256 = "0q3iy1ja20nq2sn2n6badzhjq5kni86pfc09n5g2c46q9ja3vfzx";
+   };
+  disabled = ( lua.luaversion != "5.2");
+  propagatedBuildInputs = [lua  ];
+  buildType="make";
+
+  meta = {
+    homepage = "http://25thandclement.com/~william/projects/cqueues.html";
+    description="Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.";
+    license = {
+      fullName = "MIT/X11";
+    };
+  };
+};
 dkjson = buildLuarocksPackage {
   pname = "dkjson";
   version = "2.5-2";
@@ -70,6 +110,26 @@ dkjson = buildLuarocksPackage {
     };
   };
 };
+fifo = buildLuarocksPackage {
+  pname = "fifo";
+  version = "0.2-0";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/fifo-0.2-0.src.rock;
+      sha256 = "082c5g1m8brnsqj5gnjs65bm7z50l6b05cfwah14lqaqsr5a5pjk";
+   };
+
+  propagatedBuildInputs = [lua  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "https://github.com/daurnimator/fifo.lua";
+    description="A lua library/'class' that implements a FIFO";
+    license = {
+      fullName = "MIT/X11";
+    };
+  };
+};
 inspect = buildLuarocksPackage {
   pname = "inspect";
   version = "3.1.1-0";
@@ -90,6 +150,46 @@ inspect = buildLuarocksPackage {
     };
   };
 };
+lgi = buildLuarocksPackage {
+  pname = "lgi";
+  version = "0.9.2-1";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/lgi-0.9.2-1.src.rock;
+      sha256 = "07ajc5pdavp785mdyy82n0w6d592n96g95cvq025d6i0bcm2cypa";
+   };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [lua  ];
+  buildType="make";
+
+  meta = {
+    homepage = "http://github.com/pavouk/lgi";
+    description="Lua bindings to GObject libraries";
+    license = {
+      fullName = "MIT/X11";
+    };
+  };
+};
+lpeg_patterns = buildLuarocksPackage {
+  pname = "lpeg_patterns";
+  version = "0.5-0";
+
+  src =  fetchurl {
+      url    = https://luarocks.org/lpeg_patterns-0.5-0.src.rock;
+      sha256 = "0mlw4nayrsdxrh98i26avz5i4170a9brciybw88kks496ra36v8f";
+   };
+
+  propagatedBuildInputs = [lua lpeg  ];
+  buildType="builtin";
+
+  meta = {
+    homepage = "https://github.com/daurnimator/lpeg_patterns/archive/v0.5.zip";
+    description="a collection of LPEG patterns";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
 lrexlib-gnu = buildLuarocksPackage {
   pname = "lrexlib-gnu";
   version = "2.9.0-1";
@@ -167,7 +267,7 @@ lua-cmsgpack = buildLuarocksPackage {
   "fetchSubmodules": true
 }
  '') ["date"]) ;
-   
+
   disabled = ( luaOlder "5.1");
   propagatedBuildInputs = [lua  ];
   buildType="builtin";
@@ -213,9 +313,9 @@ lua-term = buildLuarocksPackage {
       url    = https://github.com/hoelzro/lua-term/archive/0.07.tar.gz;
       sha256 = "0c3zc0cl3a5pbdn056vnlan16g0wimv0p9bq52h7w507f72x18f1";
    };
-   
-  
-  
+
+
+
   buildType="builtin";
 
   meta = {
@@ -279,8 +379,8 @@ penlight = buildLuarocksPackage {
       url    = http://stevedonovan.github.io/files/penlight-1.5.4.zip;
       sha256 = "138f921p6kdqkmf4pz115phhj0jsqf28g33avws80d2vq2ixqm8q";
    };
-   
-  
+
+
   propagatedBuildInputs = [luafilesystem  ];
   buildType="builtin";
 
@@ -305,7 +405,7 @@ say = buildLuarocksPackage {
       url    = https://github.com/Olivine-Labs/say/archive/v1.3-1.tar.gz;
       sha256 = "1jh76mxq9dcmv7kps2spwcc6895jmj2sf04i4y9idaxlicvwvs13";
    };
-   
+
   disabled = ( luaOlder "5.1");
   propagatedBuildInputs = [lua  ];
   buildType="builtin";
@@ -331,7 +431,7 @@ luv = buildLuarocksPackage {
       url    = https://github.com/luvit/luv/releases/download/1.22.0-1/luv-1.22.0-1.tar.gz;
       sha256 = "1xvz4a0r6kd1xqxwm55g9n6imprxb79600x7dhyillrz7p5nm217";
    };
-   
+
   disabled = ( luaOlder "5.1");
   propagatedBuildInputs = [lua  ];
   buildType="cmake";
@@ -392,8 +492,8 @@ mpack = buildLuarocksPackage {
       url    = http://luarocks.org/manifests/teto/mpack-1.0.7-0.src.rock;
       sha256 = "0nq4ixaminkc7fwfpivysyv0al3j5dffsvgdrnwnqdg3w7jgfbw7";
    };
-  
-  
+
+
   buildType="builtin";
 
   meta = {
@@ -437,7 +537,7 @@ busted = buildLuarocksPackage {
       url    = https://github.com/Olivine-Labs/busted/archive/v2.0.rc13-0.tar.gz;
       sha256 = "0m72bldn1r6j94ahcfmpaq1mmysrshf9qi9fjas7hpal0jp8ivvl";
    };
-   
+
   disabled = ( luaOlder "5.1");
   propagatedBuildInputs = [lua lua_cliargs luafilesystem luasystem dkjson say luassert lua-term penlight mediator_lua  ];
   buildType="builtin";
@@ -463,7 +563,7 @@ luassert = buildLuarocksPackage {
       url    = https://github.com/Olivine-Labs/luassert/archive/v1.7.11.tar.gz;
       sha256 = "1vwq3wqj9cjyz9lnf1n38yhpcglr2h40v3n9096i8vcpmyvdb3ka";
    };
-   
+
   disabled = ( luaOlder "5.1");
   propagatedBuildInputs = [lua say  ];
   buildType="builtin";
@@ -484,8 +584,8 @@ coxpcall = buildLuarocksPackage {
       url    = https://luarocks.org/manifests/hisham/coxpcall-1.17.0-1.src.rock;
       sha256 = "0n1jmda4g7x06458596bamhzhcsly6x0p31yp6q3jz4j11zv1zhi";
    };
-  
-  
+
+
   buildType="builtin";
 
   meta = {
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index 20a24681b6ae..1fcc49bf5468 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -5,6 +5,30 @@ with super;
   ##########################################3
   #### manual fixes for generated packages
   ##########################################3
+  cqueues = super.cqueues.override({
+    nativeBuildInputs = [ pkgs.gnum4 ];
+    buildInputs = [ pkgs.openssl ];
+    extraConfig = with pkgs; ''
+      variables={
+        CRYPTO_INCDIR="${openssl.dev}/include";
+        CRYPTO_LIBDIR="${openssl.out}/lib";
+        OPENSSL_INCDIR="${openssl.dev}/include";
+        OPENSSL_LIBDIR="${openssl.out}/lib";
+      }
+      '';
+  });
+
+  lgi = super.lgi.overrideAttrs(oa: {
+    nativeBuildInputs = [ pkgs.pkgconfig ];
+    buildInputs = with pkgs; oa.buildInputs ++ [ glib gobjectIntrospection];
+    patches = [
+        (pkgs.fetchpatch {
+            name = "lgi-find-cairo-through-typelib.patch";
+            url = "https://github.com/psychon/lgi/commit/46a163d9925e7877faf8a4f73996a20d7cf9202a.patch";
+            sha256 = "0gfvvbri9kyzhvq3bvdbj2l6mwvlz040dk4mrd5m9gz79f7w109c";
+        })
+    ];
+  });
 
   ltermbox = super.ltermbox.override( {
     disabled = !isLua51 || isLuaJIT;
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index de68c139dc28..7a1738b0f3ee 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -100,32 +100,6 @@ with self; {
 
   luarocks-nix = callPackage ../development/tools/misc/luarocks/luarocks-nix.nix { };
 
-  basexx = buildLuaPackage rec {
-    version = "0.4.0";
-    name = "basexx-${version}";
-
-    src = fetchFromGitHub {
-      owner = "aiq";
-      repo = "basexx";
-      rev = "v${version}";
-      sha256 = "12y0ng9bp5b98iax35pnp0kc0mb42spv1cbywvfq6amik6l0ya7g";
-    };
-
-    buildPhase = ":";
-    installPhase = ''
-      install -Dt "$out/lib/lua/${lua.luaversion}/" \
-        lib/basexx.lua
-    '';
-
-    meta = with stdenv.lib; {
-      description = "Lua library for base2, base16, base32, base64, base85";
-      homepage = "https://github.com/aiq/basexx";
-      license = licenses.mit;
-      maintainers = with maintainers; [ vcunat ];
-      platforms = platforms.all;
-    };
-  };
-
   bit32 = buildLuaPackage rec {
     version = "5.3.0";
     name = "bit32-${version}";
@@ -193,55 +167,6 @@ with self; {
     };
   };
 
-  cqueues = buildLuaPackage rec {
-    name = "cqueues-${version}";
-    version = "20171014";
-
-    src = fetchurl {
-      url = "https://www.25thandclement.com/~william/projects/releases/${name}.tgz";
-      sha256 = "1dabhpn6r0hlln8vx9hxm34pfcm46qzgpb2apmziwg5z51fi4ksb";
-    };
-
-    preConfigure = ''export prefix=$out'';
-
-    nativeBuildInputs = [ gnum4 ];
-    buildInputs = [ openssl ];
-
-    meta = with stdenv.lib; {
-      description = "A type of event loop for Lua";
-      homepage = "https://www.25thandclement.com/~william/projects/cqueues.html";
-      license = licenses.mit;
-      maintainers = with maintainers; [ vcunat ];
-      platforms = platforms.unix;
-    };
-  };
-
-  fifo = buildLuaPackage rec {
-    version = "0.2";
-    name = "fifo-${version}";
-
-    src = fetchFromGitHub {
-      owner = "daurnimator";
-      repo = "fifo.lua";
-      rev = version;
-      sha256 = "1800k7h5hxsvm05bjdr65djjml678lwb0661cll78z1ys2037nzn";
-    };
-
-    buildPhase = ":";
-    installPhase = ''
-      mkdir -p "$out/lib/lua/${lua.luaversion}"
-      mv fifo.lua "$out/lib/lua/${lua.luaversion}/"
-    '';
-
-    meta = with stdenv.lib; {
-      description = "A lua library/'class' that implements a FIFO";
-      homepage = "https://github.com/daurnimator/fifo.lua";
-      license = licenses.mit;
-      maintainers = with maintainers; [ vcunat ];
-      platforms = platforms.all;
-    };
-  };
-
   luabitop = buildLuaPackage rec {
     version = "1.0.2";
     name = "bitop-${version}";
@@ -915,32 +840,6 @@ with self; {
     };
   };
 
-  lpeg_patterns = buildLuaPackage rec {
-    version = "0.5";
-    name = "lpeg_patterns-${version}";
-
-    src = fetchFromGitHub {
-      owner = "daurnimator";
-      repo = "lpeg_patterns";
-      rev = "v${version}";
-      sha256 = "1s3c179a64r45ffkawv9dnxw4mzwkzj00nr9z2gs5haajgpjivw6";
-    };
-
-    buildPhase = ":";
-    installPhase = ''
-      mkdir -p "$out/lib/lua/${lua.luaversion}"
-      mv lpeg_patterns "$out/lib/lua/${lua.luaversion}/"
-    '';
-
-    meta = with stdenv.lib; {
-      description = "A collection of LPEG patterns";
-      homepage = "https://github.com/daurnimator/lpeg_patterns";
-      license = licenses.mit;
-      maintainers = with maintainers; [ vcunat ];
-      inherit (lpeg.meta) platforms;
-    };
-  };
-
   cjson = buildLuaPackage rec {
     name = "cjson-${version}";
     version = "2.1.0";
@@ -972,43 +871,6 @@ with self; {
     };
   };
 
-  lgi = toLuaModule(stdenv.mkDerivation rec {
-    name = "lgi-${version}";
-    version = "0.9.2";
-
-    src = fetchFromGitHub {
-      owner = "pavouk";
-      repo = "lgi";
-      rev = version;
-      sha256 = "03rbydnj411xpjvwsyvhwy4plm96481d7jax544mvk7apd8sd5jj";
-    };
-
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ glib gobject-introspection lua ];
-
-    makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
-
-    preBuild = ''
-      sed -i "s|/usr/local|$out|" lgi/Makefile
-    '';
-
-    patches = [
-        (fetchpatch {
-            name = "lgi-find-cairo-through-typelib.patch";
-            url = "https://github.com/psychon/lgi/commit/46a163d9925e7877faf8a4f73996a20d7cf9202a.patch";
-            sha256 = "0gfvvbri9kyzhvq3bvdbj2l6mwvlz040dk4mrd5m9gz79f7w109c";
-        })
-    ];
-
-    meta = with stdenv.lib; {
-      description = "GObject-introspection based dynamic Lua binding to GObject based libraries";
-      homepage    = https://github.com/pavouk/lgi;
-      license     = licenses.mit;
-      maintainers = with maintainers; [ lovek323 rasendubi ];
-      platforms   = platforms.unix;
-    };
-  });
-
   mpack = buildLuaPackage rec {
     name = "mpack-${version}";
     version = "1.0.7";