summary refs log tree commit diff
diff options
context:
space:
mode:
authorcodyopel <codyopel@gmail.com>2015-04-24 06:51:45 -0400
committercodyopel <codyopel@gmail.com>2015-04-24 06:51:45 -0400
commit82472ee62825e2f4c58757817a24b7fdd47ca960 (patch)
treed49d412b82bc601f2dc0cf2db194cb97001dc813
parent5fade2b6aaee6dbac483e4e642110fa9af19f631 (diff)
downloadnixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.tar
nixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.tar.gz
nixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.tar.bz2
nixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.tar.lz
nixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.tar.xz
nixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.tar.zst
nixpkgs-82472ee62825e2f4c58757817a24b7fdd47ca960.zip
x265: 1.5 -> 1.6
+ Removed unused x265-hg package
+ Fix missing optionals
+ Fix high bit-depth to allow for all 64bit platforms
-rw-r--r--pkgs/development/libraries/x265/default.nix61
-rw-r--r--pkgs/development/libraries/x265/generic.nix56
-rw-r--r--pkgs/development/libraries/x265/hg.nix7
-rw-r--r--pkgs/top-level/all-packages.nix2
4 files changed, 55 insertions, 71 deletions
diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix
index 30fbdcd1e8d..a2af56cbca6 100644
--- a/pkgs/development/libraries/x265/default.nix
+++ b/pkgs/development/libraries/x265/default.nix
@@ -1,7 +1,56 @@
-{ callPackage, ... } @ args:
+{ 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
+}:
 
-callPackage ./generic.nix (args // {
-  version = "1.5";
-  rev = "9f0324125f53a12f766f6ed6f98f16e2f42337f4";
-  sha256 = "1nyim0l975faj7926s4wba8yvjy4rvx005zb7krv0gb5p84nzgi7";
-})
\ No newline at end of file
+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 = "1.6";
+
+  src = fetchurl {
+    url = "https://github.com/videolan/x265/archive/${version}.tar.gz";
+    sha256 = "17c1phwmgcvvh9bakh1249rj2js77nr7y9igg34i3f8hsrdc4x0w";
+  };
+
+  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
+  '';
+
+  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;
+  };
+}
diff --git a/pkgs/development/libraries/x265/generic.nix b/pkgs/development/libraries/x265/generic.nix
deleted file mode 100644
index 2779b581143..00000000000
--- a/pkgs/development/libraries/x265/generic.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-{ stdenv, fetchhg, cmake, yasm
-, rev , sha256, version
-, 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";
-in
-
-with stdenv.lib;
-stdenv.mkDerivation rec {
-  name = "x265-${version}";
-
-  src = fetchhg {
-    url = "https://bitbucket.org/multicoreware/x265/src";
-    inherit rev;
-    inherit sha256;
-  };
-
-  patchPhase = ''
-    sed -i 's/unknown/${version}/g' source/cmake/version.cmake
-  '';
-
-  cmakeFlags = with stdenv.lib; [
-    (mkFlag debugSupport "CHECKED_BUILD")
-    "-DSTATIC_LINK_CRT=OFF"
-    (mkFlag (highbitdepthSupport && stdenv.isx86_64) "HIGH_BIT_DEPTH")
-    (mkFlag werrorSupport "WARNINGS_AS_ERRORS")
-    (mkFlag ppaSupport "ENABLE_PPA")
-    "-DENABLE_SHARED=ON"
-    (mkFlag cliSupport "ENABLE_CLI")
-    (mkFlag unittestsSupport "ENABLE_TESTS")
-  ];
-
-  preConfigure = ''
-    cd source
-  '';
-
-  nativeBuildInputs = [ cmake yasm ];
-
-  meta = {
-    description = "Library for encoding h.265/HEVC video streams";
-    homepage    = http://x265.org;
-    license     = licenses.gpl2;
-    maintainers = with maintainers; [ codyopel ];
-    platforms   = platforms.all;
-  };
-}
\ No newline at end of file
diff --git a/pkgs/development/libraries/x265/hg.nix b/pkgs/development/libraries/x265/hg.nix
deleted file mode 100644
index d26df82b3e3..00000000000
--- a/pkgs/development/libraries/x265/hg.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ callPackage, ... } @ args:
-
-callPackage ./generic.nix (args // rec {
-  version = "2015-2-11"; # Date of commit used Y-M-D
-  rev = "9ab104096834f51bd799ea1cf1160092f8182944";
-  sha256 = "1j4k6ylglrzng5rz29qx2z06amdrq8wyzvqhm4ivfzvpndfniim6";
-})
\ No newline at end of file
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b73c975bd12..4408e74a3b3 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7838,8 +7838,6 @@ let
 
   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