1 { lib, stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }:
3 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
12 rev = "aa08255f0856e70fb001c5f9ee1f4e5a8c12d47d"; # new release, but no git tag
13 sha256 = "XMTO6/HkyrrQ0s5DzJLCmmWheye2DGMnpDbcGdP6J+A=";
20 nativeBuildInputs = [ cmake ];
21 buildInputs = [ zlib nifticlib ];
22 propagatedBuildInputs = [ netcdf hdf5 ];
25 "-DLIBMINC_MINC1_SUPPORT=ON"
26 "-DLIBMINC_BUILD_SHARED_LIBS=ON"
27 "-DLIBMINC_USE_NIFTI=ON"
28 "-DLIBMINC_USE_SYSTEM_NIFTI=ON"
31 doCheck = !stdenv.isDarwin;
32 # -j1: see https://github.com/BIC-MNI/libminc/issues/110
34 ctest -j1 --output-on-failure
38 homepage = "https://github.com/BIC-MNI/libminc";
39 description = "Medical imaging library based on HDF5";
40 maintainers = with maintainers; [ bcdarwin ];
41 platforms = platforms.unix;
42 license = licenses.free;