From b8173c4a0e03f3f25601bf4c12175a9fa6a887f0 Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Tue, 23 Nov 2021 16:32:11 +1100 Subject: [PATCH] luaPackages.moonscript: Correct package version to dev-1 The "0.5.0-1" rockspec on luarocks has a bug, resulting in it pulling the current git master version, which is what we have effectively been using. Given that 0.5.0-1 is the latest release, is 6 years old, and that there have been some bug fixes since then, we do actually want to be using the git master version, but we also want to be using the correct rockspec (particularly as alt-getopt has been replaced by argparse in the `moon` binary). --- maintainers/scripts/luarocks-packages.csv | 2 +- pkgs/development/lua-modules/generated-packages.nix | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index d4a5f83d011..23303d22c47 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -73,7 +73,7 @@ lyaml,,,,,,lblasc markdown,,,,,, mediator_lua,,,,,, mpack,,,,,, -moonscript,,,,,,arobyn +moonscript,https://github.com/leafo/moonscript.git,dev-1,,,,arobyn nvim-client,https://github.com/neovim/lua-client.git,,,,, penlight,https://github.com/lunarmodules/Penlight.git,,,,,alerque plenary.nvim,https://github.com/nvim-lua/plenary.nvim.git,,,,lua5_1, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 983efa4329d..66b8396c083 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -2138,15 +2138,12 @@ buildLuarocksPackage { }) {}; moonscript = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchgit, lua, lpeg, alt-getopt, luafilesystem +, fetchgit, lua, lpeg, argparse, luafilesystem }: buildLuarocksPackage { pname = "moonscript"; - version = "0.5.0-1"; - knownRockspec = (fetchurl { - url = "https://luarocks.org/moonscript-0.5.0-1.rockspec"; - sha256 = "06ykvmzndkcmbwn85a4l1cl8v8jw38g0isdyhwwbgv0m5a306j6d"; - }).outPath; + version = "dev-1"; + src = fetchgit ( removeAttrs (builtins.fromJSON ''{ "url": "https://github.com/leafo/moonscript.git", "rev": "b7efcd131046ed921ae1075d7c0f6a3b64a570f7", @@ -2161,7 +2158,7 @@ buildLuarocksPackage { '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); - propagatedBuildInputs = [ lua lpeg alt-getopt luafilesystem ]; + propagatedBuildInputs = [ lua lpeg argparse luafilesystem ]; meta = { homepage = "http://moonscript.org";