diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index f857b2a0b89e..91e8a435db80 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -1,40 +1,29 @@ { stdenv , lib , fetchFromGitLab -, fetchpatch , nasm , enableShared ? !stdenv.hostPlatform.isStatic }: stdenv.mkDerivation rec { pname = "x264"; - version = "unstable-2021-06-13"; + version = "0-unstable-2023-10-01"; src = fetchFromGitLab { domain = "code.videolan.org"; owner = "videolan"; repo = pname; - rev = "5db6aa6cab1b146e07b60cc1736a01f21da01154"; - sha256 = "0swyrkz6nvajivxvrr08py0jrfcsjvpxw78xm1k5gd9xbdrxvknh"; + rev = "31e19f92f00c7003fa115047ce50978bc98c3a0d"; + hash = "sha256-7/FaaDFmoVhg82BIhP3RbFq4iKGNnhviOPxl3/8PWCM="; }; - # Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix - # is put in the cc wrapper anyway. patches = [ + # Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix + # is put in the cc wrapper anyway. ./disable-arm-neon-default.patch - (fetchpatch { - # https://code.videolan.org/videolan/x264/-/merge_requests/114 - name = "fix-parallelism.patch"; - url = "https://code.videolan.org/videolan/x264/-/commit/e067ab0b530395f90b578f6d05ab0a225e2efdf9.patch"; - hash = "sha256-16h2IUCRjYlKI2RXYq8QyXukAdfoQxyBKsK/nI6vhRI="; - }) ]; - postPatch = '' - patchShebangs . - '' - # Darwin uses `llvm-strip`, which results in a crash at runtime in assembly-based routines when `-x` is specified. - + lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.isDarwin '' substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)' ''; @@ -53,6 +42,12 @@ stdenv.mkDerivation rec { ++ lib.optional (!stdenv.isi686) "--enable-pic" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}"; + makeFlags = [ + "BASHCOMPLETIONSDIR=$(out)/share/bash-completion/completions" + "install-bashcompletion" + "install-lib-shared" + ]; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm; meta = with lib; {