mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 21:42:35 +03:00
Merge pull request #171975 from alexshpilkin/add-lua-maths
This commit is contained in:
commit
135e27c148
@ -22,6 +22,8 @@ ldoc,https://github.com/stevedonovan/LDoc.git,,,,,
|
|||||||
lgi,,,,,,
|
lgi,,,,,,
|
||||||
linenoise,https://github.com/hoelzro/lua-linenoise.git,,,,,
|
linenoise,https://github.com/hoelzro/lua-linenoise.git,,,,,
|
||||||
ljsyscall,,,,,lua5_1,lblasc
|
ljsyscall,,,,,lua5_1,lblasc
|
||||||
|
lmathx,,,,,lua5_3,alexshpilkin
|
||||||
|
lmpfrlib,,,,,lua5_3,alexshpilkin
|
||||||
lpeg,,,,,,vyp
|
lpeg,,,,,,vyp
|
||||||
lpeg_patterns,,,,,,
|
lpeg_patterns,,,,,,
|
||||||
lpeglabel,,,,,,
|
lpeglabel,,,,,,
|
||||||
|
|
@ -659,6 +659,57 @@ buildLuarocksPackage {
|
|||||||
};
|
};
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
|
lmathx = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast
|
||||||
|
, fetchurl, lua
|
||||||
|
}:
|
||||||
|
buildLuarocksPackage {
|
||||||
|
pname = "lmathx";
|
||||||
|
version = "20150624-1";
|
||||||
|
knownRockspec = (fetchurl {
|
||||||
|
url = "https://luarocks.org/lmathx-20150624-1.rockspec";
|
||||||
|
sha256 = "181wzsj1mxjyia43y8zwaydxahnl7a70qzcgc8jhhgic7jyi9pgv";
|
||||||
|
}).outPath;
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.3/lmathx.tar.gz";
|
||||||
|
sha256 = "1r0ax3lq4xx6469aqc6qlfl3jynlghzhl5j65mpdj0kyzv4nknzf";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ lua ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lmathx";
|
||||||
|
description = "C99 extensions for the math library";
|
||||||
|
maintainers = with lib.maintainers; [ alexshpilkin ];
|
||||||
|
license.fullName = "Public domain";
|
||||||
|
};
|
||||||
|
}) {};
|
||||||
|
|
||||||
|
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
|
lpeg = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast
|
||||||
, fetchurl, lua
|
, fetchurl, lua
|
||||||
}:
|
}:
|
||||||
|
@ -129,6 +129,48 @@ with prev;
|
|||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
lmathx = prev.lib.overrideLuarocks prev.lmathx (drv:
|
||||||
|
if luaAtLeast "5.1" && luaOlder "5.2" then {
|
||||||
|
version = "20120430.51-1";
|
||||||
|
knownRockspec = (pkgs.fetchurl {
|
||||||
|
url = "https://luarocks.org/lmathx-20120430.51-1.rockspec";
|
||||||
|
sha256 = "148vbv2g3z5si2db7rqg5bdily7m4sjyh9w6r3jnx3csvfaxyhp0";
|
||||||
|
}).outPath;
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://web.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1/lmathx.tar.gz";
|
||||||
|
sha256 = "0sa553d0zlxhvpsmr4r7d841f16yq4wr3fg7i07ibxkz6yzxax51";
|
||||||
|
};
|
||||||
|
} else
|
||||||
|
if luaAtLeast "5.2" && luaOlder "5.3" then {
|
||||||
|
version = "20120430.52-1";
|
||||||
|
knownRockspec = (pkgs.fetchurl {
|
||||||
|
url = "https://luarocks.org/lmathx-20120430.52-1.rockspec";
|
||||||
|
sha256 = "14rd625sipakm72wg6xqsbbglaxyjba9nsajsfyvhg0sz8qjgdya";
|
||||||
|
}).outPath;
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.2/lmathx.tar.gz";
|
||||||
|
sha256 = "19dwa4z266l2njgi6fbq9rak4rmx2fsx1s0p9sl166ar3mnrdwz5";
|
||||||
|
};
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
disabled = luaOlder "5.1" || luaAtLeast "5.5";
|
||||||
|
# works fine with 5.4 as well
|
||||||
|
postConfigure = ''
|
||||||
|
substituteInPlace ''${rockspecFilename} \
|
||||||
|
--replace 'lua ~> 5.3' 'lua >= 5.3, < 5.5'
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
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: {
|
lrexlib-gnu = prev.lib.overrideLuarocks prev.lrexlib-gnu (drv: {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.gnulib
|
pkgs.gnulib
|
||||||
|
Loading…
Reference in New Issue
Block a user