libofa: fix patch application

Without the change patches fail to apply as `$patches` contain compressed
tarball:

applying patch /nix/store/yrl3bq4ag3787yq32zawxnd6nsyk4a8r-libofa_0.9.3-5.debian.tar.gz
(Stripping trailing CRs from patch; use --binary to disable.)
patching file lib/signal_op.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file examples/example.cpp
(Stripping trailing CRs from patch; use --binary to disable.)

With `patch-2.8` it will become an error.

+14 -2
+14 -2
pkgs/by-name/li/libofa/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchurl, 5 + fetchzip, 5 6 expat, 6 7 curl, 7 8 fftw, ··· 17 18 sha256 = "184ham039l7lwhfgg0xr2vch2xnw1lwh7sid432mh879adhlc5h2"; 18 19 }; 19 20 20 - patches = fetchurl { 21 + debian_patches = fetchzip { 21 22 url = "mirror://debian/pool/main/libo/libofa/libofa_${version}-${deb_patch}.debian.tar.gz"; 22 - sha256 = "1rfkyz13cm8izm90c1xflp4rvsa24aqs6qpbbbqqcbmvzsj6j9yn"; 23 + hash = "sha256-tENhXSRcUP1PKm35IJyLUEEROze8UzxJzRx3VNAqo40="; 23 24 }; 25 + 26 + patches = [ 27 + "${debian_patches}/patches/01_gcc41.diff" 28 + "${debian_patches}/patches/02_example-open.diff" 29 + "${debian_patches}/patches/03_example-size_type.diff" 30 + "${debian_patches}/patches/04_libofa.pc-deps.diff" 31 + "${debian_patches}/patches/05_gcc43.diff" 32 + "${debian_patches}/patches/06_gcc44.diff" 33 + "${debian_patches}/patches/fix_ftbfs.diff" 34 + "${debian_patches}/patches/fix-ftbfs-gcc4.7.diff" 35 + ]; 24 36 25 37 outputs = [ 26 38 "out"