1 { lib, stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }:
3 stdenv.mkDerivation rec {
5 version = "unstable-2020-07-17";
9 src = fetchFromGitHub {
12 rev = "ffb5fb234a852ea7e8da8bb2b3b49f67acbe56ca";
13 sha256 = "0yr4ksghpvxh9zg0a4p7hvln3qirsi08plvjp5kxx2qiyj96zsdm";
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_SYSTEM_NIFTI=ON"
30 doCheck = !stdenv.isDarwin;
32 export LD_LIBRARY_PATH="$(pwd)" # see #22060
33 ctest -j1 -E 'ezminc_rw_test' --output-on-failure
34 # -j1: see https://github.com/BIC-MNI/libminc/issues/110
35 # ezminc_rw_test: can't find libminc_io.so.5.2.0
39 homepage = "https://github.com/BIC-MNI/libminc";
40 description = "Medical imaging library based on HDF5";
41 maintainers = with maintainers; [ bcdarwin ];
42 platforms = platforms.unix;
43 license = licenses.free;