1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, stdenv
, fetchFromGitHub
, boost
, cmake
, fftw
, fftwSinglePrec
, hdf5
, ilmbase
, libjpeg
, libpng
, libtiff
, openexr
, python3
}:
let
python = python3.withPackages (py: with py; [ numpy ]);
in
stdenv.mkDerivation rec {
pname = "vigra";
version = "unstable-2022-01-11";
src = fetchFromGitHub {
owner = "ukoethe";
repo = "vigra";
rev = "093d57d15c8c237adf1704d96daa6393158ce299";
sha256 = "sha256-pFANoT00Wkh1/Dyd2x75IVTfyaoVA7S86tafUSr29Og=";
};
env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
fftw
fftwSinglePrec
hdf5
ilmbase
libjpeg
libpng
libtiff
openexr
python
];
preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/${python.sitePackages}\"";
cmakeFlags = [ "-DWITH_OPENEXR=1" ]
++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux")
[ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
meta = with lib; {
description = "Novel computer vision C++ library with customizable algorithms and data structures";
mainProgram = "vigra-config";
homepage = "https://hci.iwr.uni-heidelberg.de/vigra";
license = licenses.mit;
maintainers = [ maintainers.viric ];
platforms = platforms.unix;
};
}
|