nixpkgs/pkgs/development/tools/misc/luarocks/default.nix
Ryan Mulligan 1a4b6a6d41 lua51Packages.luarocks: 2.4.3 -> 2.4.4
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks --help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks --version` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks --help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-5.1 --help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-5.1 help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-5.1 --version` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-5.1 --help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-5.1 help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin --help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin --version` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin --help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin-5.1 --help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin-5.1 help` got 0 exit code
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin-5.1 --version` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin-5.1 --help` and found version 2.4.4
- ran `/nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4/bin/luarocks-admin-5.1 help` and found version 2.4.4
- found 2.4.4 with grep in /nix/store/az3lanws83s5q26z1s03rx6z6yxphjbq-luarocks-2.4.4
- directory tree listing: https://gist.github.com/cb3889fda28e8066faebd32a433c69d2
2018-03-20 16:38:20 -07:00

53 lines
1.4 KiB
Nix

{stdenv, fetchurl, lua, curl, makeWrapper, which, unzip}:
let
s = # Generated upstream information
rec {
baseName="luarocks";
version="2.4.4";
name="${baseName}-${version}";
hash="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r";
url="http://luarocks.org/releases/luarocks-2.4.4.tar.gz";
sha256="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r";
};
buildInputs = [
lua curl makeWrapper which unzip
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
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 = {
inherit (s) version;
description = ''A package manager for Lua'';
license = stdenv.lib.licenses.mit ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
};
}