From 0b13ca520afd8e0877f164aaeabaa7ac0105e8bc Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Sat, 7 May 2022 11:04:36 +0300 Subject: [PATCH] lua53Packages.lmpfrlib: init at 20170112-2 --- maintainers/scripts/luarocks-packages.csv | 1 + .../lua-modules/generated-packages.nix | 26 +++++++++++++++++++ pkgs/development/lua-modules/overrides.nix | 10 +++++++ 3 files changed, 37 insertions(+) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 44a340a46349..407a3b7d4e4f 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -23,6 +23,7 @@ lgi,,,,,, linenoise,https://github.com/hoelzro/lua-linenoise.git,,,,, ljsyscall,,,,,lua5_1,lblasc lmathx,,,,,lua5_3,alexshpilkin +lmpfrlib,,,,,lua5_3,alexshpilkin lpeg,,,,,,vyp lpeg_patterns,,,,,, lpeglabel,,,,,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 62c50bf6d701..71f0d88fc3cf 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -684,6 +684,32 @@ buildLuarocksPackage { }; }) {}; +lmpfrlib = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast +, fetchurl, lua +}: +buildLuarocksPackage { + pname = "lmpfrlib"; + version = "20170112-2"; + knownRockspec = (fetchurl { + url = "https://luarocks.org/lmpfrlib-20170112-2.rockspec"; + sha256 = "1x7qiwmk5b9fi87fn7yvivdsis8h9fk9r3ipqiry5ahx72vzdm7d"; + }).outPath; + src = fetchurl { + url = "http://www.circuitwizard.de/lmpfrlib/lmpfrlib.c"; + sha256 = "00d32cwvk298k3vyrjkdmfjgc69x1fwyks3hs7dqr2514zdhgssm"; + }; + + disabled = with lua; (luaOlder "5.3") || (luaAtLeast "5.5"); + propagatedBuildInputs = [ lua ]; + + meta = { + homepage = "http://www.circuitwizard.de/lmpfrlib/lmpfrlib.html"; + description = "Lua API for the GNU MPFR library"; + maintainers = with lib.maintainers; [ alexshpilkin ]; + license.fullName = "LGPL"; + }; +}) {}; + lpeg = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast , fetchurl, lua }: diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 3beb049c80fc..46185e544b68 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -161,6 +161,16 @@ with prev; ''; }); + lmpfrlib = prev.lib.overrideLuarocks prev.lmpfrlib (drv: { + externalDeps = [ + { name = "GMP"; dep = pkgs.gmp; } + { name = "MPFR"; dep = pkgs.mpfr; } + ]; + unpackPhase = '' + cp $src $(stripHash $src) + ''; + }); + lrexlib-gnu = prev.lib.overrideLuarocks prev.lrexlib-gnu (drv: { buildInputs = [ pkgs.gnulib