Skip to content

Commit

Permalink
lua.pkgs.pulseaudio: Move from generated to lua-packages.nix
Browse files Browse the repository at this point in the history
From some reason, the package is not usable if it's built with
`buildLuarocksPackage`. Adding `extraVariables` as in `makeFlags`
doesn't work. See:
#89632 (comment)

Also, remove it from luarocks-packages.csv so hopefully no one will
touch it in the future.
  • Loading branch information
doronbehar committed Jun 8, 2020
1 parent 656468f commit cb9b442
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
1 change: 0 additions & 1 deletion maintainers/scripts/luarocks-packages.csv
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,4 @@ say,,,,,
std__debug,std._debug,,,,
std_normalize,std.normalize,,,,
stdlib,,,,,vyp
pulseaudio,,,,,doronbehar
vstruct,,,,,
18 changes: 0 additions & 18 deletions pkgs/development/lua-modules/generated-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1455,24 +1455,6 @@ stdlib = buildLuarocksPackage {
license.fullName = "MIT/X11";
};
};
pulseaudio = buildLuarocksPackage {
pname = "pulseaudio";
version = "0.2-1";

src = fetchurl {
url = "mirror://luarocks/pulseaudio-0.2-1.src.rock";
sha256 = "06w8fmwddrpm02yam818yi30gghw4ckb18zljjncy3x0zfijyhz7";
};
disabled = (luaOlder "5.1");
propagatedBuildInputs = [ lua ];

meta = with stdenv.lib; {
homepage = "https://github.com/doronbehar/lua-pulseaudio";
description = "Bindings to libpulse";
maintainers = with maintainers; [ doronbehar ];
license.fullName = "Apache v2.0";
};
};
vstruct = buildLuarocksPackage {
pname = "vstruct";
version = "2.0.2-1";
Expand Down
9 changes: 0 additions & 9 deletions pkgs/development/lua-modules/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,4 @@ with super;
sed -i '/set(CMAKE_C_FLAGS/d' CMakeLists.txt
'';
});

pulseaudio = super.pulseaudio.override({
buildInputs = [
pkgs.libpulseaudio
];
nativeBuildInputs = [
pkgs.pulseaudio pkgs.pkgconfig
];
});
}
32 changes: 32 additions & 0 deletions pkgs/top-level/lua-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,37 @@ with self; {
};
});

pulseaudio = buildLuaPackage rec {
name = "pulseaudio-${version}";
version = "0.2-1";

src = fetchFromGitHub {
owner = "doronbehar";
repo = "lua-pulseaudio";
rev = "v${version}";
sha256 = "140y1m6k798c4w7xfl0zb0a4ffjz6i1722bgkdcdg8g76hr5r8ys";
};
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 = "Bindings to libpulse";
maintainers = with maintainers; [ doronbehar ];
license = licenses.lgpl21;
};
};

});
in packages

0 comments on commit cb9b442

Please sign in to comment.