1 { stdenv, lib, fetchFromGitHub, fetchurl }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 # 2020-06-20: THE current upstream, maintained and used in distros fork.
11 rev = "Release-ThirdParty-MP4v2-${version}";
12 sha256 = "053a0lgy819sbz92cfkq0vmkn2ky39bva554pj4ypky1j6vs04fv";
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";
22 ] ++ lib.optionals stdenv.cc.isClang [
23 # unbreak build with Clangâ„6 (C++14 by default). Based on https://reviews.freebsd.org/rP458678
24 ./fix-build-clang.patch
27 NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];
29 # `faac' expects `mp4.h'.
30 postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h";
32 enableParallelBuilding = true;
35 description = "Provides functions to read, create, and modify mp4 files";
37 MP4v2 library provides an API to work with mp4 files
38 as defined by ISO-IEC:14496-1:2001 MPEG-4 Systems.
39 This container format is derived from Apple's QuickTime format.
41 homepage = "https://github.com/TechSmith/mp4v2";
42 maintainers = [ lib.maintainers.Anton-Latukha ];
43 platforms = lib.platforms.unix;
44 license = lib.licenses.mpl11;