summary refs log tree commit diff
path: root/pkgs/development/libraries/mp4v2/default.nix
blob: a5542ebb659ab7693af7d7c7b0517f72baca96a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ stdenv, lib, fetchurl }:

stdenv.mkDerivation rec {
  name = "mp4v2-2.0.0";

  src = fetchurl {
    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp4v2/${name}.tar.bz2";
    sha256 = "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683";
  };

  patches = [
    # From Handbrake
    # mp4v2 doesn't seem to be actively maintained any more :-/
    ./A02-meaningful-4gb-warning.patch

    (fetchurl {
      name = "gcc-7.patch";
      url = "https://src.fedoraproject.org/cgit/rpms/libmp4v2.git/plain/"
          + "0004-Fix-GCC7-build.patch?id=d7aeedabb";
      sha256 = "0sbn0il7lmk77yrjyb4f0a3z3h8gsmdkscvz5n9hmrrrhrwf672w";
    })
  ];

  # `faac' expects `mp4.h'.
  postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h";

  hardeningDisable = [ "format" ];

  enableParallelBuilding = true;

  meta = {
    homepage = https://code.google.com/archive/p/mp4v2/;
    maintainers = [ ];
    platforms = lib.platforms.unix;
    license = lib.licenses.mpl11;
  };
}