1{lib, stdenv, fetchurl, libogg, libvorbis, pkg-config, autoreconfHook, fetchpatch }:
2
3stdenv.mkDerivation rec {
4 pname = "libtheora";
5 version = "1.1.1";
6
7 src = fetchurl {
8 url = "https://downloads.xiph.org/releases/theora/${pname}-${version}.tar.gz";
9 sha256 = "0swiaj8987n995rc7hw0asvpwhhzpjiws8kr3s6r44bqqib2k5a0";
10 };
11
12 patches = [
13 # fix error in autoconf scripts
14 (fetchpatch {
15 url = "https://github.com/xiph/theora/commit/28cc6dbd9b2a141df94f60993256a5fca368fa54.diff";
16 sha256 = "16jqrq4h1b3krj609vbpzd5845cvkbh3mwmjrcdg35m490p19x9k";
17 })
18 ];
19
20 outputs = [ "out" "dev" "devdoc" ];
21 outputDoc = "devdoc";
22
23 nativeBuildInputs = [ pkg-config autoreconfHook ];
24 propagatedBuildInputs = [ libogg libvorbis ];
25
26 meta = with lib; {
27 homepage = "https://www.theora.org/";
28 description = "Library for Theora, a free and open video compression format";
29 license = licenses.bsd3;
30 maintainers = with maintainers; [ spwhitt ];
31 platforms = platforms.unix;
32 };
33}