mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
Update luarocks
This commit is contained in:
parent
0fcc634d59
commit
8da8c805bb
@ -1,16 +1,16 @@
|
|||||||
{stdenv, fetchurl, lua, curl}:
|
{stdenv, fetchurl, lua, curl, makeWrapper, which}:
|
||||||
let
|
let
|
||||||
s = # Generated upstream information
|
s = # Generated upstream information
|
||||||
rec {
|
rec {
|
||||||
baseName="luarocks";
|
baseName="luarocks";
|
||||||
version="2.2";
|
version="2.2.0";
|
||||||
name="${baseName}-${version}";
|
name="${baseName}-${version}";
|
||||||
hash="03i46ayimp087288f0bi6g30fi3aixp2bha2jmsbbhwmsxm1yshs";
|
hash="1717p694455w1fdldb2ldlyklln8w3bqk1dsly8gpqh3n73lw6lv";
|
||||||
url="http://luarocks.org/releases/luarocks-2.2.0beta1.tar.gz";
|
url="http://luarocks.org/releases/luarocks-2.2.0-rc1.tar.gz";
|
||||||
sha256="03i46ayimp087288f0bi6g30fi3aixp2bha2jmsbbhwmsxm1yshs";
|
sha256="1717p694455w1fdldb2ldlyklln8w3bqk1dsly8gpqh3n73lw6lv";
|
||||||
};
|
};
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
lua curl
|
lua curl makeWrapper which
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -19,6 +19,29 @@ stdenv.mkDerivation {
|
|||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
inherit (s) url sha256;
|
inherit (s) url sha256;
|
||||||
};
|
};
|
||||||
|
preConfigure = ''
|
||||||
|
lua -e "" || {
|
||||||
|
luajit -e "" && {
|
||||||
|
export LUA_SUFFIX=jit
|
||||||
|
configureFlags="$configureFlags --lua-suffix=$LUA_SUFFIX"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lua_inc="$(echo "${lua}/include"/*/)"
|
||||||
|
if test -n "$lua_inc"; then
|
||||||
|
configureFlags="$configureFlags --with-lua-include=$lua_inc"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
postInstall = ''
|
||||||
|
sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
|
||||||
|
for i in "$out"/bin/*; do
|
||||||
|
test -L "$i" || {
|
||||||
|
wrapProgram "$i" \
|
||||||
|
--prefix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?.lua" \
|
||||||
|
--prefix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \
|
||||||
|
|
||||||
|
}
|
||||||
|
done
|
||||||
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
inherit (s) version;
|
inherit (s) version;
|
||||||
description = ''A package manager for Lua'';
|
description = ''A package manager for Lua'';
|
||||||
|
Loading…
Reference in New Issue
Block a user