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
|
, lua
|
||||||
, stdenv
|
, stdenv
|
||||||
, wrapLua
|
, wrapLua
|
||||||
, unzip
|
|
||||||
, writeText
|
|
||||||
# Whether the derivation provides a lua module or not.
|
# Whether the derivation provides a lua module or not.
|
||||||
, toLuaModule
|
, toLuaModule
|
||||||
}:
|
}:
|
||||||
@ -117,14 +115,16 @@ builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
|
|||||||
cat > ${luarocks_config} <<EOF
|
cat > ${luarocks_config} <<EOF
|
||||||
${luarocks_content}
|
${luarocks_content}
|
||||||
EOF
|
EOF
|
||||||
export LUAROCKS_CONFIG=$PWD/${luarocks_config};
|
export LUAROCKS_CONFIG="$PWD/${luarocks_config}";
|
||||||
''
|
''
|
||||||
+ lib.optionalString (knownRockspec != null) ''
|
+ lib.optionalString (knownRockspec != null) ''
|
||||||
|
|
||||||
# prevents the following type of error:
|
# 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)
|
# Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
|
||||||
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
|
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
|
||||||
cp ''${knownRockspec} $rockspecFilename
|
cp ''${knownRockspec} "$rockspecFilename"
|
||||||
|
''
|
||||||
|
+ ''
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -55,4 +55,17 @@ with super;
|
|||||||
install -D completions/zsh/_busted $out/share/zsh/site-functions/_busted
|
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 {
|
buildLuarocksPackage = with pkgs.lib; makeOverridable( callPackage ../development/interpreters/lua-5/build-lua-package.nix {
|
||||||
inherit toLuaModule;
|
inherit toLuaModule;
|
||||||
inherit lua writeText;
|
inherit lua;
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
with self; {
|
with self; {
|
||||||
@ -87,7 +87,7 @@ with self; {
|
|||||||
inherit toLuaModule lua-setup-hook;
|
inherit toLuaModule lua-setup-hook;
|
||||||
inherit buildLuarocksPackage buildLuaApplication;
|
inherit buildLuarocksPackage buildLuaApplication;
|
||||||
inherit requiredLuaModules luaOlder luaAtLeast
|
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
|
# wraps programs in $out/bin with valid LUA_PATH/LUA_CPATH
|
||||||
wrapLua = callPackage ../development/interpreters/lua-5/wrap-lua.nix {
|
wrapLua = callPackage ../development/interpreters/lua-5/wrap-lua.nix {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user