Loading pkgs/by-name/lu/luarocks-packages-updater/updater.py +17 −9 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ PKG_LIST = "maintainers/scripts/luarocks-packages.csv" TMP_FILE = "$(mktemp)" GENERATED_NIXFILE = "pkgs/development/lua-modules/generated-packages.nix" 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: nix run nixpkgs#luarocks-packages-updater You can customize the generated packages in pkgs/development/lua-modules/overrides.nix */ Loading @@ -58,7 +59,7 @@ You can customize the generated packages in pkgs/development/lua-modules/overrid FOOTER = """ } /* GENERATED - do not edit this file */ # GENERATED - do not edit this file """ Loading Loading @@ -119,9 +120,15 @@ class LuaEditor(pluginupdate.Editor): f.write(HEADER) header2 = textwrap.dedent( """ { stdenv, lib, fetchurl, fetchgit, callPackage, ... }: final: prev: { stdenv, lib, fetchurl, fetchgit, callPackage, ... }: final: prev: { """ ) f.write(header2) Loading Loading @@ -231,7 +238,8 @@ 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" ## FIXME: luarocks nix command output isn't formatted properly output = "callPackage(\n" + output.strip() + ") {};\n\n" return (plug, output, None) except subprocess.CalledProcessError as e: log.error("Failed to generate nix expression for %s: %s", plug.name, e) Loading Loading
pkgs/by-name/lu/luarocks-packages-updater/updater.py +17 −9 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ PKG_LIST = "maintainers/scripts/luarocks-packages.csv" TMP_FILE = "$(mktemp)" GENERATED_NIXFILE = "pkgs/development/lua-modules/generated-packages.nix" 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: nix run nixpkgs#luarocks-packages-updater You can customize the generated packages in pkgs/development/lua-modules/overrides.nix */ Loading @@ -58,7 +59,7 @@ You can customize the generated packages in pkgs/development/lua-modules/overrid FOOTER = """ } /* GENERATED - do not edit this file */ # GENERATED - do not edit this file """ Loading Loading @@ -119,9 +120,15 @@ class LuaEditor(pluginupdate.Editor): f.write(HEADER) header2 = textwrap.dedent( """ { stdenv, lib, fetchurl, fetchgit, callPackage, ... }: final: prev: { stdenv, lib, fetchurl, fetchgit, callPackage, ... }: final: prev: { """ ) f.write(header2) Loading Loading @@ -231,7 +238,8 @@ 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" ## FIXME: luarocks nix command output isn't formatted properly output = "callPackage(\n" + output.strip() + ") {};\n\n" return (plug, output, None) except subprocess.CalledProcessError as e: log.error("Failed to generate nix expression for %s: %s", plug.name, e) Loading