base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / libtheora / package.nix
blobdf49f3988c01eea8f390239006dadb414f6c768f
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch,
6   autoreconfHook,
7   libogg,
8   libvorbis,
9   pkg-config,
10   testers,
11   validatePkgConfig,
14 stdenv.mkDerivation (finalAttrs: {
15   pname = "libtheora";
16   version = "1.1.1";
18   src = fetchurl {
19     url = "https://downloads.xiph.org/releases/theora/libtheora-${finalAttrs.version}.tar.gz";
20     hash = "sha256-QJUpVsR4EZKNHnkizaO8H0J+t1aAw8NySckelJBUkWs=";
21   };
23   patches = [
24     # fix error in autoconf scripts
25     (fetchpatch {
26       url = "https://github.com/xiph/theora/commit/28cc6dbd9b2a141df94f60993256a5fca368fa54.diff";
27       hash = "sha256-M/UULkiklvEay7LyOuCamxWCSvt37QSMzHOsAAnOWJo=";
28     })
29   ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ ./mingw-remove-export.patch ];
31   configureFlags = [ "--disable-examples" ];
33   outputs = [
34     "out"
35     "dev"
36     "devdoc"
37   ];
38   outputDoc = "devdoc";
40   nativeBuildInputs = [
41     autoreconfHook
42     pkg-config
43     validatePkgConfig
44   ];
46   propagatedBuildInputs = [
47     libogg
48     libvorbis
49   ];
51   passthru = {
52     tests.pkg-config = testers.hasPkgConfigModules {
53       package = finalAttrs.finalPackage;
54       moduleNames = [
55         "theora"
56         "theoradec"
57         "theoraenc"
58       ];
59     };
60   };
62   meta = {
63     description = "Library for Theora, a free and open video compression format";
64     homepage = "https://www.theora.org/";
65     license = lib.licenses.bsd3;
66     maintainers = with lib.maintainers; [ getchoo ];
67     platforms = lib.platforms.unix ++ lib.platforms.windows;
68   };