From 8b06cac5f8e8217ea41333fc64cb4a8d46d826fd Mon Sep 17 00:00:00 2001 From: Sean Link Date: Thu, 8 Feb 2024 14:20:49 -0700 Subject: [PATCH 1/2] x265: run nixpkgs-fmt --- pkgs/development/libraries/x265/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix index 7e62812df890..7bc923f679dd 100644 --- a/pkgs/development/libraries/x265/default.nix +++ b/pkgs/development/libraries/x265/default.nix @@ -5,14 +5,14 @@ , cmake , nasm -# NUMA support enabled by default on NUMA platforms: + # NUMA support enabled by default on NUMA platforms: , numaSupport ? (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64)) , numactl -# Multi bit-depth support (8bit+10bit+12bit): + # Multi bit-depth support (8bit+10bit+12bit): , multibitdepthSupport ? (stdenv.is64bit && !(stdenv.isAarch64 && stdenv.isLinux)) -# Other options: + # Other options: , cliSupport ? true # Build standalone CLI application , custatsSupport ? false # Internal profiling of encoder work , debugSupport ? false # Run-time sanity checks (debugging) @@ -137,10 +137,10 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Library for encoding H.265/HEVC video streams"; - homepage = "https://www.x265.org/"; - changelog = "https://x265.readthedocs.io/en/master/releasenotes.html#version-${lib.strings.replaceStrings ["."] ["-"] version}"; - license = licenses.gpl2Plus; + homepage = "https://www.x265.org/"; + changelog = "https://x265.readthedocs.io/en/master/releasenotes.html#version-${lib.strings.replaceStrings ["."] ["-"] version}"; + license = licenses.gpl2Plus; maintainers = with maintainers; [ codyopel ]; - platforms = platforms.all; + platforms = platforms.all; }; } From 2a98f1c84eeb6f22c956ccfa160284d91a1cb099 Mon Sep 17 00:00:00 2001 From: Sean Link Date: Thu, 8 Feb 2024 14:30:26 -0700 Subject: [PATCH 2/2] x265: add mingw support Part of a larger effort to add mingw support for qtmultimedia --- pkgs/development/libraries/x265/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix index 7bc923f679dd..0ce635a80fb7 100644 --- a/pkgs/development/libraries/x265/default.nix +++ b/pkgs/development/libraries/x265/default.nix @@ -72,6 +72,12 @@ stdenv.mkDerivation rec { substituteInPlace cmake/Version.cmake \ --replace "unknown" "${version}" \ --replace "0.0" "${version}" + '' + # There is broken and complicated logic when setting X265_LATEST_TAG for + # mingwW64 builds. This bypasses the logic by setting it at the end of the + # file + + lib.optionalString stdenv.hostPlatform.isMinGW '' + echo 'set(X265_LATEST_TAG "${version}")' >> ./cmake/Version.cmake ''; nativeBuildInputs = [ cmake nasm ] ++ lib.optionals (numaSupport) [ numactl ];