git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #7537 from codyopel/x265

x265: 1.5 -> 1.6

commite610f41583c63b96fa8323f0c52cd4f117b3f6bf authorEdward Tjörnhammar <ed@cflags.cc> dateFri 24 Apr 2015, 17:06 (12 years ago) parent29c3f6582472ee
4 files changed+55−71
pkgs/development/libraries/x265/default.nix+55−6 pkgs/development/libraries/x265/generic.nix−56 pkgs/development/libraries/x265/hg.nix−7 pkgs/top-level/all-packages.nix−2
pkgs/development/libraries/x265/default.nix+55−6
@@ -1,7 +1,56 @@
1−{ callPackage, ... } @ args:
1+{ stdenv, fetchurl, cmake, yasm
2+, debugSupport ? false # Run-time sanity checks (debugging)
3+, highbitdepthSupport ? false # false=8bits per channel, true=10/12bits per channel
4+, werrorSupport ? false # Warnings as errors
5+, ppaSupport ? false # PPA profiling instrumentation
6+, vtuneSupport ? false # Vtune profiling instrumentation
7+, custatsSupport ? false # Internal profiling of encoder work
8+, cliSupport ? true # Build standalone CLI application
9+, unittestsSupport ? false # Unit tests
10+}:
211
3−callPackage ./generic.nix (args // {
4− version = "1.5";
5− rev = "9f0324125f53a12f766f6ed6f98f16e2f42337f4";
6− sha256 = "1nyim0l975faj7926s4wba8yvjy4rvx005zb7krv0gb5p84nzgi7";
7−})
12+let
13+ mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
14+ inherit (stdenv) is64bit;
15+in
16+
17+stdenv.mkDerivation rec {
18+ name = "x265-${version}";
19+ version = "1.6";
20+
21+ src = fetchurl {
22+ url = "https://github.com/videolan/x265/archive/${version}.tar.gz";
23+ sha256 = "17c1phwmgcvvh9bakh1249rj2js77nr7y9igg34i3f8hsrdc4x0w";
24+ };
25+
26+ patchPhase = ''
27+ sed -i 's/unknown/${version}/g' source/cmake/version.cmake
28+ '';
29+
30+ cmakeFlags = [
31+ (mkFlag debugSupport "CHECKED_BUILD")
32+ "-DSTATIC_LINK_CRT=OFF"
33+ (mkFlag (highbitdepthSupport && is64bit) "HIGH_BIT_DEPTH")
34+ (mkFlag werrorSupport "WARNINGS_AS_ERRORS")
35+ (mkFlag ppaSupport "ENABLE_PPA")
36+ (mkFlag vtuneSupport "ENABLE_VTUNE")
37+ (mkFlag custatsSupport "DETAILED_CU_STATS")
38+ "-DENABLE_SHARED=ON"
39+ (mkFlag cliSupport "ENABLE_CLI")
40+ (mkFlag unittestsSupport "ENABLE_TESTS")
41+ ];
42+
43+ preConfigure = ''
44+ cd source
45+ '';
46+
47+ nativeBuildInputs = [ cmake yasm ];
48+
49+ meta = with stdenv.lib; {
50+ description = "Library for encoding h.265/HEVC video streams";
51+ homepage = http://x265.org;
52+ license = licenses.gpl2;
53+ maintainers = with maintainers; [ codyopel ];
54+ platforms = platforms.all;
55+ };
56+}
pkgs/development/libraries/x265/generic.nixdeleted−56
@@ -1,56 +0,0 @@
1−{ stdenv, fetchhg, cmake, yasm
2−, rev , sha256, version
3−, debugSupport ? false # Run-time sanity checks (debugging)
4−, highbitdepthSupport ? false # false=8bits per channel, true=10/12bits per channel
5−, werrorSupport ? false # Warnings as errors
6−, ppaSupport ? false # PPA profiling instrumentation
7−, vtuneSupport ? false # Vtune profiling instrumentation
8−, custatsSupport ? false # Internal profiling of encoder work
9−, cliSupport ? true # Build standalone CLI application
10−, unittestsSupport ? false # Unit tests
11−, ...
12−}:
13−
14−let
15− mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
16−in
17−
18−with stdenv.lib;
19−stdenv.mkDerivation rec {
20− name = "x265-${version}";
21−
22− src = fetchhg {
23− url = "https://bitbucket.org/multicoreware/x265/src";
24− inherit rev;
25− inherit sha256;
26− };
27−
28− patchPhase = ''
29− sed -i 's/unknown/${version}/g' source/cmake/version.cmake
30− '';
31−
32− cmakeFlags = with stdenv.lib; [
33− (mkFlag debugSupport "CHECKED_BUILD")
34− "-DSTATIC_LINK_CRT=OFF"
35− (mkFlag (highbitdepthSupport && stdenv.isx86_64) "HIGH_BIT_DEPTH")
36− (mkFlag werrorSupport "WARNINGS_AS_ERRORS")
37− (mkFlag ppaSupport "ENABLE_PPA")
38− "-DENABLE_SHARED=ON"
39− (mkFlag cliSupport "ENABLE_CLI")
40− (mkFlag unittestsSupport "ENABLE_TESTS")
41− ];
42−
43− preConfigure = ''
44− cd source
45− '';
46−
47− nativeBuildInputs = [ cmake yasm ];
48−
49− meta = {
50− description = "Library for encoding h.265/HEVC video streams";
51− homepage = http://x265.org;
52− license = licenses.gpl2;
53− maintainers = with maintainers; [ codyopel ];
54− platforms = platforms.all;
55− };
56−}
pkgs/development/libraries/x265/hg.nixdeleted−7
@@ -1,7 +0,0 @@
1−{ callPackage, ... } @ args:
2−
3−callPackage ./generic.nix (args // rec {
4− version = "2015-2-11"; # Date of commit used Y-M-D
5− rev = "9ab104096834f51bd799ea1cf1160092f8182944";
6− sha256 = "1j4k6ylglrzng5rz29qx2z06amdrq8wyzvqhm4ivfzvpndfniim6";
7−})
pkgs/top-level/all-packages.nix−2
@@ -7838,8 +7838,6 @@ let
78387838
78397839 x265 = callPackage ../development/libraries/x265 { };
78407840
7841− x265-hg = callPackage ../development/libraries/x265/hg.nix { };
7842−
78437841 xapian = callPackage ../development/libraries/xapian { };
78447842
78457843 xapianBindings = callPackage ../development/libraries/xapian/bindings { # TODO perl php Java, tcl, C#, python