about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/x265
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/libraries/x265
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
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;
   };
 }