mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
zlib,
|
|
netcdf,
|
|
nifticlib,
|
|
hdf5,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libminc";
|
|
version = "2.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "BIC-MNI";
|
|
repo = "libminc";
|
|
tag = "release-${finalAttrs.version}";
|
|
hash = "sha256-IQS8JDkZwLR73I5GpWKRT07zj7Ek2tdZ2TOjy02OjaQ=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs .
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [
|
|
zlib
|
|
nifticlib
|
|
];
|
|
propagatedBuildInputs = [
|
|
netcdf
|
|
hdf5
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DLIBMINC_MINC1_SUPPORT=ON"
|
|
"-DLIBMINC_BUILD_SHARED_LIBS=ON"
|
|
"-DLIBMINC_USE_NIFTI=ON"
|
|
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
|
|
];
|
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
# -j1: see https://github.com/BIC-MNI/libminc/issues/110
|
|
checkPhase = ''
|
|
ctest -j1 --output-on-failure
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/BIC-MNI/libminc";
|
|
description = "Medical imaging library based on HDF5";
|
|
maintainers = with lib.maintainers; [ bcdarwin ];
|
|
platforms = lib.platforms.unix;
|
|
license = lib.licenses.free;
|
|
};
|
|
})
|