2015-06-25 20:56:09 +00:00
|
|
|
{ stdenv, fetchurl, boost, cmake, doxygen, fftw, fftwSinglePrec, hdf5, ilmbase
|
2016-10-18 15:07:46 +00:00
|
|
|
, libjpeg, libpng, libtiff, openexr, python2Packages }:
|
2015-06-25 20:56:09 +00:00
|
|
|
|
2016-10-18 15:07:46 +00:00
|
|
|
let
|
|
|
|
inherit (python2Packages) python numpy;
|
|
|
|
# Might want to use `python2.withPackages(ps: [ps.numpy]);` here...
|
|
|
|
in stdenv.mkDerivation rec {
|
2015-06-25 20:56:09 +00:00
|
|
|
name = "vigra-${version}";
|
2017-08-04 22:09:05 +00:00
|
|
|
version = "1.11.1";
|
2010-07-29 14:38:39 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-06-25 20:56:09 +00:00
|
|
|
url = "https://github.com/ukoethe/vigra/archive/Version-${stdenv.lib.replaceChars ["."] ["-"] version}.tar.gz";
|
2017-08-04 22:09:05 +00:00
|
|
|
sha256 = "03i5wfscv83jb8vnwwhfmm8yfiniwkvk13myzhr1kbwbs9884wdj";
|
2010-07-29 14:38:39 +00:00
|
|
|
};
|
|
|
|
|
2016-09-01 16:11:21 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
|
2015-06-25 20:56:09 +00:00
|
|
|
|
|
|
|
buildInputs = [ boost cmake fftw fftwSinglePrec hdf5 ilmbase libjpeg libpng
|
|
|
|
libtiff numpy openexr python ];
|
2010-07-29 14:38:39 +00:00
|
|
|
|
2012-02-17 18:50:29 +00:00
|
|
|
preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\"";
|
2010-07-29 14:38:39 +00:00
|
|
|
|
2015-06-25 20:56:09 +00:00
|
|
|
cmakeFlags = [ "-DWITH_OPENEXR=1" ]
|
|
|
|
++ stdenv.lib.optionals (stdenv.system == "x86_64-linux")
|
|
|
|
[ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
|
|
|
|
|
2017-11-03 00:44:23 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-06-25 20:56:09 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-07-29 14:38:39 +00:00
|
|
|
description = "Novel computer vision C++ library with customizable algorithms and data structures";
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://hci.iwr.uni-heidelberg.de/vigra;
|
2015-06-25 20:56:09 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.viric ];
|
|
|
|
platforms = platforms.linux;
|
2010-07-29 14:38:39 +00:00
|
|
|
};
|
|
|
|
}
|