diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh index 8a49fcb9b06e..f1b394a1f540 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh @@ -30,6 +30,10 @@ for i in "$@"; do dontLink=1 elif test "$i" = "-MM"; then dontLink=1 + elif test "$i" = "-x"; then + # At least for the cases c-header or c++-header we should set dontLink. + # I expect no one use -x other than making precompiled headers. + dontLink=1 elif test "${i:0:1}" != "-"; then nonFlagArgs=1 elif test "$i" = "-m32"; then diff --git a/pkgs/development/libraries/opencv/default.nix b/pkgs/development/libraries/opencv/default.nix new file mode 100644 index 000000000000..244c3886822b --- /dev/null +++ b/pkgs/development/libraries/opencv/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, cmake, gtk, glib, libjpeg, libpng, libtiff, jasper, ffmpeg, pkgconfig, + xineLib, gstreamer }: + +stdenv.mkDerivation rec { + name = "opencv-2.0.0"; + + src = fetchurl { + url = "mirror://sourceforge/opencvlibrary/OpenCV-2.0.0.tar.bz2"; + sha256 = "08h03qzawj6zwifrh8rq66y4cya1kxx9ixrbq7phlac79nbvjzf1"; + }; + + buildInputs = [ cmake gtk glib libjpeg libpng libtiff jasper ffmpeg pkgconfig + xineLib gstreamer ]; + + meta = { + description = "Open Computer Vision Library with more than 500 algorithms"; + homepage = http://opencv.willowgarage.com/; + license = "BSD"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92318faa9703..9d2ef35a4cdb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4540,6 +4540,13 @@ let inherit fetchurl stdenv libtool pcsclite libusb pkgconfig; }; + opencv = import ../development/libraries/opencv { + inherit fetchurl stdenv cmake libjpeg libpng libtiff jasper ffmpeg + pkgconfig xineLib; + inherit (gtkLibs) gtk glib; + inherit (gst_all) gstreamer; + }; + # this ctl version is needed by openexr_viewers openexr_ctl = import ../development/libraries/openexr_ctl { inherit fetchurl stdenv ilmbase ctl;