From a12937570c8c8aeb905cd6dfd2ab35298b426695 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 5 Aug 2011 16:13:20 +0000 Subject: [PATCH] Fixing libdecodeqr build by using previous OpenCV svn path=/nixpkgs/trunk/; revision=28169 --- pkgs/development/libraries/opencv/2.1.nix | 28 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/opencv/2.1.nix diff --git a/pkgs/development/libraries/opencv/2.1.nix b/pkgs/development/libraries/opencv/2.1.nix new file mode 100644 index 000000000000..6f422463db93 --- /dev/null +++ b/pkgs/development/libraries/opencv/2.1.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, cmake, gtk, glib, libjpeg, libpng, libtiff, jasper, ffmpeg, pkgconfig, + xineLib, gstreamer }: + +stdenv.mkDerivation rec { + name = "opencv-2.1.0"; + + src = fetchurl { + url = "mirror://sourceforge/opencvlibrary/OpenCV-2.1.0.tar.bz2"; + sha256 = "26061fd52ab0ab593c093ff94b5f5c09b956d7deda96b47019ff11932111397f"; + }; + + buildInputs = [ cmake gtk glib libjpeg libpng libtiff jasper ffmpeg pkgconfig + xineLib gstreamer ]; + + enableParallelBuilding = true; + + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__STDC_CONSTANT_MACROS " + ''; + + meta = { + description = "Open Computer Vision Library with more than 500 algorithms"; + homepage = http://opencv.willowgarage.com/; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6a04dc7b2c19..c85367b25379 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4117,6 +4117,11 @@ let inherit (gst_all) gstreamer; }; + opencv_2_1 = callPackage ../development/libraries/opencv/2.1.nix { + ffmpeg = ffmpeg_0_6_90; + inherit (gst_all) gstreamer; + }; + # this ctl version is needed by openexr_viewers openexr_ctl = callPackage ../development/libraries/openexr_ctl { }; @@ -6509,7 +6514,8 @@ let }; qrdecode = builderDefsPackage (import ../tools/graphics/qrdecode) { - inherit libpng opencv; + inherit libpng; + opencv = opencv_2_1; }; qrencode = builderDefsPackage (import ../tools/graphics/qrencode) {