about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/x265
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/x265')
-rw-r--r--nixpkgs/pkgs/development/libraries/x265/default.nix20
1 files changed, 13 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/x265/default.nix b/nixpkgs/pkgs/development/libraries/x265/default.nix
index 7e62812df890..0ce635a80fb7 100644
--- a/nixpkgs/pkgs/development/libraries/x265/default.nix
+++ b/nixpkgs/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)
@@ -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 ];
@@ -137,10 +143,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;
   };
 }