summary refs log tree commit diff
path: root/pkgs/top-level
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2018-07-30 17:32:34 +0200
committerVladimír Čunát <vcunat@gmail.com>2018-07-30 17:35:20 +0200
commit7a605f3c7833119c16cb9ab366bbf5331455de77 (patch)
treed762ba58e253f0107d538e3f85908acc1cdcdb9a /pkgs/top-level
parent40140997cb212e7bd97e3a31301c5cf3656fe4d0 (diff)
downloadnixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.tar
nixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.tar.gz
nixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.tar.bz2
nixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.tar.lz
nixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.tar.xz
nixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.tar.zst
nixlib-7a605f3c7833119c16cb9ab366bbf5331455de77.zip
lua*Packages.http: init at 0.2
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/lua-packages.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index aadf3cbcf83d..7933ca46b98a 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -222,6 +222,38 @@ let
     };
   };
 
+  http = buildLuaPackage rec {
+    version = "0.2";
+    name = "http-${version}";
+
+    src = fetchFromGitHub {
+      owner = "daurnimator";
+      repo = "lua-http";
+      rev = "v${version}";
+      sha256 = "0a8vsj49alaf1fkhv51n5mgpjq8izfff3shcjs8xk7p2bc46vd7i";
+    };
+
+    /* TODO: separate docs derivation? (pandoc is heavy)
+    nativeBuildInputs = [ pandoc ];
+    makeFlags = [ "-C doc" "lua-http.html" "lua-http.3" ];
+    */
+
+    buildPhase = ":";
+    installPhase = ''
+      install -Dt "$out/lib/lua/${lua.luaversion}/http" \
+        http/*.lua
+      install -Dt "$out/lib/lua/${lua.luaversion}/http/compat" \
+        http/compat/*.lua
+    '';
+
+    meta = with stdenv.lib; {
+      description = "HTTP library for lua";
+      homepage = "https://daurnimator.github.io/lua-http/${version}/";
+      license = licenses.mit;
+      maintainers = with maintainers; [ vcunat ];
+    };
+  };
+
   luacheck = buildLuaPackage rec {
     pname = "luacheck";
     version = "0.20.0";