From 86c973d429bfa00cce3e0b6a3adaed4c50796b44 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 6 Aug 2015 08:29:07 +0200 Subject: [PATCH] luaPackages.vicious: init at 2.1.3 vicious is a module for creating widgets on window managers. This commit adds the library and a wrapper lua file for easy importing. I use the library with the awesome window manager via luaModules: services.xserver.windowManager.awesome.luaModules = [ pkgs.luaPackages.vicious ]; --- lib/maintainers.nix | 1 + pkgs/top-level/lua-packages.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index f4cd203e41df..c490b9ee979d 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -151,6 +151,7 @@ madjar = "Georges Dubus "; magnetophon = "Bart Brouns "; mahe = "Matthias Herrmann "; + makefu = "Felix Richter "; malyn = "Michael Alyn Miller "; manveru = "Michael Fellinger "; marcweber = "Marc Weber "; diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 383f03934a2f..37a2ec6faee7 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -400,4 +400,29 @@ let ''; }; + vicious = stdenv.mkDerivation rec { + name = "vicious-${version}"; + version = "2.1.3"; + + src = fetchzip { + url = "http://git.sysphere.org/vicious/snapshot/vicious-${version}.tar.xz"; + sha256 = "1c901siza5vpcbkgx99g1vkqiki5qgkzx2brnj4wrpbsbfzq0bcq"; + }; + + meta = with stdenv.lib; { + description = "vicious widgets for window managers"; + homepage = http://git.sysphere.org/vicious/; + license = licenses.gpl2; + maintainers = with maintainers; [ makefu ]; + platforms = platforms.linux; + }; + + buildInputs = [ lua ]; + installPhase = '' + mkdir -p $out/lib/lua/${lua.luaversion}/ + cp -r . $out/lib/lua/${lua.luaversion}/vicious/ + printf "package.path = '$out/lib/lua/${lua.luaversion}/?/init.lua;' .. package.path\nreturn require((...) .. '.init')\n" > $out/lib/lua/${lua.luaversion}/vicious.lua + ''; + }; + }; in self