diff options
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh | 4 | ||||
-rw-r--r-- | maintainers/scripts/luarocks-packages.csv | 3 | ||||
-rwxr-xr-x | maintainers/scripts/update-luarocks-packages | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh index c49ea68fbfb..9e243052f25 100755 --- a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh +++ b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh @@ -12,10 +12,10 @@ # ~/.cabal/config file. # e.g. username: maralorn -# password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression.) +# password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression. Like cabal we only read the first output line and ignore the rest.) # Those fields are specified under `upload` on the `cabal` man page. package_list="$(nix-build -A haskell.package-list)/nixos-hackage-packages.csv" username=$(grep "^username:" ~/.cabal/config | sed "s/^username: //") password_command=$(grep "^password-command:" ~/.cabal/config | sed "s/^password-command: //") -curl -u "$username:$($password_command)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv +curl -u "$username:$($password_command | head -n1)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index a387430245a..b092a58b2d1 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -78,10 +78,11 @@ mpack,,,,, moonscript,,,,,arobyn nvim-client,,,,, penlight,,,,, +plenary.nvim,,,,lua5_1, rapidjson,,,,, readline,,,,, say,,,,, -std__debug,std._debug,,,, +std-_debug,std._debug,,,, std_normalize,std.normalize,,,, stdlib,,,,,vyp vstruct,,,,, diff --git a/maintainers/scripts/update-luarocks-packages b/maintainers/scripts/update-luarocks-packages index da4d224bd33..c7180083da2 100755 --- a/maintainers/scripts/update-luarocks-packages +++ b/maintainers/scripts/update-luarocks-packages @@ -89,6 +89,10 @@ function convert_pkg() { echo "Skipping comment ${*}" >&2 return fi + + # Normalize package name + nix_pkg_name_normalized=$(sed 's/\./-/' <(echo "$nix_pkg_name")) + if [ -z "$lua_pkg_name" ]; then echo "Using nix_name as lua_pkg_name for '$nix_pkg_name'" >&2 lua_pkg_name="$nix_pkg_name" @@ -111,7 +115,7 @@ function convert_pkg() { luarocks_args+=("$pkg_version") fi echo "Running 'luarocks ${luarocks_args[*]}'" >&2 - if drv="$nix_pkg_name = $(luarocks "${luarocks_args[@]}")"; then + if drv="$nix_pkg_name_normalized = $(luarocks "${luarocks_args[@]}")"; then echo "$drv" else echo "Failed to convert $nix_pkg_name" >&2 |