diff options
author | Matthieu Coudron <mcoudron@hotmail.com> | 2021-10-04 00:10:46 +0200 |
---|---|---|
committer | Matthieu Coudron <teto@users.noreply.github.com> | 2021-10-18 19:48:07 +0200 |
commit | 253af9151f69d2a39f0238eab5075e7ede1454a9 (patch) | |
tree | 3c5dbdc802e314f28fc13853c7fed88df3088dde /maintainers/scripts | |
parent | ecd018bb00495a4c6420e1596f206462a1fb829b (diff) |
luaPackages: update
- luarocks-nix: bumped to pass args too, `package_X = callPackage ...`.
It allows to remove the annoying `with self`.
This new version disables tests (because broken) and now emits derivation
with a callPackage in front.
- replaced X.override with lib.overrideLuarocks, it should be used
whenever buildInputs/extraVariables is changed since it impacts the
generated luarocks config.
Once structured attributes are in, it will be easier to have the
luarocks config generated by a hook and we probably will be able to
replace all overrideLuarocks by overrideAttrs.
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/update-luarocks-packages | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/maintainers/scripts/update-luarocks-packages b/maintainers/scripts/update-luarocks-packages index a465031b9112..c559d5699dff 100755 --- a/maintainers/scripts/update-luarocks-packages +++ b/maintainers/scripts/update-luarocks-packages @@ -33,8 +33,7 @@ TMP_FILE="$(mktemp)" GENERATED_NIXFILE="pkgs/development/lua-modules/generated-packages.nix" LUAROCKS_CONFIG="$NIXPKGS_PATH/maintainers/scripts/luarocks-config.lua" -HEADER = """ -/* {GENERATED_NIXFILE} is an auto-generated file -- DO NOT EDIT! +HEADER = """/* {GENERATED_NIXFILE} is an auto-generated file -- DO NOT EDIT! Regenerate it with: nixpkgs$ ./maintainers/scripts/update-luarocks-packages @@ -99,9 +98,8 @@ class LuaEditor(Editor): header2 = textwrap.dedent( # header2 = inspect.cleandoc( """ - { self, stdenv, lib, fetchurl, fetchgit, ... } @ args: - self: super: - with self; + { self, stdenv, lib, fetchurl, fetchgit, callPackage, ... } @ args: + final: prev: { """) f.write(header2) @@ -199,6 +197,7 @@ def generate_pkg_nix(plug: LuaPlugin): log.debug("running %s", ' '.join(cmd)) output = subprocess.check_output(cmd, text=True) + output = "callPackage(" + output.strip() + ") {};\n\n" return (plug, output) def main(): |