summary refs log tree commit diff
path: root/maintainers
diff options
context:
space:
mode:
authorMatthieu Coudron <mcoudron@hotmail.com>2021-07-28 02:28:25 +0200
committerMatthieu Coudron <mcoudron@hotmail.com>2021-07-30 00:32:15 +0200
commit594a143e0e5dafbce1a2f400e233388d4461b7ae (patch)
treed569765eaeed72ec66b247ad1e6eaeb5b54b9e18 /maintainers
parent8ecc61c91a596df7d3293603a9c2384190c1b89a (diff)
downloadnixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.tar
nixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.tar.gz
nixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.tar.bz2
nixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.tar.lz
nixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.tar.xz
nixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.tar.zst
nixpkgs-594a143e0e5dafbce1a2f400e233388d4461b7ae.zip
lua: normalize package name
Diffstat (limited to 'maintainers')
-rwxr-xr-xmaintainers/scripts/update-luarocks-packages6
1 files changed, 5 insertions, 1 deletions
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