mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 03:53:41 +00:00
70840050b3
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/55ya7ybd3v04zyss7zc2dib0bk6xacxw-x265-2.7/bin/x265 -V` and found version 2.7 - ran `/nix/store/55ya7ybd3v04zyss7zc2dib0bk6xacxw-x265-2.7/bin/x265 --version` and found version 2.7 - found 2.7 with grep in /nix/store/55ya7ybd3v04zyss7zc2dib0bk6xacxw-x265-2.7 - found 2.7 in filename of file in /nix/store/55ya7ybd3v04zyss7zc2dib0bk6xacxw-x265-2.7
66 lines
1.8 KiB
Nix
66 lines
1.8 KiB
Nix
{ stdenv, fetchurl, cmake, yasm
|
|
, debugSupport ? false # Run-time sanity checks (debugging)
|
|
, highbitdepthSupport ? false # false=8bits per channel, true=10/12bits per channel
|
|
, werrorSupport ? false # Warnings as errors
|
|
, ppaSupport ? false # PPA profiling instrumentation
|
|
, vtuneSupport ? false # Vtune profiling instrumentation
|
|
, custatsSupport ? false # Internal profiling of encoder work
|
|
, cliSupport ? true # Build standalone CLI application
|
|
, unittestsSupport ? false # Unit tests
|
|
}:
|
|
|
|
let
|
|
mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
|
|
inherit (stdenv) is64bit;
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "x265-${version}";
|
|
version = "2.7";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"http://get.videolan.org/x265/x265_${version}.tar.gz"
|
|
"https://github.com/videolan/x265/archive/${version}.tar.gz"
|
|
];
|
|
sha256 = "18llni1m8kfvdwy5bp950z6gyd0nijmvi3hzd6gd8vpy5yk5zrym";
|
|
};
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
patchPhase = ''
|
|
sed -i 's/unknown/${version}/g' source/cmake/version.cmake
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
(mkFlag debugSupport "CHECKED_BUILD")
|
|
"-DSTATIC_LINK_CRT=OFF"
|
|
(mkFlag (highbitdepthSupport && is64bit) "HIGH_BIT_DEPTH")
|
|
(mkFlag werrorSupport "WARNINGS_AS_ERRORS")
|
|
(mkFlag ppaSupport "ENABLE_PPA")
|
|
(mkFlag vtuneSupport "ENABLE_VTUNE")
|
|
(mkFlag custatsSupport "DETAILED_CU_STATS")
|
|
"-DENABLE_SHARED=ON"
|
|
(mkFlag cliSupport "ENABLE_CLI")
|
|
(mkFlag unittestsSupport "ENABLE_TESTS")
|
|
];
|
|
|
|
preConfigure = ''
|
|
cd source
|
|
'';
|
|
|
|
postInstall = ''
|
|
rm $out/lib/*.a
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake yasm ];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Library for encoding h.265/HEVC video streams";
|
|
homepage = http://x265.org;
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ codyopel ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|