fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, fetchurl, flac, libogg, libvorbis, pkgconfig
2, Carbon, AudioToolbox
3}:
4
5stdenv.mkDerivation rec {
6 name = "libsndfile-1.0.28";
7
8 src = fetchurl {
9 url = "http://www.mega-nerd.com/libsndfile/files/${name}.tar.gz";
10 sha256 = "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz";
11 };
12
13 patches = [
14 # CVE-2017-12562
15 (fetchurl {
16 url = "https://github.com/erikd/libsndfile/commit/cf7a8182c2642c50f1cf90dddea9ce96a8bad2e8.patch";
17 sha256 = "1jg3wq30wdn9nv52mcyv6jyi4d80h4r1h9p96czcria7l91yh4sy";
18 })
19 # CVE-2017-6892
20 (fetchurl {
21 url = "https://github.com/erikd/libsndfile/commit/f833c53cb596e9e1792949f762e0b33661822748.patch";
22 sha256 = "05xkmz2ihc1zcj73sbmj1ikrv9qlcym2bkp1v6ak7w53ky619mwq";
23 })
24 # CVE-2017-8361, CVE-2017-8363, CVE-2017-8363
25 (fetchurl {
26 url = "https://github.com/erikd/libsndfile/commit/fd0484aba8e51d16af1e3a880f9b8b857b385eb3.patch";
27 sha256 = "0ccndnvjzx5fw18zvy03vnb29rr81h5vsh1m16msqbxk8ibndln2";
28 })
29 # CVE-2017-8362
30 (fetchurl {
31 url = "https://github.com/erikd/libsndfile/commit/ef1dbb2df1c0e741486646de40bd638a9c4cd808.patch";
32 sha256 = "1xyv30ga71cpy4wx5f76sc4dma91la2lcc6s9f3pk9rndyi7gj9x";
33 })
34 ];
35
36 buildInputs = [ pkgconfig flac libogg libvorbis ]
37 ++ stdenv.lib.optionals stdenv.isDarwin [ Carbon AudioToolbox ];
38
39 enableParallelBuilding = true;
40
41 outputs = [ "bin" "dev" "out" "man" "doc" ];
42
43 # need headers from the Carbon.framework in /System/Library/Frameworks to
44 # compile this on darwin -- not sure how to handle
45 preConfigure = stdenv.lib.optionalString stdenv.isDarwin
46 ''
47 NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers"
48 '';
49
50 # Needed on Darwin.
51 NIX_CFLAGS_LINK = "-logg -lvorbis";
52
53 meta = with stdenv.lib; {
54 description = "A C library for reading and writing files containing sampled sound";
55 homepage = http://www.mega-nerd.com/libsndfile/;
56 license = licenses.lgpl2Plus;
57 maintainers = with maintainers; [ lovek323 ];
58 platforms = platforms.unix;
59
60 longDescription = ''
61 Libsndfile is a C library for reading and writing files containing
62 sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format)
63 through one standard library interface. It is released in source
64 code format under the GNU Lesser General Public License.
65
66 The library was written to compile and run on a Linux system but
67 should compile and run on just about any Unix (including macOS).
68 There are also pre-compiled binaries available for 32 and 64 bit
69 windows.
70
71 It was designed to handle both little-endian (such as WAV) and
72 big-endian (such as AIFF) data, and to compile and run correctly on
73 little-endian (such as Intel and DEC/Compaq Alpha) processor systems
74 as well as big-endian processor systems such as Motorola 68k, Power
75 PC, MIPS and SPARC. Hopefully the design of the library will also
76 make it easy to extend for reading and writing new sound file
77 formats.
78 '';
79 };
80}