about summary refs log tree commit diff
path: root/pkgs/development/libraries/libav
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-16 13:37:05 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-16 13:39:02 +0200
commit617595427191e6a3bf3d5c418dae4a258f8686a9 (patch)
tree4b29a1251069e8b7e7e7032c039759e4be3b266e /pkgs/development/libraries/libav
parentbf1c37494eccdcb9e40e8d4a0d6154d6b6dc0e18 (diff)
downloadnixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.tar
nixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.tar.gz
nixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.tar.bz2
nixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.tar.lz
nixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.tar.xz
nixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.tar.zst
nixlib-617595427191e6a3bf3d5c418dae4a258f8686a9.zip
Revert "libav: major update and refactoring"
This reverts commit b0031380816d5b1f9767bc62a799083790e69a7e because
it breaks Nixpkgs evaluation with "error: attribute `cross.config'
missing".

http://hydra.nixos.org/build/5725600
Diffstat (limited to 'pkgs/development/libraries/libav')
-rw-r--r--pkgs/development/libraries/libav/0.8.x.nix12
-rw-r--r--pkgs/development/libraries/libav/default.nix128
2 files changed, 47 insertions, 93 deletions
diff --git a/pkgs/development/libraries/libav/0.8.x.nix b/pkgs/development/libraries/libav/0.8.x.nix
deleted file mode 100644
index 724a43a81e03..000000000000
--- a/pkgs/development/libraries/libav/0.8.x.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ stdenv, fetchurl, libav_9 }:
-
-let derivSrc = libav_9.derivSrc // rec {
-  name = "libav-0.8.8";
-
-  src = fetchurl {
-    url = "http://libav.org/releases/${name}.tar.xz";
-    sha256 = "1wnbmbs0z4f55y8r9bwb63l04zn383l1avy4c9x1ffb2xccgcp79";
-  };
-};
-in stdenv.mkDerivation derivSrc
-
diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix
index 705ef9ae5a66..3fb1650bf46f 100644
--- a/pkgs/development/libraries/libav/default.nix
+++ b/pkgs/development/libraries/libav/default.nix
@@ -1,86 +1,59 @@
-{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib
-, mp3Support    ? true,   lame      ? null
-, speexSupport  ? true,   speex     ? null
-, theoraSupport ? true,   libtheora ? null
-, vorbisSupport ? true,   libvorbis ? null
-, vpxSupport    ? true,   libvpx    ? null
-, x264Support   ? false,  x264      ? null
-, xvidSupport   ? true,   xvidcore  ? null
-, faacSupport   ? false,  faac      ? null
-, vaapiSupport  ? false,  libva     ? null # ToDo: it has huge closure
-, vdpauSupport  ? true,   libvdpau  ? null
-, freetypeSupport ? true, freetype  ? null # it's small and almost everywhere
-, SDL # only for avplay in $tools, adds nontrivial closure to it
-, enableGPL ? true # ToDo: some additional default stuff may need GPL
-, enableUnfree ? faacSupport
+{ stdenv, fetchurl, pkgconfig, yasm, xz
+, mp3Support ? true, lame ? null
+, speexSupport ? true, speex ? null
+, theoraSupport ? true, libtheora ? null
+, vorbisSupport ? true, libvorbis ? null
+, vpxSupport ? false, libvpx ? null
+, x264Support ? false, x264 ? null
+, xvidSupport ? true, xvidcore ? null
+, faacSupport ? false, faac ? null
 }:
 
-assert faacSupport -> enableUnfree;
-
-with { inherit (stdenv.lib) optional optionals; };
-
-/* ToDo:
-    - more deps, inspiration: http://packages.ubuntu.com/raring/libav-tools
-    - maybe do some more splitting into outputs
-*/
-
-let derivSrc = rec { # derivSrc is exported and re-used by expressions for older versions
-  name = "libav-9.8";
+assert speexSupport -> speex != null;
+assert theoraSupport -> libtheora != null;
+assert vorbisSupport -> libvorbis != null;
+assert vpxSupport -> libvpx != null;
+assert x264Support -> x264 != null;
+assert xvidSupport -> xvidcore != null;
 
+stdenv.mkDerivation rec {
+  name = "libav-0.7";
+  
   src = fetchurl {
     url = "http://libav.org/releases/${name}.tar.xz";
-    sha256 = "0r7hg9wg3cxjsmwzpa6f2p1a092g2iazyjjy23604ccskzbnirg3";
+    sha256 = "04pl6y53xh6xmwzz0f12mg5vh62ylp5zwwinj6dxzd8pnbjg4lsz";
   };
 
-  configureFlags =
-    assert stdenv.lib.all (x: x!=null) buildInputs;
-  [
-    #"--enable-postproc" # it's now a separate package in upstream
-    "--disable-avserver" # upstream says it's in a bad state
-    "--enable-avplay"
+  # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
+  # the resulting library is GPL'ed, so it can only be used in GPL'ed
+  # applications.
+  configureFlags = [
+    "--enable-gpl"
+    "--enable-postproc"
+    "--enable-swscale"
+    "--disable-ffserver"
+    "--disable-ffplay"
     "--enable-shared"
     "--enable-runtime-cpudetect"
   ]
-    ++ optionals enableGPL [ "--enable-gpl" "--enable-swscale" ]
-    ++ optional mp3Support "--enable-libmp3lame"
-    ++ optional speexSupport "--enable-libspeex"
-    ++ optional theoraSupport "--enable-libtheora"
-    ++ optional vorbisSupport "--enable-libvorbis"
-    ++ optional vpxSupport "--enable-libvpx"
-    ++ optional x264Support "--enable-libx264"
-    ++ optional xvidSupport "--enable-libxvid"
-    ++ optional faacSupport "--enable-libfaac --enable-nonfree"
-    ++ optional vaapiSupport "--enable-vaapi"
-    ++ optional vdpauSupport "--enable-vdpau"
-    ++ optional freetypeSupport "--enable-libfreetype"
-    ;
-
-  buildInputs = [ pkgconfig lame yasm zlib bzip2 SDL ]
-    ++ optional mp3Support lame
-    ++ optional speexSupport speex
-    ++ optional theoraSupport libtheora
-    ++ optional vorbisSupport libvorbis
-    ++ optional vpxSupport libvpx
-    ++ optional x264Support x264
-    ++ optional xvidSupport xvidcore
-    ++ optional faacSupport faac
-    ++ optional vaapiSupport libva
-    ++ optional vdpauSupport libvdpau
-    ++ optional freetypeSupport freetype
-    ;
-
-  enableParallelBuilding = true;
+    ++ stdenv.lib.optional mp3Support "--enable-libmp3lame"
+    ++ stdenv.lib.optional speexSupport "--enable-libspeex"
+    ++ stdenv.lib.optional theoraSupport "--enable-libtheora"
+    ++ stdenv.lib.optional vorbisSupport "--enable-libvorbis"
+    ++ stdenv.lib.optional vpxSupport "--enable-libvpx"
+    ++ stdenv.lib.optional x264Support "--enable-libx264"
+    ++ stdenv.lib.optional xvidSupport "--enable-libxvid"
+    ++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree";
 
-  outputs = [ "out" "tools" ];
-
-  postInstall = ''
-    mkdir -p "$tools/bin"
-    mv "$out/bin/avplay" "$tools/bin"
-    cp -s "$out"/bin/* "$tools/bin/"
-  '';
-
-  doInstallCheck = true;
-  installCheckTarget = "check"; # tests need to be run *after* installation
+  buildInputs = [ pkgconfig lame yasm ]
+    ++ stdenv.lib.optional mp3Support lame
+    ++ stdenv.lib.optional speexSupport speex
+    ++ stdenv.lib.optional theoraSupport libtheora
+    ++ stdenv.lib.optional vorbisSupport libvorbis
+    ++ stdenv.lib.optional vpxSupport libvpx
+    ++ stdenv.lib.optional x264Support x264
+    ++ stdenv.lib.optional xvidSupport xvidcore
+    ++ stdenv.lib.optional faacSupport faac;
 
   crossAttrs = {
     dontSetConfigureCross = true;
@@ -92,15 +65,8 @@ let derivSrc = rec { # derivSrc is exported and re-used by expressions for older
       ];
   };
 
-  passthru = { inherit derivSrc vdpauSupport; };
-
-  meta = with stdenv.lib; {
+  meta = {
     homepage = http://libav.org/;
     description = "A complete, cross-platform solution to record, convert and stream audio and video (fork of ffmpeg)";
-    license = with licenses; if enableUnfree then unfree #ToDo: redistributable or not?
-      else if enableGPL then gpl2Plus else lgpl21Plus;
-    platforms = platforms.all;
   };
-};
-in stdenv.mkDerivation derivSrc
-
+}