Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }: 2 3stdenv.mkDerivation rec { 4 pname = "libminc"; 5 version = "2.4.05"; 6 7 owner = "BIC-MNI"; 8 9 src = fetchFromGitHub { 10 inherit owner; 11 repo = pname; 12 rev = "aa08255f0856e70fb001c5f9ee1f4e5a8c12d47d"; # new release, but no git tag 13 sha256 = "XMTO6/HkyrrQ0s5DzJLCmmWheye2DGMnpDbcGdP6J+A="; 14 }; 15 16 postPatch = '' 17 patchShebangs . 18 ''; 19 20 nativeBuildInputs = [ cmake ]; 21 buildInputs = [ zlib nifticlib ]; 22 propagatedBuildInputs = [ netcdf hdf5 ]; 23 24 cmakeFlags = [ 25 "-DLIBMINC_MINC1_SUPPORT=ON" 26 "-DLIBMINC_BUILD_SHARED_LIBS=ON" 27 "-DLIBMINC_USE_NIFTI=ON" 28 "-DLIBMINC_USE_SYSTEM_NIFTI=ON" 29 ]; 30 31 doCheck = !stdenv.isDarwin; 32 # -j1: see https://github.com/BIC-MNI/libminc/issues/110 33 checkPhase = '' 34 ctest -j1 --output-on-failure 35 ''; 36 37 meta = with lib; { 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; 43 }; 44}