summary refs log tree commit diff
path: root/pkgs/development/lua-modules
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-05-12 09:58:28 +0200
committerVladimír Čunát <v@cunat.cz>2019-05-12 10:01:48 +0200
commitec5f5a21d7e99ee13e00a90c693ec48cd5354b77 (patch)
treefa20d6f5b450636b45826c81c88ed92c418429f0 /pkgs/development/lua-modules
parent90f6472633cc2bbe9174f26b07de1f372ae25170 (diff)
parent110fb944f11f6ee2c9bee661fc125abd68c26db8 (diff)
downloadnixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.tar
nixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.tar.gz
nixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.tar.bz2
nixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.tar.lz
nixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.tar.xz
nixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.tar.zst
nixpkgs-ec5f5a21d7e99ee13e00a90c693ec48cd5354b77.zip
Merge #60614: lua*Packages improvements
Diffstat (limited to 'pkgs/development/lua-modules')
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix40
-rw-r--r--pkgs/development/lua-modules/overrides.nix29
2 files changed, 66 insertions, 3 deletions
diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix
index a1f7a2096e5..e13f6a4d96e 100644
--- a/pkgs/development/lua-modules/generated-packages.nix
+++ b/pkgs/development/lua-modules/generated-packages.nix
@@ -76,6 +76,26 @@ basexx = buildLuarocksPackage {
     };
   };
 };
+binaryheap = buildLuarocksPackage {
+  pname = "binaryheap";
+  version = "0.4-1";
+
+  src = fetchurl {
+      url    = https://luarocks.org/binaryheap-0.4-1.src.rock;
+      sha256 = "11rd8r3bpinfla2965jgjdv1hilqdc1q6g1qla5978d7vzg19kpc";
+  };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [ lua ];  
+  buildType = "builtin";
+
+  meta = {
+    homepage = "https://github.com/Tieske/binaryheap.lua";
+    description="Binary heap implementation in pure Lua";
+    license = {
+      fullName = "MIT/X11";
+    };
+  };
+};
 dkjson = buildLuarocksPackage {
   pname = "dkjson";
   version = "2.5-2";
@@ -116,6 +136,26 @@ fifo = buildLuarocksPackage {
     };
   };
 };
+http = buildLuarocksPackage {
+  pname = "http";
+  version = "0.3-0";
+
+  src = fetchurl {
+      url    = https://luarocks.org/http-0.3-0.src.rock;
+      sha256 = "0vvl687bh3cvjjwbyp9cphqqccm3slv4g7y3h03scp3vpq9q4ccq";
+  };
+  disabled = ( luaOlder "5.1");
+  propagatedBuildInputs = [ lua compat53 bit32 cqueues luaossl basexx lpeg lpeg_patterns binaryheap fifo ];  
+  buildType = "builtin";
+
+  meta = {
+    homepage = "https://github.com/daurnimator/lua-http";
+    description="HTTP library for Lua";
+    license = {
+      fullName = "MIT";
+    };
+  };
+};
 inspect = buildLuarocksPackage {
   pname = "inspect";
   version = "3.1.1-0";
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index 0cf0c70faa1..c88f5f9f57c 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -56,7 +56,7 @@ with super;
     '';
   });
 
-  luuid = super.luuid.override({
+  luuid = super.luuid.override(oa: {
     buildInputs = [ pkgs.libuuid ];
     extraConfig = ''
       variables = {
@@ -64,7 +64,7 @@ with super;
         LIBUUID_LIBDIR="${pkgs.lib.getLib pkgs.libuuid}/lib";
       }
     '';
-    meta = {
+    meta = oa.meta // {
       platforms = pkgs.lib.platforms.linux;
     };
   });
@@ -75,4 +75,27 @@ with super;
       sed -i '/set(CMAKE_C_FLAGS/d' CMakeLists.txt
     '';
   });
- }
+
+  binaryheap = super.binaryheap.overrideAttrs(oa: {
+    meta = oa.meta // {
+      maintainers = with pkgs.lib.maintainers; oa.meta.maintainers ++ [ vcunat ];
+    };
+  });
+
+  http = super.http.overrideAttrs(oa: {
+    patches = oa.patches or [] ++ [
+      (pkgs.fetchpatch {
+        name = "invalid-state-progression.patch";
+        url = "https://github.com/daurnimator/lua-http/commit/cb7b59474a.diff";
+        sha256 = "1vmx039n3nqfx50faqhs3wgiw28ws416rhw6vh6srmh9i826dac7";
+      })
+    ];
+    /* TODO: separate docs derivation? (pandoc is heavy)
+    nativeBuildInputs = [ pandoc ];
+    makeFlags = [ "-C doc" "lua-http.html" "lua-http.3" ];
+    */
+    meta = oa.meta // {
+      maintainers = with pkgs.lib.maintainers; oa.meta.maintainers ++ [ vcunat ];
+    };
+  });
+}