luarocks: 3.8.0 -> 3.9.0

pass the config to the luarocks binary

also bumps luarocks-nix: bump package due to the luarocks rebase

Changed files
+25 -8
maintainers
pkgs
development
tools
+6 -2
maintainers/scripts/update-luarocks-packages
···
Our cache key associates "p.name-p.version" to its rockspec
'''
log.debug("Generating nix expression for %s", plug.name)
-
cmd = [ "luarocks", "nix"]
+
custom_env = os.environ.copy()
+
# TODO check
+
custom_env['LUAROCKS_CONFIG'] = LUAROCKS_CONFIG
+
cmd = [ "luarocks", "nix"]
if plug.maintainers:
cmd.append(f"--maintainers={plug.maintainers}")
···
cmd.append(f"--lua-dir={lua_drv_path}/bin")
log.debug("running %s", ' '.join(cmd))
-
output = subprocess.check_output(cmd, text=True)
+
+
output = subprocess.check_output(cmd, env=custom_env, text=True)
output = "callPackage(" + output.strip() + ") {};\n\n"
return (plug, output)
+9 -2
pkgs/development/tools/misc/luarocks/default.nix
···
, lua
# for 'luarocks pack'
, zip
+
, nix-update-script
# some packages need to be compiled with cmake
, cmake
, installShellFiles
···
stdenv.mkDerivation rec {
pname = "luarocks";
-
version = "3.8.0";
+
version = "3.9.0";
src = fetchFromGitHub {
owner = "luarocks";
repo = "luarocks";
rev = "v${version}";
-
sha256 = "sha256-tPSAtveOodF2w54d82hEyaTj91imtySJUTsk/gje2dQ=";
+
sha256 = "sha256-i0NmF268aK5lr4zjYyhk4TPUO7Zyz0Cl0fSW43Pmd1Q=";
};
patches = [ ./darwin-3.7.0.patch ];
···
export PATH="src/bin:''${PATH:-}"
export LUA_PATH="src/?.lua;''${LUA_PATH:-}"
'';
+
+
passthru = {
+
updateScript = nix-update-script {
+
attrPath = pname;
+
};
+
};
meta = with lib; {
description = "A package manager for Lua";
+10 -4
pkgs/development/tools/misc/luarocks/luarocks-nix.nix
···
-
{ luarocks, fetchFromGitHub }:
+
{ luarocks, fetchFromGitHub, nix-update-script }:
luarocks.overrideAttrs(old: {
pname = "luarocks-nix";
-
version = "2021-01-22";
+
src = fetchFromGitHub {
owner = "nix-community";
repo = "luarocks-nix";
-
rev = "6aa1d59e88eaef72d699477c3e7aa98b274ca405";
-
sha256 = "sha256-nQLl01RFYZYhpShz0gHxnhwFPvTgALpAbjFPIuTD2D0=";
+
rev = "b1ff9eeb64c7c1dc5fc177008d6f2be9191c6aa2";
+
sha256 = "sha256-mkzrf/6yMyLMIEDwsuCIxi1HJvg57ybyZPXVheFAAHE=";
};
patches = [];
+
+
passthru = {
+
updateScript = nix-update-script {
+
attrPath = "luarocks-nix";
+
};
+
};
meta.mainProgram = "luarocks";
})