diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/x264/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/x264/default.nix | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/libraries/x264/default.nix b/nixpkgs/pkgs/development/libraries/x264/default.nix index 9998add0d930..5c4c64d0e1cf 100644 --- a/nixpkgs/pkgs/development/libraries/x264/default.nix +++ b/nixpkgs/pkgs/development/libraries/x264/default.nix @@ -1,14 +1,18 @@ -{ stdenv, fetchurl, nasm }: +{ stdenv, lib, fetchurl, nasm }: stdenv.mkDerivation rec { pname = "x264"; - version = "20190517-2245"; + version = "20191217-2245"; src = fetchurl { url = "https://download.videolan.org/x264/snapshots/x264-snapshot-${version}-stable.tar.bz2"; - sha256 = "1xv41z04km3rf374xk3ny7v8ibr211ph0j5am0909ln63mphc48f"; + sha256 = "0q214q4rhbhigyx3dfhp6d5v5gzln01cxccl153ps5ih567mqjdj"; }; + # Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix + # is put in the cc wrapper anyway. + patches = [ ./disable-arm-neon-default.patch ]; + postPatch = '' patchShebangs . ''; @@ -17,15 +21,18 @@ stdenv.mkDerivation rec { outputs = [ "out" "lib" "dev" ]; - preConfigure = '' + preConfigure = lib.optionalString (stdenv.buildPlatform.isx86_64 || stdenv.hostPlatform.isi686) '' # `AS' is set to the binutils assembler, but we need nasm unset AS + '' + lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) '' + export AS=$CC ''; configureFlags = [ "--enable-shared" ] - ++ stdenv.lib.optional (!stdenv.isi686) "--enable-pic"; + ++ stdenv.lib.optional (!stdenv.isi686) "--enable-pic" + ++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}"; - nativeBuildInputs = [ nasm ]; + nativeBuildInputs = lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686) nasm; meta = with stdenv.lib; { description = "Library for encoding H264/AVC video streams"; |