luajitPackages: Improve derivation names

`"lua" + lua.luaversion + "-"` resolves to "lua51-" for both Lua
5.1 and LuaJIT packages. With this, LuaJIT packages instead get
`lua.name + "-"`, which currently resolves to "luajit-2.1.0-beta3-".
This makes it easy to distinguish the two in store paths etc.
This commit is contained in:
Alexei Robyn 2019-06-20 23:58:51 +10:00 committed by Matthieu Coudron
parent fa30c32db0
commit f2aa671ad7

View File

@ -12,7 +12,9 @@ name ? "${attrs.pname}-${attrs.version}"
, version
# by default prefix `name` e.g. "lua5.2-${name}"
, namePrefix ? "lua" + lua.luaversion + "-"
, namePrefix ? if lua.pkgs.isLuaJIT
then lua.name + "-"
else "lua" + lua.luaversion + "-"
# Dependencies for building the package
, buildInputs ? []