3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libminc/default.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }:
2015-11-11 22:51:50 +00:00
stdenv.mkDerivation rec {
pname = "libminc";
version = "2.4.03";
2015-11-11 22:51:50 +00:00
owner = "BIC-MNI";
src = fetchFromGitHub {
inherit owner;
repo = pname;
rev = "release-${version}";
sha256 = "0kpmqs9df836ywsqj749qbsfavf5bnldblxrmnmxqq9pywc8yfrm";
2015-11-11 22:51:50 +00:00
};
2018-08-08 19:48:44 +01:00
postPatch = ''
patchShebangs .
'';
2015-11-11 22:51:50 +00:00
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib netcdf nifticlib hdf5 ];
2015-11-11 22:51:50 +00:00
2018-08-08 19:48:44 +01:00
cmakeFlags = [
"-DLIBMINC_MINC1_SUPPORT=ON"
"-DLIBMINC_BUILD_SHARED_LIBS=ON"
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
];
doCheck = !stdenv.isDarwin;
checkPhase = ''
export LD_LIBRARY_PATH="$(pwd)" # see #22060
2018-04-10 01:29:03 +01:00
ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure
# ezminc_rw_test can't find libminc_io.so.5.2.0; minc_conversion hits netcdf compilation issue
'';
2015-11-11 22:51:50 +00:00
enableParallelBuilding = true;
2015-11-11 22:51:50 +00:00
meta = with stdenv.lib; {
homepage = "https://github.com/${owner}/${pname}";
2015-11-11 22:51:50 +00:00
description = "Medical imaging library based on HDF5";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.free;
2015-11-11 22:51:50 +00:00
};
}