summary refs log tree commit diff
path: root/pkgs/top-level/lua-packages.nix
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-12-17 15:03:25 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-12-17 15:08:21 +0100
commit614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53 (patch)
tree268120e524876c372cc38b5b81498331ec9c5801 /pkgs/top-level/lua-packages.nix
parent374a9cc16271d234a85fc90c11b6cc106237b68a (diff)
downloadnixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.tar
nixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.tar.gz
nixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.tar.bz2
nixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.tar.lz
nixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.tar.xz
nixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.tar.zst
nixlib-614162ee6c4ea7dfa14c6fb0c35b0ce3058bda53.zip
Some lua and awesome improvements
- Move lgi to luaPackages
- Use luaPackages in awesome and passthru lua
- Allow to pass lua modules to the awesome WM so that those can be used in the configuration
Diffstat (limited to 'pkgs/top-level/lua-packages.nix')
-rw-r--r--pkgs/top-level/lua-packages.nix33
1 files changed, 31 insertions, 2 deletions
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index 245483e76b38..eeff4a47f9e1 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -5,8 +5,9 @@
    for each package in a separate file: the call to the function would
    be almost as must code as the function itself. */
 
-{ fetchurl, stdenv, lua, callPackage, unzip, zziplib
-, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat
+{ fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig, libtool
+, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat, cairo
+, perl, gtk, python, glib, gobjectIntrospection
 }:
 
 let
@@ -14,6 +15,7 @@ let
   isLua52 = lua.luaversion == "5.2";
   self = _self;
   _self = with self; {
+  inherit lua;
   inherit (stdenv.lib) maintainers;
 
   #define build lua package function
@@ -255,4 +257,31 @@ let
       license = stdenv.lib.licenses.mit;
     };
   };
+
+  lgi = stdenv.mkDerivation rec {
+    name = "lgi-${version}";
+    version = "0.7.2";
+
+    src = fetchurl {
+      url    = "https://github.com/pavouk/lgi/archive/${version}.tar.gz";
+      sha256 = "0ihl7gg77b042vsfh0k7l53b7sl3d7mmrq8ns5lrsf71dzrr19bn";
+    };
+
+    meta = with stdenv.lib; {
+      description = "GObject-introspection based dynamic Lua binding to GObject based libraries";
+      homepage    = https://github.com/pavouk/lgi;
+      license     = "custom";
+      maintainers = with maintainers; [ lovek323 ];
+      platforms   = platforms.unix;
+    };
+
+    buildInputs = [ glib gobjectIntrospection lua pkgconfig ];
+
+    makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
+
+    preBuild = ''
+      sed -i "s|/usr/local|$out|" lgi/Makefile
+    '';
+  };
+
 }; in self