Merge pull request #57015 from Mic92/lua-pkgs
Subset of `Lua: convert some more packages`
This commit is contained in:
commit
2dc7486b39
@ -3,8 +3,6 @@
|
||||
, lua
|
||||
, stdenv
|
||||
, wrapLua
|
||||
, unzip
|
||||
, writeText
|
||||
# Whether the derivation provides a lua module or not.
|
||||
, toLuaModule
|
||||
}:
|
||||
@ -117,14 +115,16 @@ builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
|
||||
cat > ${luarocks_config} <<EOF
|
||||
${luarocks_content}
|
||||
EOF
|
||||
export LUAROCKS_CONFIG=$PWD/${luarocks_config};
|
||||
export LUAROCKS_CONFIG="$PWD/${luarocks_config}";
|
||||
''
|
||||
+ lib.optionalString (knownRockspec != null) ''
|
||||
|
||||
# prevents the following type of error:
|
||||
# Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
|
||||
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
|
||||
cp ''${knownRockspec} $rockspecFilename
|
||||
cp ''${knownRockspec} "$rockspecFilename"
|
||||
''
|
||||
+ ''
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
|
@ -55,4 +55,17 @@ with super;
|
||||
install -D completions/zsh/_busted $out/share/zsh/site-functions/_busted
|
||||
'';
|
||||
});
|
||||
|
||||
luuid = super.luuid.override({
|
||||
buildInputs = [ pkgs.libuuid ];
|
||||
extraConfig = ''
|
||||
variables = {
|
||||
LIBUUID_INCDIR="${pkgs.lib.getDev pkgs.libuuid}/include";
|
||||
LIBUUID_LIBDIR="${pkgs.lib.getLib pkgs.libuuid}/lib";
|
||||
}
|
||||
'';
|
||||
meta = {
|
||||
platforms = pkgs.lib.platforms.linux;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ let
|
||||
|
||||
buildLuarocksPackage = with pkgs.lib; makeOverridable( callPackage ../development/interpreters/lua-5/build-lua-package.nix {
|
||||
inherit toLuaModule;
|
||||
inherit lua writeText;
|
||||
inherit lua;
|
||||
});
|
||||
in
|
||||
with self; {
|
||||
@ -87,7 +87,7 @@ with self; {
|
||||
inherit toLuaModule lua-setup-hook;
|
||||
inherit buildLuarocksPackage buildLuaApplication;
|
||||
inherit requiredLuaModules luaOlder luaAtLeast
|
||||
isLua51 isLua52 isLuaJIT lua callPackage;
|
||||
isLua51 isLua52 isLua53 isLuaJIT lua callPackage;
|
||||
|
||||
# wraps programs in $out/bin with valid LUA_PATH/LUA_CPATH
|
||||
wrapLua = callPackage ../development/interpreters/lua-5/wrap-lua.nix {
|
||||
|
Loading…
Reference in New Issue
Block a user