From f2dea7d2875d88ee1cc8e3ea1ce9e58e914b9816 Mon Sep 17 00:00:00 2001 From: "Jason \\\"Don\\\" O'Conal" Date: Thu, 4 Jul 2013 15:06:22 +1000 Subject: [PATCH] xvidcore: fix build on darwin * remove unnecessary gcc flag * add --enable-macosx_module configure flag * add --disable-assembly configure flag * fix postInstall phase --- .../libraries/xvidcore/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/xvidcore/default.nix b/pkgs/development/libraries/xvidcore/default.nix index 4ddbc5484ba3..df7404e1faf6 100644 --- a/pkgs/development/libraries/xvidcore/default.nix +++ b/pkgs/development/libraries/xvidcore/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, nasm}: +{ stdenv, fetchurl, nasm, autoconf, automake, libtool }: stdenv.mkDerivation rec { name = "xvidcore-1.3.2"; @@ -8,9 +8,14 @@ stdenv.mkDerivation rec { sha256 = "1x0b2rq6fv99ramifhkakycd0prjc93lbzrffbjgjwg7w4s17hfn"; }; - preConfigure = "cd build/generic"; + preConfigure = '' + cd build/generic + '' + stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace configure --replace "-no-cpp-precomp" "" + ''; - buildInputs = [ nasm ]; + configureFlags = stdenv.lib.optionals stdenv.isDarwin + [ "--enable-macosx_module" "--disable-assembly" ]; buildInputs = [ nasm ] ++ stdenv.lib.optionals stdenv.isDarwin [ autoconf automake libtool ]; @@ -27,10 +32,12 @@ stdenv.mkDerivation rec { fi ''; - meta = { + meta = with stdenv.lib; { description = "MPEG-4 video codec for PC"; - homepage = http://www.xvid.org/; - license = "GPLv2+"; + homepage = http://www.xvid.org/; + license = licenses.gplv2Plus; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.all; }; }