From f3f8da4a5fe1a3e955dd38b68115de4cc6e6ff5e Mon Sep 17 00:00:00 2001 From: Ryan Artecona Date: Fri, 18 Mar 2016 02:49:38 -0400 Subject: [PATCH 1/3] libav: support Darwin & install docs/manpages --- pkgs/development/libraries/libav/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 23b1402e3e7..9611fdbb8d9 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib +{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib, perl , mp3Support ? true, lame ? null , speexSupport ? true, speex ? null , theoraSupport ? true, libtheora ? null @@ -46,6 +46,7 @@ let "--enable-avplay" "--enable-shared" "--enable-runtime-cpudetect" + "--cc=cc" ] ++ optionals enableGPL [ "--enable-gpl" "--enable-swscale" ] ++ optional mp3Support "--enable-libmp3lame" @@ -62,6 +63,7 @@ let ; buildInputs = [ pkgconfig lame yasm zlib bzip2 SDL ] + ++ [ perl ] # for install-man target ++ optional mp3Support lame ++ optional speexSupport speex ++ optional theoraSupport libtheora @@ -79,10 +81,19 @@ let outputs = [ "out" "tools" ]; - # move avplay to get rid of the SDL dependency in the main output + # alltools to build smaller tools, incl. aviocat, ismindex, qt-faststart, etc. + buildFlags = "all alltools install-man"; + postInstall = '' + # move avplay to get rid of the SDL dependency in the main output mkdir -p "$tools/bin" mv "$out/bin/avplay" "$tools/bin" + + # alltools target compiles an executable in tools/ for every C + # source file in tools/, so move those to $out + for tool in $(find tools -type f -executable); do + mv "$tool" "$out/bin/" + done ''; doInstallCheck = false; # fails randomly @@ -105,10 +116,9 @@ let 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.linux; + platforms = with platforms; linux ++ darwin; maintainers = [ maintainers.vcunat ]; }; }; # libavFun in result - From 02b13f7bdbcbeb301a66b7b59bc7dc2759985a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 21 Mar 2016 09:56:25 +0100 Subject: [PATCH 2/3] libav: fixup sandboxed builds after parent commit --- pkgs/development/libraries/libav/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 9611fdbb8d9..0bd4168d73b 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -38,6 +38,9 @@ let url = "${meta.homepage}/releases/${name}.tar.xz"; inherit sha1; # upstream directly provides sha1 of releases over https }; + + preConfigure = "patchShebangs doc/texi2pod.pl"; + configureFlags = assert stdenv.lib.all (x: x!=null) buildInputs; [ From 07a3d420238fa0c127e43e1b25d354d6e7000d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 21 Mar 2016 09:56:46 +0100 Subject: [PATCH 3/3] libav: minor updates 11.4 -> 11.6 The older branches seem unmaintained and better not used - /cc maintainer of keyfinder @nckx. --- pkgs/development/libraries/libav/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 0bd4168d73b..5b6e9c024b5 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -28,7 +28,7 @@ let result = { libav_0_8 = libavFun "0.8.17" "31ace2daeb8c105deed9cd3476df47318d417714"; libav_9 = libavFun "9.18" "e10cde4587c4d4d3bb11d30c7b47e953664cd714"; - libav_11 = libavFun "11.4" "c2ab12102de187f2675a56b828b4a5e9136ab747"; + libav_11 = libavFun "11.6" "2296cbd7afe98591eb164cebe436dcb5582efc9d"; }; libavFun = version : sha1 : stdenv.mkDerivation rec {