lol
at 18.09-beta 41 lines 1.2 kB view raw
1{ stdenv, fetchurl, fetchpatch }: 2 3let 4 version = "2.12"; 5 name = "cpio-${version}"; 6in stdenv.mkDerivation { 7 inherit name; 8 9 src = fetchurl { 10 url = "mirror://gnu/cpio/${name}.tar.bz2"; 11 sha256 = "0vi9q475h1rki53100zml75vxsykzyhrn70hidy41s5c2rc8r6bh"; 12 }; 13 14 patches = [ 15 (fetchpatch { 16 name = "CVE-2015-1197-cpio-2.12.patch"; 17 url = "https://gist.github.com/nckx/70b0bfa80ddfb86c2967/" 18 + "raw/e9b40d4d4b701f584f826775b75beb10751dc884/" 19 + "CVE-2015-1197-cpio-2.12.patch"; 20 sha256 = "0ph43m4lavwkc4gnl5h9p3da4kb1pnhwk5l2qsky70dqri8pcr8v"; 21 }) 22 23 # Report: http://www.openwall.com/lists/oss-security/2016/01/19/4 24 # Patch from https://lists.gnu.org/archive/html/bug-cpio/2016-01/msg00005.html 25 ./CVE-2016-2037-out-of-bounds-write.patch 26 ]; 27 28 preConfigure = if stdenv.isCygwin then '' 29 sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,' 30 '' else null; 31 32 enableParallelBuilding = true; 33 34 meta = with stdenv.lib; { 35 homepage = http://www.gnu.org/software/cpio/; 36 description = "A program to create or extract from cpio archives"; 37 license = licenses.gpl3; 38 platforms = platforms.all; 39 priority = 6; # resolves collision with gnutar's "libexec/rmt" 40 }; 41}