Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, fuse, glib, zlib }: 2 3stdenv.mkDerivation rec { 4 pname = "fuseiso"; 5 version = "20070708"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/project/fuseiso/fuseiso/${version}/fuseiso-${version}.tar.bz2"; 9 sha256 = "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"; 10 }; 11 12 patches = [ 13 (fetchpatch { 14 name = "00-support_large_iso.patch"; 15 url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/00-support_large_iso.patch"; 16 sha256 = "1lmclb1qwzz5f4wlq693g83bblwnjjl73qhgfxbsaac5hnn2shjw"; 17 }) 18 (fetchpatch { 19 name = "01-fix_typo.patch"; 20 url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/01-fix_typo.patch"; 21 sha256 = "14rpxp0yylzsgqv0r19l4wx1h5hvqp617gpv1yg0w48amr9drasa"; 22 }) 23 (fetchpatch { 24 name = "02-prevent-buffer-overflow_CVE-2015-8837.patch"; 25 url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/02-prevent-buffer-overflow.patch"; 26 sha256 = "1ls2pp3mh91pdb51qz1fsd8pwhbky6988bpd156bn7wgfxqzh8ig"; 27 }) 28 (fetchpatch { 29 name = "03-prevent-integer-overflow_CVE-2015-8836.patch"; 30 url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/03-prevent-integer-overflow.patch"; 31 sha256 = "100cw07fk4sa3hl7a1gk2hgz4qsxdw99y20r7wpidwwwzy463zcv"; 32 }) 33 ]; 34 35 nativeBuildInputs = [ autoreconfHook pkg-config ]; 36 37 buildInputs = [ fuse glib zlib ]; 38 39 # after autoreconfHook, glib and zlib are not found, so force link against 40 # them 41 NIX_LDFLAGS = "-lglib-2.0 -lz"; 42 43 enableParallelBuilding = true; 44 45 postInstall = '' 46 install -Dm444 -t $out/share/doc/${pname} NEWS README 47 ''; 48 49 meta = with lib; { 50 description = "FUSE module to mount ISO filesystem images"; 51 homepage = "https://sourceforge.net/projects/fuseiso"; 52 license = licenses.gpl2; 53 platforms = platforms.linux; 54 }; 55}