diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix new file mode 100644 index 00000000000..b9be7a55c79 --- /dev/null +++ b/pkgs/development/libraries/x265/default.nix @@ -0,0 +1,52 @@ +{ stdenv, cmake, fetchurl, yasm +, highBitDepth ? false +, debuggingSupport ? false +, enableCli ? true +, testSupport ? false +}: + +stdenv.mkDerivation rec { + version = "1.3"; + name = "x265-${version}"; + + src = fetchurl { + url = "mirror://gentoo/distfiles/${name}.tar.bz2"; + sha256 = "3807090a99bc351894d58eb037db4f1487b2dba3489eb2c38ab43dd6b7c9b09d"; + }; + + cmakeFlags = with stdenv.lib; + '' + ${if debuggingSupport + then "-DCHECKED_BUILD=ON" + else "-DCHECKED_BUILD=OFF" + } + -DSTATIC_LINK_CRT=OFF + ${if (stdenv.system == "x86_64-linux" && highBitDepth) + then "-DHIGH_BIT_DEPTH=ON" + else "-DHIGH_BIT_DEPTH=OFF" + } + -DWARNINGS_AS_ERRORS=OFF + -DENABLE_PPA=OFF + -DENABLE_SHARED=ON + ${if enableCli + then "-DENABLE_CLI=ON" + else "-DENABLE_CLI=OFF" + } + ${if testSupport + then "-DENABLE_TESTS=ON" + else "-DENABLE_TESTS=OFF" + } + ''; + + preConfigure = "cd source"; + + buildInputs = [ cmake yasm ]; + + meta = with stdenv.lib; { + homepage = "http://x265.org"; + description = "Library for encoding h.265/HEVC video streams"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ codyopel ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/libraries/x265/hg.nix b/pkgs/development/libraries/x265/hg.nix new file mode 100644 index 00000000000..d615acebc01 --- /dev/null +++ b/pkgs/development/libraries/x265/hg.nix @@ -0,0 +1,52 @@ +{ stdenv, cmake, fetchhg, yasm +, highBitDepth ? false +, debuggingSupport ? false +, enableCli ? true +, testSupport ? false +}: + +stdenv.mkDerivation rec { + name = "x265-hg"; + + src = fetchhg { + url = "https://bitbucket.org/multicoreware/x265/src"; + rev = "eebb372eec893efc50e66806fcc19b1c1bd89683"; + sha256 = "03dpbjqcmbmyid45560byabybfzy2bvic0gqa6k6hxci6rvmynpi"; + }; + + cmakeFlags = with stdenv.lib; + '' + ${if debuggingSupport + then "-DCHECKED_BUILD=ON" + else "-DCHECKED_BUILD=OFF" + } + -DSTATIC_LINK_CRT=OFF + ${if (stdenv.system == "x86_64-linux" && highBitDepth) + then "-DHIGH_BIT_DEPTH=ON" + else "-DHIGH_BIT_DEPTH=OFF" + } + -DWARNINGS_AS_ERRORS=OFF + -DENABLE_PPA=OFF + -DENABLE_SHARED=ON + ${if enableCli + then "-DENABLE_CLI=ON" + else "-DENABLE_CLI=OFF" + } + ${if testSupport + then "-DENABLE_TESTS=ON" + else "-DENABLE_TESTS=OFF" + } + ''; + + preConfigure = "cd source"; + + buildInputs = [ cmake yasm ]; + + meta = with stdenv.lib; { + homepage = "http://x265.org"; + description = "Library for encoding h.265/HEVC video streams"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ codyopel ]; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8a99ce8954..bd019a5876c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6946,6 +6946,10 @@ let x264 = callPackage ../development/libraries/x264 { }; + x265 = callPackage ../development/libraries/x265 { }; + + x265-hg = callPackage ../development/libraries/x265/hg.nix { }; + xapian = callPackage ../development/libraries/xapian { }; xapianBindings = callPackage ../development/libraries/xapian/bindings { # TODO perl php Java, tcl, C#, python