mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
Merge pull request #287318 from seanybaggins/add-mingw-support-x265
Add mingw support x265
This commit is contained in:
commit
82b583ba2b
1 changed files with 13 additions and 7 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue