nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, fetchurl }:
2
3stdenv.mkDerivation rec {
4 pname = "mp4v2";
5 version = "4.1.3";
6
7 src = fetchFromGitHub {
8 # 2020-06-20: THE current upstream, maintained and used in distros fork.
9 owner = "TechSmith";
10 repo = "mp4v2";
11 rev = "Release-ThirdParty-MP4v2-${version}";
12 sha256 = "053a0lgy819sbz92cfkq0vmkn2ky39bva554pj4ypky1j6vs04fv";
13 };
14
15 patches = [
16 (fetchurl {
17 # 2020-06-19: NOTE: # Fix build with C++11
18 # Close when https://github.com/TechSmith/mp4v2/pull/36 merged/closed.
19 url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/libmp4v2-c++11.patch?id=203f5a72bc97ffe089b424c47b07dd9eaea35713";
20 sha256 = "0sbn0il7lmk77yrjyb4f0a3z3h8gsmdkscvz5n9hmrrrhrwf672w";
21 })
22 ];
23
24 # `faac' expects `mp4.h'.
25 postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h";
26
27 enableParallelBuilding = true;
28
29 meta = {
30 description = "Provides functions to read, create, and modify mp4 files";
31 longDescription = ''
32 MP4v2 library provides an API to work with mp4 files
33 as defined by ISO-IEC:14496-1:2001 MPEG-4 Systems.
34 This container format is derived from Apple's QuickTime format.
35 '';
36 homepage = "https://github.com/TechSmith/mp4v2";
37 maintainers = [ lib.maintainers.Anton-Latukha ];
38 platforms = lib.platforms.unix;
39 license = lib.licenses.mpl11;
40 };
41}