1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/libraries/vigra/default.nix

46 lines
1.8 KiB
Nix
Raw Normal View History

{ 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 = "vigra-${version}";
2017-08-04 23:09:05 +01:00
version = "1.11.1";
src = fetchurl {
2015-06-25 21:56:09 +01:00
url = "https://github.com/ukoethe/vigra/archive/Version-${stdenv.lib.replaceChars ["."] ["-"] version}.tar.gz";
2017-08-04 23:09:05 +01:00
sha256 = "03i5wfscv83jb8vnwwhfmm8yfiniwkvk13myzhr1kbwbs9884wdj";
};
2016-09-01 17:11:21 +01:00
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
2015-06-25 21:56:09 +01:00
2018-04-17 20:39:10 +01:00
# Fixes compilation with clang (on darwin) see https://github.com/ukoethe/vigra/issues/414
patches =
let clangPatch = fetchurl { url = "https://github.com/ukoethe/vigra/commit/81958d302494e137f98a8b1d7869841532f90388.patch";
sha256 = "1i1w6smijgb5z8bg9jaq84ccy00k2sxm87s37lgjpyix901gjlgi"; };
in [ clangPatch ];
2015-06-25 21:56:09 +01:00
buildInputs = [ boost cmake fftw fftwSinglePrec hdf5 ilmbase libjpeg libpng
libtiff numpy openexr python ];
preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\"";
2015-06-25 21:56:09 +01:00
cmakeFlags = [ "-DWITH_OPENEXR=1" ]
++ stdenv.lib.optionals (stdenv.hostPlatform.system == "x86_64-linux")
2015-06-25 21:56:09 +01:00
[ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
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; {
description = "Novel computer vision C++ library with customizable algorithms and data structures";
homepage = https://hci.iwr.uni-heidelberg.de/vigra;
2015-06-25 21:56:09 +01:00
license = licenses.mit;
maintainers = [ maintainers.viric ];
2018-04-17 20:39:10 +01:00
platforms = platforms.unix;
};
}