From 922de4f4b54858a4938a5593d50b5a5eecd47712 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 28 Sep 2019 16:31:39 +0300 Subject: [PATCH] luaPackages.pulseaudio: init at 0.1 --- maintainers/scripts/luarocks-packages.csv | 1 + pkgs/top-level/lua-packages.nix | 33 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index a6fbcd5a0beb..a13bd22916a8 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -68,3 +68,4 @@ say,,,,, std__debug,std._debug,,,, std_normalize,std.normalize,,,, stdlib,,,,,vyp +pulseaudio,,,,,doronbehar diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index c9e9305666e2..2fb09981c9a2 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -132,6 +132,39 @@ with self; { }; }; + pulseaudio = buildLuaPackage rec { + pname = "pulseaudio"; + version = "0.1"; + name = "pulseaudio-${version}"; + + src = fetchFromGitHub { + owner = "doronbehar"; + repo = "lua-pulseaudio"; + rev = "v${version}"; + sha256 = "0vldm34m3ysgn8gvwfdglpw4jl5680fvfay7pzs14gzkzcvgv25b"; + }; + disabled = (luaOlder "5.1") || (luaAtLeast "5.5"); + buildInputs = [ pkgs.libpulseaudio ]; + propagatedBuildInputs = [ lua ]; + nativeBuildInputs = [ pkgs.pulseaudio pkgconfig ]; + + makeFlags = [ + "INST_LIBDIR=${placeholder "out"}/lib/lua/${lua.luaversion}" + "INST_LUADIR=${placeholder "out"}/share/lua/${lua.luaversion}" + "LUA_BINDIR=${placeholder "out"}/bin" + ]; + preBuild = '' + mkdir -p ${placeholder "out"}/lib/lua/${lua.luaversion} + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/doronbehar/lua-pulseaudio"; + description = "Libpulse Lua bindings"; + maintainers = with maintainers; [ doronbehar ]; + license = licenses.lgpl21; + }; + }; + vicious = toLuaModule(stdenv.mkDerivation rec { pname = "vicious"; version = "2.3.1";