lua-5.3: add patch for CVE-2019-6706

Taken from
http://launchpadlibrarian.net/417853567/lua5.3_5.3.3-1_5.3.3-1ubuntu0.18.10.1.diff.gz
and adapted to our needs.

Re #54799
This commit is contained in:
Christian Kauhaus
2019-11-21 11:10:45 +01:00
parent 6cffb5072f
commit 9a1e9258f6
2 changed files with 27 additions and 2 deletions
@@ -1,5 +1,5 @@
# similar to interpreters/python/default.nix
{ stdenv, lib, callPackage, fetchurl }:
{ stdenv, lib, callPackage, fetchurl, fetchpatch }:
let
dsoPatch51 = fetchurl {
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/lua-arch.patch?h=packages/lua51";
@@ -18,7 +18,10 @@ in rec {
lua5_3 = callPackage ./interpreter.nix {
sourceVersion = { major = "5"; minor = "3"; patch = "5"; };
hash = "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac";
patches = lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ] ;
patches =
lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ] ++ [
./CVE-2019-6706.patch
];
postConfigure = lib.optionalString (!stdenv.isDarwin) ''
cat ${./lua-5.3-dso.make} >> src/Makefile
sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile