2018-07-21 01:44:44 +01:00
{ stdenv , fetchurl , boost , cmake , fftw , fftwSinglePrec , hdf5 , ilmbase
2016-10-18 16:07:46 +01:00
, libjpeg , libpng , libtiff , openexr , python2Packages } :
2015-06-25 21:56:09 +01:00
2016-10-18 16:07:46 +01:00
let
inherit ( python2Packages ) python numpy ;
# Might want to use `python2.withPackages(ps: [ps.numpy]);` here...
in stdenv . mkDerivation rec {
2015-06-25 21:56:09 +01:00
name = " v i g r a - ${ version } " ;
2017-08-04 23:09:05 +01:00
version = " 1 . 1 1 . 1 " ;
2010-07-29 15:38:39 +01:00
src = fetchurl {
2015-06-25 21:56:09 +01:00
url = " h t t p s : / / g i t h u b . c o m / u k o e t h e / v i g r a / a r c h i v e / V e r s i o n - ${ stdenv . lib . replaceChars [ " . " ] [ " - " ] version } . t a r . g z " ;
2017-08-04 23:09:05 +01:00
sha256 = " 0 3 i 5 w f s c v 8 3 j b 8 v n w w h f m m 8 y f i n i w k v k 1 3 m y z h r 1 k b w b s 9 8 8 4 w d j " ;
2010-07-29 15:38:39 +01:00
} ;
2016-09-01 17:11:21 +01:00
NIX_CFLAGS_COMPILE = " - I ${ ilmbase . dev } / i n c l u d e / O p e n E X R " ;
2015-06-25 21:56:09 +01:00
buildInputs = [ boost cmake fftw fftwSinglePrec hdf5 ilmbase libjpeg libpng
libtiff numpy openexr python ] ;
2010-07-29 15:38:39 +01:00
2012-02-17 18:50:29 +00:00
preConfigure = " c m a k e F l a g s + = \" - D V I G R A N U M P Y _ I N S T A L L _ D I R = $ o u t / l i b / ${ python . libPrefix } / s i t e - p a c k a g e s \" " ;
2010-07-29 15:38:39 +01:00
2015-06-25 21:56:09 +01:00
cmakeFlags = [ " - D W I T H _ O P E N E X R = 1 " ]
++ stdenv . lib . optionals ( stdenv . system == " x 8 6 _ 6 4 - l i n u x " )
[ " - D C M A K E _ C X X _ F L A G S = - f P I C " " - D C M A K E _ C _ F L A G S = - f P I C " ] ;
2017-11-03 00:44:23 +00:00
enableParallelBuilding = true ;
2018-08-08 20:04:28 +01:00
# fails with "./test_watersheds3d: error while loading shared libraries: libvigraimpex.so.11: cannot open shared object file: No such file or directory"
doCheck = false ;
2015-06-25 21:56:09 +01:00
meta = with stdenv . lib ; {
2010-07-29 15:38:39 +01:00
description = " N o v e l c o m p u t e r v i s i o n C + + l i b r a r y w i t h c u s t o m i z a b l e a l g o r i t h m s a n d d a t a s t r u c t u r e s " ;
2018-01-05 19:42:46 +00:00
homepage = https://hci.iwr.uni-heidelberg.de/vigra ;
2015-06-25 21:56:09 +01:00
license = licenses . mit ;
maintainers = [ maintainers . viric ] ;
platforms = platforms . linux ;
2010-07-29 15:38:39 +01:00
} ;
}